From 01285f0cb711491a287ed8dd1f3338ed2d8e186b Mon Sep 17 00:00:00 2001 From: Lukas Pusch Date: Thu, 15 Aug 2024 14:53:52 +0200 Subject: [PATCH] 0.8.138 * fix ePaper not functional #1722 --- src/CHANGES.md | 3 +++ src/defines.h | 2 +- src/network/AhoyEthernet.h | 3 +++ src/plugins/Display/Display.h | 10 +++++----- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/CHANGES.md b/src/CHANGES.md index 140183e6..d32fa767 100644 --- a/src/CHANGES.md +++ b/src/CHANGES.md @@ -1,5 +1,8 @@ # Development Changes +## 0.8.138 - 2024-08-15 +* fix ePaper not functional #1722 + ## 0.8.137 - 2024-08-13 * fix storage of timezone and region #1723 diff --git a/src/defines.h b/src/defines.h index 33dc9624..ec5f07b0 100644 --- a/src/defines.h +++ b/src/defines.h @@ -13,7 +13,7 @@ //------------------------------------- #define VERSION_MAJOR 0 #define VERSION_MINOR 8 -#define VERSION_PATCH 137 +#define VERSION_PATCH 138 //------------------------------------- typedef struct { uint8_t ch; diff --git a/src/network/AhoyEthernet.h b/src/network/AhoyEthernet.h index f6564e1f..9ed2de98 100644 --- a/src/network/AhoyEthernet.h +++ b/src/network/AhoyEthernet.h @@ -22,6 +22,9 @@ class AhoyEthernet : public AhoyWifi { }; public: + AhoyEthernet() + : mMode (Mode::WIRELESS) {} + virtual void begin() override { mMode = Mode::WIRELESS; mAp.enable(); diff --git a/src/plugins/Display/Display.h b/src/plugins/Display/Display.h index 1694fec6..4654a4f4 100644 --- a/src/plugins/Display/Display.h +++ b/src/plugins/Display/Display.h @@ -45,7 +45,7 @@ class Display { case DISP_TYPE_T4_SSD1306_128X32: mMono = new DisplayMono128X32(); break; // SSD1306_128X32 (0.91") case DISP_TYPE_T5_SSD1306_64X48: mMono = new DisplayMono64X48(); break; // SSD1306_64X48 (0.66" - Wemos OLED Shield) case DISP_TYPE_T6_SSD1309_128X64: mMono = new DisplayMono128X64(); break; // SSD1309_128X64 (2.42") - #if defined(ESP32) && !defined(ETHERNET) + #if defined(ESP32) case DISP_TYPE_T10_EPAPER: mMono = NULL; // ePaper does not use this mRefreshCycle = 0; @@ -73,7 +73,7 @@ class Display { } void loop() { - #if defined(ESP32) && !defined(ETHERNET) + #if defined(ESP32) if ((nullptr != mCfg) && (DISP_TYPE_T10_EPAPER == mCfg->type)) { mEpaper.refreshLoop(); } @@ -96,7 +96,7 @@ class Display { mLoopCnt = 0; } } - #if defined(ESP32) && !defined(ETHERNET) + #if defined(ESP32) else if (DISP_TYPE_T10_EPAPER == mCfg->type) { // maintain ePaper at least every 15 seconds if (mNewPayload || (((++mLoopCnt) % 15) == 0)) { @@ -193,7 +193,7 @@ class Display { if (mMono ) { mMono->disp(); } - #if defined(ESP32) && !defined(ETHERNET) + #if defined(ESP32) else if (DISP_TYPE_T10_EPAPER == mCfg->type) { mEpaper.loop((totalPower), totalYieldDay, totalYieldTotal, nrprod); mRefreshCycle++; @@ -254,7 +254,7 @@ class Display { RADIO *mHmsRadio = nullptr; uint16_t mRefreshCycle = 0; - #if defined(ESP32) && !defined(ETHERNET) + #if defined(ESP32) DisplayEPaper mEpaper; #endif DisplayMono *mMono = nullptr;