From 710b576d6bef7dd268c53215a7f097652f5f5ee1 Mon Sep 17 00:00:00 2001 From: gemu2015 Date: Sun, 8 Sep 2019 20:48:47 +0200 Subject: [PATCH] epaper display 29 fix --- sonoff/xdsp_02_ssd1306.ino | 2 ++ sonoff/xdsp_05_epaper_29.ino | 7 +++++-- sonoff/xdsp_07_sh1106.ino | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sonoff/xdsp_02_ssd1306.ino b/sonoff/xdsp_02_ssd1306.ino index fbbbf0acb..704226a25 100755 --- a/sonoff/xdsp_02_ssd1306.ino +++ b/sonoff/xdsp_02_ssd1306.ino @@ -148,6 +148,8 @@ void Ssd1306Time(void) void Ssd1306Refresh(void) // Every second { + if (!renderer) return; + if (Settings.display_mode) { // Mode 0 is User text switch (Settings.display_mode) { case 1: // Time diff --git a/sonoff/xdsp_05_epaper_29.ino b/sonoff/xdsp_05_epaper_29.ino index 105aa504b..8d97bd123 100644 --- a/sonoff/xdsp_05_epaper_29.ino +++ b/sonoff/xdsp_05_epaper_29.ino @@ -108,12 +108,13 @@ void EpdInitDriver29() #define EPD_FONT_HEIGTH 12 void EpdPrintLog29(void) { + disp_refresh--; if (!disp_refresh) { disp_refresh = Settings.display_refresh; - if (Settings.display_rotate) { + //if (Settings.display_rotate) { if (!disp_screen_buffer_cols) { DisplayAllocScreenBuffer(); } - } + //} char* txt = DisplayLogBuffer('\040'); if (txt != nullptr) { @@ -143,6 +144,8 @@ void EpdPrintLog29(void) void EpdRefresh29(void) // Every second { if (Settings.display_mode) { // Mode 0 is User text + + if (!renderer) return; /* char tftdt[Settings.display_cols[0] +1]; char date4[11]; // 24-04-2017 diff --git a/sonoff/xdsp_07_sh1106.ino b/sonoff/xdsp_07_sh1106.ino index 0501233a7..d694129ec 100644 --- a/sonoff/xdsp_07_sh1106.ino +++ b/sonoff/xdsp_07_sh1106.ino @@ -142,6 +142,7 @@ void SH1106Time(void) void SH1106Refresh(void) // Every second { + if (!renderer) return; if (Settings.display_mode) { // Mode 0 is User text switch (Settings.display_mode) { case 1: // Time