|
|
@ -21,7 +21,6 @@ DisplayEPaper::DisplayEPaper() { |
|
|
|
mHeadFootPadding = 16; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//***************************************************************************
|
|
|
|
void DisplayEPaper::init(uint8_t type, uint8_t _CS, uint8_t _DC, uint8_t _RST, uint8_t _BUSY, uint8_t _SCK, uint8_t _MOSI, uint32_t *utcTs, const char *version) { |
|
|
|
mUtcTs = utcTs; |
|
|
@ -29,12 +28,14 @@ void DisplayEPaper::init(uint8_t type, uint8_t _CS, uint8_t _DC, uint8_t _RST, u |
|
|
|
if (type > 9) { |
|
|
|
Serial.begin(115200); |
|
|
|
_display = new GxEPD2_BW<GxEPD2_150_BN, GxEPD2_150_BN::HEIGHT>(GxEPD2_150_BN(_CS, _DC, _RST, _BUSY)); |
|
|
|
hspi.begin(_SCK, _BUSY, _MOSI, _CS); |
|
|
|
|
|
|
|
#if defined(ESP32) && defined(USE_HSPI_FOR_EPD) |
|
|
|
hspi.begin(_SCK, _BUSY, _MOSI, _CS); |
|
|
|
_display->epd2.selectSPI(hspi, SPISettings(spiClk, MSBFIRST, SPI_MODE0)); |
|
|
|
#endif |
|
|
|
_display->init(115200, true, 2, false); |
|
|
|
|
|
|
|
_display->epd2.init(_SCK, _MOSI, 115200, true, 20, false); |
|
|
|
_display->init(115200, true, 20, false); |
|
|
|
_display->setRotation(mDisplayRotation); |
|
|
|
_display->setFullWindow(); |
|
|
|
|
|
|
@ -197,7 +198,6 @@ void DisplayEPaper::actualPowerPaged(float totalPower, float totalYieldDay, floa |
|
|
|
_display->setCursor(10, _display->height() - (mHeadFootPadding + 10)); |
|
|
|
snprintf(_fmtText, sizeof(_fmtText), "%d Inverter online", isprod); |
|
|
|
_display->println(_fmtText); |
|
|
|
|
|
|
|
} |
|
|
|
} while (_display->nextPage()); |
|
|
|
} |
|
|
|