vroland / epdiy

EPDiy is a driver board for affordable e-Paper (or E-ink) displays.
https://vroland.github.io/epdiy-hardware/
GNU Lesser General Public License v3.0
1.25k stars 178 forks source link

fix CKV drift and frame restart in LCD driver #263

Closed vroland closed 7 months ago

vroland commented 7 months ago

This PR fixes an issue where the CKV clock would drift for 8 bit screen due to the use of dummy cycles which work around an issue in the ESP32 LCD FIFO. Additionally, dummy cycles are now also used for 16-bit parallel displays, fixing a pixel offset issue.

vroland commented 7 months ago

@martinberlin If you have the time, can you check if this fixes your issues with the color display?

martinberlin commented 7 months ago

Hello Valentin, I can confirm this works now perfectly with color. 1CB93B66-D40B-43D4-A79A-3D06FE31EB56

For some reason still out of my reach after merging this into s3_color_implementation branch now I need to swap colors. But the colors work correctly without the jump in row 1000. Great fix thanks a lot! If I remember well that is the right order when you look in the microscope to the color filter (RBG)

-107,13 +107,13 @@ uint8_t epd_get_panel_color(int x, int y, uint8_t r, uint8_t g, uint8_t b) {
     switch (c)
     {
       case 0:
-        return gamme_curve[r]; // R
+        return gamme_curve[g]; // Green
         break;
       case 1:
-        return gamme_curve[b]; // B
+        return gamme_curve[r]; // Red
         break;
       default:
-        return gamme_curve[g];
+        return gamme_curve[b];
     }
 }
vroland commented 7 months ago

This PR changes also fixes the line start which may shift your color arrangement. But good to hear that it works :+1: