Bläddra i källkod

Version 1.5.6

- version for ongoing fixes and additions
- added support for GYE042A87  4.2" b/w 400x300
- added support for SE0420NQ04 4.2" b/w 400x300
- added support for GDEQ0583Z31 5.83" b/w/r 648x480
- added support for GDEM102T91 10.2" b/w 960x640, SSD1677
- added support for GDEY116Z91 11.6" b/w/r 960x640, SSD1677
- added support for GDEM133T91 13.3" b/w 960x680, SSD1677
- added support for GDEM133Z91 13.3" b/w/r 960x680, SSD1677
- improved differential refresh for SE0420NQ04
- improved full refresh for SE0420NQ04
ZinggJM 2 år sedan
förälder
incheckning
2b718bf876
3 ändrade filer med 82 tillägg och 175 borttagningar
  1. 1 0
      README.md
  2. 79 173
      src/other/GxEPD2_420_SE0420NQ04.cpp
  3. 2 2
      src/other/GxEPD2_420_SE0420NQ04.h

+ 1 - 0
README.md

@@ -161,6 +161,7 @@
 - added support for GDEM133T91 13.3" b/w 960x680, SSD1677
 - added support for GDEM133Z91 13.3" b/w/r 960x680, SSD1677
 - improved differential refresh for SE0420NQ04
+- improved full refresh for SE0420NQ04
 #### Version 1.5.5
 - updated 7-color driver classes (design cleanup fixed)
 - note: Waveshare PhotoPainter doesn't work with MBED Pico package

+ 79 - 173
src/other/GxEPD2_420_SE0420NQ04.cpp

@@ -100,7 +100,7 @@ void GxEPD2_420_SE0420NQ04::writeImage(const uint8_t bitmap[], int16_t x, int16_
 }
 
 void GxEPD2_420_SE0420NQ04::writeImagePart(const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
-                                       int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
+    int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
 {
   if (_initial_write) writeScreenBuffer(); // initial full screen buffer clean
   delay(1); // yield() to avoid WDT on ESP8266 and ESP32
@@ -164,7 +164,7 @@ void GxEPD2_420_SE0420NQ04::writeImage(const uint8_t* black, const uint8_t* colo
 }
 
 void GxEPD2_420_SE0420NQ04::writeImagePart(const uint8_t* black, const uint8_t* color, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
-                                       int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
+    int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
 {
   if (black)
   {
@@ -188,7 +188,7 @@ void GxEPD2_420_SE0420NQ04::drawImage(const uint8_t bitmap[], int16_t x, int16_t
 }
 
 void GxEPD2_420_SE0420NQ04::drawImagePart(const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
-                                      int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
+    int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
 {
   writeImagePart(bitmap, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
   refresh(x, y, w, h);
@@ -203,7 +203,7 @@ void GxEPD2_420_SE0420NQ04::drawImage(const uint8_t* black, const uint8_t* color
 }
 
 void GxEPD2_420_SE0420NQ04::drawImagePart(const uint8_t* black, const uint8_t* color, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
-                                      int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
+    int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
 {
   writeImagePart(black, color, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
   refresh(x, y, w, h);
@@ -296,8 +296,11 @@ void GxEPD2_420_SE0420NQ04::_PowerOn()
 
 void GxEPD2_420_SE0420NQ04::_PowerOff()
 {
-  _writeCommand(0x02); // power off
-  _waitWhileBusy("_PowerOff", power_off_time);
+  if (_power_is_on)
+  {
+    _writeCommand(0x02); // power off
+    _waitWhileBusy("_PowerOff", power_off_time);
+  }
   _power_is_on = false;
   _using_partial_mode = false;
 }
@@ -332,120 +335,69 @@ void GxEPD2_420_SE0420NQ04::_InitDisplay()
   _writeData(0x01);
   _writeData(0x2C);
   _writeCommand (0x50); // Border
-  _writeData(0xb7);     // 
+  _writeData(0xb7);     // white
 }
 
+// full update waveform (taken form GxEPD2_420, adapted for UC8276C)
+
 const unsigned char GxEPD2_420_SE0420NQ04::lut_20_vcom0_full[] PROGMEM =
 {
-  0x01, 0x19, 0x19, 0x19, 0x19, 0x01, 0x01,
-  0x01, 0x19, 0x19, 0x19, 0x01, 0x01, 0x01,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x01, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00,
+  //0x60, 0x28, 0x28, 0x00, 0x00, 0x01, 0x00,
+  0x01, 0x40 + 0x28, 0x80 + 0x28, 0x00, 0x00, 0x01, 0x00,
+  0x01, 0x14, 0x00, 0x00, 0x00, 0x01, 0x00,
+  0x01, 0x12, 0x12, 0x00, 0x00, 0x01, 0x00,
 };
 
 const unsigned char GxEPD2_420_SE0420NQ04::lut_21_ww_full[] PROGMEM =
 {
-  0x01, 0x59, 0x99, 0x59, 0x99, 0x01, 0x01,
-  0x01, 0x59, 0x99, 0x19, 0x01, 0x01, 0x01,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  // 0x40, 0x08, 0x00, 0x00, 0x00, 0x02,
+  0x01, 0x40 + 0x08, 0x00, 0x00, 0x00, 0x02, 0x00,
+  // 0x90, 0x28, 0x28, 0x00, 0x00, 0x01,
+  0x01, 0x80 + 0x28, 0x40 + 0x28, 0x00, 0x00, 0x01, 0x00,
+  // 0x40, 0x14, 0x00, 0x00, 0x00, 0x01,
+  0x01, 0x40 + 0x14, 0x00, 0x00, 0x00, 0x01, 0x00,
+  // 0xA0, 0x12, 0x12, 0x00, 0x00, 0x01,
+  0x01, 0x80 + 0x12, 0x80 + 0x12, 0x00, 0x00, 0x01, 0x00,
 };
 
 const unsigned char GxEPD2_420_SE0420NQ04::lut_22_bw_full[] PROGMEM =
 {
-  0x01, 0x59, 0x99, 0x59, 0x99, 0x01, 0x01,
-  0x01, 0x59, 0x99, 0x19, 0x01, 0x01, 0x01,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  // 0x40, 0x08, 0x00, 0x00, 0x00, 0x02,
+  0x01, 0x40 + 0x08, 0x00, 0x00, 0x00, 0x02, 0x00,
+  // 0x90, 0x28, 0x28, 0x00, 0x00, 0x01,
+  0x01, 0x80 + 0x28, 0x40 + 0x28, 0x00, 0x00, 0x01, 0x00,
+  // 0x40, 0x14, 0x00, 0x00, 0x00, 0x01,
+  0x01, 0x40 + 0x14, 0x00, 0x00, 0x00, 0x01, 0x00,
+  // 0xA0, 0x12, 0x12, 0x00, 0x00, 0x01,
+  0x01, 0x80 + 0x12, 0x80 + 0x12, 0x00, 0x00, 0x01, 0x00,
 };
 
 const unsigned char GxEPD2_420_SE0420NQ04::lut_23_wb_full[] PROGMEM =
 {
-  0x01, 0x19, 0x99, 0x59, 0x99, 0x01, 0x01,
-  0x01, 0x59, 0x99, 0x59, 0x01, 0x01, 0x01,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  // 0x80, 0x08, 0x00, 0x00, 0x00, 0x02,
+  0x01, 0x80 + 0x08, 0x00, 0x00, 0x00, 0x02, 0x00,
+  // 0x90, 0x28, 0x28, 0x00, 0x00, 0x01,
+  0x01, 0x80 + 0x28, 0x40 + 0x28, 0x00, 0x00, 0x01, 0x00,
+  // 0x80, 0x14, 0x00, 0x00, 0x00, 0x01,
+  0x01, 0x80 + 0x14, 0x00, 0x00, 0x00, 0x01, 0x00,
+  // 0x50, 0x12, 0x12, 0x00, 0x00, 0x01,
+  0x01, 0x40 + 0x12, 0x40 + 0x12, 0x00, 0x00, 0x01, 0x00,
 };
 
 const unsigned char GxEPD2_420_SE0420NQ04::lut_24_bb_full[] PROGMEM =
 {
-  0x01, 0x19, 0x99, 0x59, 0x99, 0x01, 0x01,
-  0x01, 0x59, 0x99, 0x59, 0x01, 0x01, 0x01,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-// partial update waveform
-
-#if 0
-
-const unsigned char GxEPD2_420_SE0420NQ04::lut_20_vcom0_partial[] PROGMEM =
-{
-  0x01, 0x14, 0x02, 0x00, 0x00, 0x01, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-const unsigned char GxEPD2_420_SE0420NQ04::lut_21_ww_partial[] PROGMEM =
-{
-  0x01, 0x14, 0x82, 0x00, 0x00, 0x01, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-const unsigned char GxEPD2_420_SE0420NQ04::lut_22_bw_partial[] PROGMEM =
-{
-  0x01, 0x94, 0x82, 0x00, 0x00, 0x01, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-const unsigned char GxEPD2_420_SE0420NQ04::lut_23_wb_partial[] PROGMEM =
-{
-  0x01, 0x54, 0x42, 0x00, 0x00, 0x01, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-const unsigned char GxEPD2_420_SE0420NQ04::lut_24_bb_partial[] PROGMEM =
-{
-  0x01, 0x14, 0x02, 0x00, 0x00, 0x01, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  // 0x80, 0x08, 0x00, 0x00, 0x00, 0x02,
+  0x01, 0x80 + 0x08, 0x00, 0x00, 0x00, 0x02, 0x00,
+  // 0x90, 0x28, 0x28, 0x00, 0x00, 0x01,
+  0x01, 0x80 + 0x28, 0x40 + 0x28, 0x00, 0x00, 0x01, 0x00,
+  // 0x80, 0x14, 0x00, 0x00, 0x00, 0x01,
+  0x01, 0x80 + 0x14, 0x00, 0x00, 0x00, 0x01, 0x00,
+  // 0x50, 0x12, 0x12, 0x00, 0x00, 0x01,
+  0x01, 0x40 + 0x12, 0x40 + 0x12, 0x00, 0x00, 0x01, 0x00,
 };
 
-#else
+// partial update waveform (taken form GxEPD2_420, adapted for UC8276C)
 
 // same waveform as by demo code from Good Display
 //#define T1  0 // color change charge balance pre-phase
@@ -483,16 +435,11 @@ const unsigned char GxEPD2_420_SE0420NQ04::lut_20_vcom0_partial[] PROGMEM =
   0x00 + T4,
   0x01, // State 1 repeat times
   0x00, // State 2 repeat times
-  0x00 + 1, // gnd phase
-  0x00,
-  0x00,
-  0x00,
-  0x01,
-  0x00,
+  0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, // gnd phase
 };
 
 const unsigned char GxEPD2_420_SE0420NQ04::lut_21_ww_partial[] PROGMEM =
-{ 
+{
   // LUT format of UC8176
   // 10 w
   // 0x18, T1, T2, T3, T4, 1, // 00 01 10 00
@@ -500,23 +447,12 @@ const unsigned char GxEPD2_420_SE0420NQ04::lut_21_ww_partial[] PROGMEM =
   //
   // LUT format of UC8276
   // 00b : 0V, 01b : VSH, 10b : VSL, 11b : VDHR
-  0x01, // Group Repeat Times
-  0x00 + T1,
-  0x80 + T2,
-  0x40 + T3,
-  0x00 + T4,
-  0x01, // State 1 repeat times
-  0x00, // State 2 repeat times
-  0x00 + 1, // gnd phase
-  0x00,
-  0x00,
-  0x00,
-  0x01,
-  0x00,
+  0x01, 0x00 + T1, 0x80 + T2, 0x40 + T3, 0x00 + T4, 0x01, 0x00,
+  0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, // gnd phase
 };
 
 const unsigned char GxEPD2_420_SE0420NQ04::lut_22_bw_partial[] PROGMEM =
-{ 
+{
   // LUT format of UC8176
   // 10 w
   // 0x5A, T1, T2, T3, T4, 1, // 01 01 10 10
@@ -524,23 +460,12 @@ const unsigned char GxEPD2_420_SE0420NQ04::lut_22_bw_partial[] PROGMEM =
   //
   // LUT format of UC8276
   // 00b : 0V, 01b : VSH, 10b : VSL, 11b : VDHR
-  0x01, // Group Repeat Times
-  0x80 + T1,
-  0x80 + T2,
-  0x40 + T3,
-  0x40 + T4,
-  0x01, // State 1 repeat times
-  0x00, // State 2 repeat times
-  0x00 + 1, // gnd phase
-  0x00,
-  0x00,
-  0x00,
-  0x01,
-  0x00,
+  0x01, 0x80 + T1, 0x80 + T2, 0x40 + T3, 0x40 + T4, 0x01, 0x00,
+  0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, // gnd phase
 };
 
 const unsigned char GxEPD2_420_SE0420NQ04::lut_23_wb_partial[] PROGMEM =
-{ 
+{
   // LUT format of UC8176
   // 01 b
   // 0xA5, T1, T2, T3, T4, 1, // 10 10 01 01
@@ -548,23 +473,12 @@ const unsigned char GxEPD2_420_SE0420NQ04::lut_23_wb_partial[] PROGMEM =
   //
   // LUT format of UC8276
   // 00b : 0V, 01b : VSH, 10b : VSL, 11b : VDHR
-  0x01, // Group Repeat Times
-  0x40 + T1,
-  0x40 + T2,
-  0x80 + T3,
-  0x80 + T4,
-  0x01, // State 1 repeat times
-  0x00, // State 2 repeat times
-  0x00 + 1, // gnd phase
-  0x00,
-  0x00,
-  0x00,
-  0x01,
-  0x00,
+  0x01, 0x40 + T1, 0x40 + T2, 0x80 + T3, 0x80 + T4, 0x01, 0x00,
+  0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, // gnd phase
 };
 
 const unsigned char GxEPD2_420_SE0420NQ04::lut_24_bb_partial[] PROGMEM =
-{ 
+{
   // LUT format of UC8176
   // 01 b
   // 0x24, T1, T2, T3, T4, 1, // 00 10 01 00
@@ -572,36 +486,28 @@ const unsigned char GxEPD2_420_SE0420NQ04::lut_24_bb_partial[] PROGMEM =
   //
   // LUT format of UC8276
   // 00b : 0V, 01b : VSH, 10b : VSL, 11b : VDHR
-  0x01, // Group Repeat Times
-  0x00 + T1,
-  0x40 + T2,
-  0x80 + T3,
-  0x00 + T4,
-  0x01, // State 1 repeat times
-  0x00, // State 2 repeat times
-  0x00 + 1, // gnd phase
-  0x00,
-  0x00,
-  0x00,
-  0x01,
-  0x00,
+  0x01, 0x00 + T1, 0x40 + T2, 0x80 + T3, 0x00 + T4, 0x01, 0x00, // State 2 repeat times
+  0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, // gnd phase
 };
 
-#endif
-
 void GxEPD2_420_SE0420NQ04::_Init_Full()
 {
+  //  Serial.print("sizeof(lut_20_vcom0_full) "); Serial.println(sizeof(lut_20_vcom0_full));
+  //  Serial.print("sizeof(lut_21_ww_full) "); Serial.println(sizeof(lut_21_ww_full));
+  //  Serial.print("sizeof(lut_22_bw_full) "); Serial.println(sizeof(lut_22_bw_full));
+  //  Serial.print("sizeof(lut_23_wb_full) "); Serial.println(sizeof(lut_23_wb_full));
+  //  Serial.print("sizeof(lut_24_bb_full) "); Serial.println(sizeof(lut_24_bb_full));
   _InitDisplay();
   _writeCommand(0x20);
-  _writeDataPGM(lut_20_vcom0_full, sizeof(lut_20_vcom0_full));
+  _writeDataPGM(lut_20_vcom0_full, sizeof(lut_20_vcom0_full), 56 - sizeof(lut_20_vcom0_full));
   _writeCommand(0x21);
-  _writeDataPGM(lut_21_ww_full, sizeof(lut_21_ww_full));
+  _writeDataPGM(lut_21_ww_full, sizeof(lut_21_ww_full), 42 - sizeof(lut_21_ww_full));
   _writeCommand(0x22);
-  _writeDataPGM(lut_22_bw_full, sizeof(lut_22_bw_full));
+  _writeDataPGM(lut_22_bw_full, sizeof(lut_22_bw_full), 56 - sizeof(lut_22_bw_full));
   _writeCommand(0x23);
-  _writeDataPGM(lut_23_wb_full, sizeof(lut_23_wb_full));
+  _writeDataPGM(lut_23_wb_full, sizeof(lut_23_wb_full), 56 - sizeof(lut_23_wb_full));
   _writeCommand(0x24);
-  _writeDataPGM(lut_24_bb_full, sizeof(lut_24_bb_full));
+  _writeDataPGM(lut_24_bb_full, sizeof(lut_24_bb_full), 56 - sizeof(lut_24_bb_full));
   _PowerOn();
   _using_partial_mode = false;
 }
@@ -610,17 +516,17 @@ void GxEPD2_420_SE0420NQ04::_Init_Part()
 {
   _InitDisplay();
   _writeCommand(0x20);
-  _writeDataPGM(lut_20_vcom0_partial, sizeof(lut_20_vcom0_partial), 57 - sizeof(lut_20_vcom0_partial));
+  _writeDataPGM(lut_20_vcom0_partial, sizeof(lut_20_vcom0_partial), 56 - sizeof(lut_20_vcom0_partial));
   _writeCommand(0x21);
-  _writeDataPGM(lut_21_ww_partial, sizeof(lut_21_ww_partial), 43 - sizeof(lut_21_ww_partial));
+  _writeDataPGM(lut_21_ww_partial, sizeof(lut_21_ww_partial), 42 - sizeof(lut_21_ww_partial));
   _writeCommand(0x22);
-  _writeDataPGM(lut_22_bw_partial, sizeof(lut_22_bw_partial), 57 - sizeof(lut_22_bw_partial));
+  _writeDataPGM(lut_22_bw_partial, sizeof(lut_22_bw_partial), 56 - sizeof(lut_22_bw_partial));
   _writeCommand(0x23);
-  _writeDataPGM(lut_23_wb_partial, sizeof(lut_23_wb_partial), 57 - sizeof(lut_23_wb_partial));
+  _writeDataPGM(lut_23_wb_partial, sizeof(lut_23_wb_partial), 56 - sizeof(lut_23_wb_partial));
   _writeCommand(0x24);
-  _writeDataPGM(lut_24_bb_partial, sizeof(lut_24_bb_partial), 57 - sizeof(lut_24_bb_partial));
+  _writeDataPGM(lut_24_bb_partial, sizeof(lut_24_bb_partial), 56 - sizeof(lut_24_bb_partial));
   _writeCommand (0x50); // Border
-  _writeData(0xf7);     // 
+  _writeData(0x37);     // floating
   _PowerOn();
   _using_partial_mode = true;
 }

+ 2 - 2
src/other/GxEPD2_420_SE0420NQ04.h

@@ -30,8 +30,8 @@ class GxEPD2_420_SE0420NQ04 : public GxEPD2_EPD
     static const bool hasFastPartialUpdate = true;
     static const uint16_t power_on_time = 50; // ms, e.g. 46001us
     static const uint16_t power_off_time = 50; // ms, e.g. 40001us
-    static const uint16_t full_refresh_time = 4000; // ms, e.g. 3579001us
-    static const uint16_t partial_refresh_time = 600; // ms, e.g. 503001us
+    static const uint16_t full_refresh_time = 3200; // ms, e.g. 3104000us
+    static const uint16_t partial_refresh_time = 620; // ms, e.g. 603000us
     // constructor
     GxEPD2_420_SE0420NQ04(int16_t cs, int16_t dc, int16_t rst, int16_t busy);
     // methods (virtual)