Просмотр исходного кода

579c: route each canvas half to the correct chip after the PSR swap

The PSR scan-direction swap that un-mirrored the text also moved each
region to the opposite half of the glass (left content showed on the
right, bench-observed). With the corrected scan direction, chip 0x02
drives the left of the panel and chip 0x01 the right, so send plane 0
(the left canvas half) under slave-select and plane 1 (right) under
master-select. Swaps the window_sequence order only; per-chip PSR init
is unchanged.
ZiB 3 недель назад
Родитель
Сommit
8076eb06f6
1 измененных файлов с 11 добавлено и 4 удалено
  1. 11 4
      components/gxepd2/panel_579c_gdey0579f51.h

+ 11 - 4
components/gxepd2/panel_579c_gdey0579f51.h

@@ -119,11 +119,18 @@ inline const EpdPanelDescriptor PANEL_579C_GDEY0579F51 = {
                                  // the engine hard-aborts
                                  // the engine hard-aborts
     .init_sequence = PANEL_579C_GDEY0579F51_INIT,
     .init_sequence = PANEL_579C_GDEY0579F51_INIT,
     .init_sequence_len = sizeof(PANEL_579C_GDEY0579F51_INIT) / sizeof(PANEL_579C_GDEY0579F51_INIT[0]),
     .init_sequence_len = sizeof(PANEL_579C_GDEY0579F51_INIT) / sizeof(PANEL_579C_GDEY0579F51_INIT[0]),
-    .window_sequence = {PANEL_579C_GDEY0579F51_WINDOW_MASTER, PANEL_579C_GDEY0579F51_WINDOW_SLAVE},
-    .window_sequence_len = {sizeof(PANEL_579C_GDEY0579F51_WINDOW_MASTER) / sizeof(PANEL_579C_GDEY0579F51_WINDOW_MASTER[0]),
-                             sizeof(PANEL_579C_GDEY0579F51_WINDOW_SLAVE) / sizeof(PANEL_579C_GDEY0579F51_WINDOW_SLAVE[0])},
+    // plane 0 is the LEFT half of the canvas (draw_packed_ splits at
+    // plane_width), plane 1 the RIGHT half. With the swapped PSR scan
+    // direction, chip 0x02 (slave) drives the left of the glass and chip
+    // 0x01 (master) the right, so route plane 0 -> slave-select window and
+    // plane 1 -> master-select. Sending them in physical-chip order instead
+    // put the left half on the right of the panel and vice versa
+    // (bench-observed 2026-10-18).
+    .window_sequence = {PANEL_579C_GDEY0579F51_WINDOW_SLAVE, PANEL_579C_GDEY0579F51_WINDOW_MASTER},
+    .window_sequence_len = {sizeof(PANEL_579C_GDEY0579F51_WINDOW_SLAVE) / sizeof(PANEL_579C_GDEY0579F51_WINDOW_SLAVE[0]),
+                             sizeof(PANEL_579C_GDEY0579F51_WINDOW_MASTER) / sizeof(PANEL_579C_GDEY0579F51_WINDOW_MASTER[0])},
     .window_per_plane = true,
     .window_per_plane = true,
-    .plane_count = 2,  // "plane" 0 = master region, "plane" 1 = slave region
+    .plane_count = 2,  // plane 0 = left half -> chip 0x02; plane 1 = right half -> chip 0x01
     .plane_write_cmd = {0x10, 0x10},
     .plane_write_cmd = {0x10, 0x10},
     .plane_invert = {false, false},
     .plane_invert = {false, false},
     .plane_width = 396,  // each region's own local width
     .plane_width = 396,  // each region's own local width