Browse Source

Merge branch 'You69Man-feature/PR_attempt_to_fix_ePaper' into development03

pull/1692/merge
lumapu 6 months ago
parent
commit
c1c63c1c77
  1. 17
      src/plugins/Display/Display.h

17
src/plugins/Display/Display.h

@ -79,16 +79,25 @@ class Display {
void tickerSecond() { void tickerSecond() {
bool request_refresh = false; bool request_refresh = false;
if (mMono != NULL) if (mMono != NULL) {
// maintain LCD and OLED displays with pixel shift screensavers, at least every 5 seconds
request_refresh = mMono->loop(motionSensorActive()); request_refresh = mMono->loop(motionSensorActive());
if (mNewPayload || (((++mLoopCnt) % 5) == 0) || request_refresh) { if (mNewPayload || (((++mLoopCnt) % 5) == 0) || request_refresh) {
DataScreen(); DataScreen();
mNewPayload = false; mNewPayload = false;
mLoopCnt = 0; mLoopCnt = 0;
} }
}
#if defined(ESP32) && !defined(ETHERNET) #if defined(ESP32) && !defined(ETHERNET)
else if (DISP_TYPE_T10_EPAPER == mCfg->type) {
// maintain ePaper at least every 15 seconds
if (mNewPayload || (((++mLoopCnt) % 15) == 0)) {
DataScreen();
mNewPayload = false;
mLoopCnt = 0;
}
mEpaper.tickerSecond(); mEpaper.tickerSecond();
}
#endif #endif
} }
@ -180,12 +189,14 @@ class Display {
else if (DISP_TYPE_T10_EPAPER == mCfg->type) { else if (DISP_TYPE_T10_EPAPER == mCfg->type) {
mEpaper.loop((totalPower), totalYieldDay, totalYieldTotal, nrprod); mEpaper.loop((totalPower), totalYieldDay, totalYieldTotal, nrprod);
mRefreshCycle++; mRefreshCycle++;
}
if (mRefreshCycle > 480) { if (mRefreshCycle > 480) {
mEpaper.fullRefresh(); mEpaper.fullRefresh();
mRefreshCycle = 0; mRefreshCycle = 0;
} }
}
#endif #endif
} }

Loading…
Cancel
Save