Browse Source

0.8.132

* improved refresh routine of ePeper
* added default pin seetings for opendtufusion board
main
lumapu 2 months ago
parent
commit
c64f028ec1
  1. 2
      src/CHANGES.md
  2. 38
      src/plugins/Display/Display_ePaper.cpp
  3. 4
      src/plugins/Display/Display_ePaper.h
  4. 36
      src/web/html/setup.html

2
src/CHANGES.md

@ -2,6 +2,8 @@
## 0.8.132 - 2024-08-09
* fix boot loop once no ePaper is connected #1713, #1714
* improved refresh routine of ePeper
* added default pin seetings for opendtufusion board
## 0.8.131 - 2024-08-08
* improved refresh routine of ePaper, full refresh each 12h #1107 #1706

38
src/plugins/Display/Display_ePaper.cpp

@ -44,6 +44,8 @@ void DisplayEPaper::init(uint8_t type, uint8_t _CS, uint8_t _DC, uint8_t _RST, u
_display->init(0, true, 20, false);
_display->setRotation(mDisplayRotation);
_display->setFullWindow();
_display->setTextColor(GxEPD_BLACK);
_display->firstPage();
_version = version;
}
}
@ -66,44 +68,42 @@ void DisplayEPaper::fullRefresh() {
void DisplayEPaper::refreshLoop() {
switch(mRefreshState) {
case RefreshStatus::LOGO:
_display->fillScreen(GxEPD_BLACK);
_display->firstPage();
_display->drawBitmap(0, 0, logo, 200, 200, GxEPD_WHITE);
mSecondCnt = 4;
mNextRefreshState = RefreshStatus::LOGO_WAIT;
mRefreshState = RefreshStatus::WAIT;
_display->fillScreen(GxEPD_WHITE);
_display->drawInvertedBitmap(0, 0, logo, 200, 200, GxEPD_BLACK);
if(_display->nextPage())
break;
mSecondCnt = 10;
_display->powerOff();
mRefreshState = RefreshStatus::LOGO_WAIT;
break;
case RefreshStatus::LOGO_WAIT:
if(0 != mSecondCnt)
break;
mRefreshState = RefreshStatus::BLACK;
mRefreshState = RefreshStatus::WHITE;
_display->firstPage();
break;
case RefreshStatus::BLACK:
_display->fillScreen(GxEPD_BLACK);
if(_display->nextPage())
break;
mRefreshState = RefreshStatus::WHITE;
_display->firstPage();
mNextRefreshState = RefreshStatus::WHITE;
mRefreshState = RefreshStatus::WAIT;
break;
case RefreshStatus::WHITE:
_display->fillScreen(GxEPD_WHITE);
_display->firstPage();
mNextRefreshState = RefreshStatus::PARTITIALS;
mRefreshState = RefreshStatus::WAIT;
if(_display->nextPage())
break;
case RefreshStatus::WAIT:
if(!_display->nextPage())
mRefreshState = mNextRefreshState;
mRefreshState = RefreshStatus::PARTITIALS;
_display->firstPage();
break;
case RefreshStatus::PARTITIALS:
headlineIP();
versionFooter();
mNextRefreshState = RefreshStatus::DONE;
mRefreshState = RefreshStatus::WAIT;
mRefreshState = RefreshStatus::DONE;
break;
default: // RefreshStatus::DONE
@ -315,7 +315,9 @@ void DisplayEPaper::loop(float totalPower, float totalYieldDay, float totalYield
//***************************************************************************
void DisplayEPaper::tickerSecond() {
if(RefreshStatus::LOGO_WAIT == mRefreshState) {
if(mSecondCnt > 0)
mSecondCnt--;
}
}
#endif // ESP32

4
src/plugins/Display/Display_ePaper.h

@ -48,7 +48,6 @@ class DisplayEPaper {
DONE,
BLACK,
WHITE,
WAIT,
PARTITIALS,
LOGO,
LOGO_WAIT
@ -63,7 +62,8 @@ class DisplayEPaper {
uint32_t* mUtcTs;
bool mEnPowerSave;
const char* _version;
RefreshStatus mRefreshState, mNextRefreshState;
RefreshStatus mRefreshState;
uint8_t mSecondCnt;
bool mLogoDisplayed;
#if defined(SPI_HAL)

36
src/web/html/setup.html

@ -465,12 +465,12 @@
[6, "GPIO6"],
[7, "GPIO7"],
[8, "GPIO8"],
[9, "GPIO9"],
[10, "GPIO10"],
[11, "GPIO11"],
[12, "GPIO12"],
[13, "GPIO13"],
[14, "GPIO14"],
[9, "GPIO9 (DATA display)"],
[10, "GPIO10 (SCK display)"],
[11, "GPIO11 (CS display)"],
[12, "GPIO12 (DC display)"],
[13, "GPIO13 (RST display)"],
[14, "GPIO14 (BUSY display)"],
[15, "GPIO15"],
[16, "GPIO16"],
[17, "GPIO17"],
@ -487,20 +487,20 @@
[32, "GPIO32 (FLASH - {#PIN_NOT_AVAIL})"],
[33, "GPIO33 (not exposed on S3-WROOM modules)"],
[34, "GPIO34 (not exposed on S3-WROOM modules)"],
[35, "GPIO35"],
[36, "GPIO36"],
[37, "GPIO37"],
[38, "GPIO38"],
[39, "GPIO39"],
[40, "GPIO40"],
[41, "GPIO41"],
[42, "GPIO42"],
[43, "GPIO43"],
[44, "GPIO44"],
[35, "GPIO35 (MOSI NRF24)"],
[36, "GPIO36 (SCK NRF24)"],
[37, "GPIO37 (CSN NRF24)"],
[38, "GPIO38 (CE NRF24)"],
[39, "GPIO39 (SCK ETH)"],
[40, "GPIO40 (MOSI ETH)"],
[41, "GPIO41 (MISO ETH)"],
[42, "GPIO42 (CS ETH)"],
[43, "GPIO43 (RST ETH)"],
[44, "GPIO44 (INT ETH)"],
[45, "GPIO45 ({#PIN_DONT_USE} - STRAPPING PIN)"],
[46, "GPIO46 ({#PIN_DONT_USE} - STRAPPING PIN)"],
[47, "GPIO47"],
[48, "GPIO48"],
[47, "GPIO47 (IRQ NRF24)"],
[48, "GPIO48 (MISO NRF24)"],
];
/*ENDIF_ESP32-S3*/
/*IF_ESP32-C3*/

Loading…
Cancel
Save