浏览代码

flip correction :-)

philippe44 5 年之前
父节点
当前提交
cb7262962c
共有 2 个文件被更改,包括 7 次插入1 次删除
  1. 1 1
      components/display/tarablessd1306/ssd1306.c
  2. 6 0
      plugin/SqueezeESP32/Graphics.pm

+ 1 - 1
components/display/tarablessd1306/ssd1306.c

@@ -209,7 +209,7 @@ static bool SSD1306_Init( struct SSD1306_Device* DeviceHandle, int Width, int He
     SSD1306_HWReset( DeviceHandle );
     
     /* Init sequence according to SSD1306.pdf */
-    SSD1306_SetMuxRatio( DeviceHandle, 0x3F );
+    SSD1306_SetMuxRatio( DeviceHandle, Height - 1 );
     SSD1306_SetDisplayOffset( DeviceHandle, 0x00 );
     SSD1306_SetDisplayStartLine( DeviceHandle, 0 );
     SSD1306_SetHFlip( DeviceHandle, false );

+ 6 - 0
plugin/SqueezeESP32/Graphics.pm

@@ -45,6 +45,12 @@ sub nmodes {
 	return $#modes;
 }
 
+# I don't think LMS renderer handles properly screens other than 32 pixels. It
+# seems that all we get is a 32 pixel-tall data with anything else padded to 0
+# i.e. if we try 64 pixels height, bytes 0..3 and 4..7 will contains the same 
+# pattern than the 32 pixels version, where one would have expected bytes 4..7
+# to be empty
+
 =comment
 sub bytesPerColumn {
 	return 4;