Vypinani zaporneho napeti OLED rizeno direktivou OLED_REAL_OFF

This commit is contained in:
Pavel Brychta 2021-02-12 07:35:32 +01:00
parent ab95c7e60d
commit 19b1d3069e

View File

@ -72,7 +72,9 @@ void OLEDUIPlus::startAnim(int open)
_anim.height = _oled->height() / 2; _anim.height = _oled->height() / 2;
_anim.lineClosing = false; _anim.lineClosing = false;
_anim.lineWidth = 0; _anim.lineWidth = 0;
#if defined(OLED_REAL_OFF)
_oled->displayOn(); _oled->displayOn();
#endif
_displayon = true; _displayon = true;
} else { } else {
_anim.closing = true; _anim.closing = true;
@ -123,7 +125,11 @@ void onOffOverlay(OLEDDisplay *display, OLEDDisplayUiState *state)
if (_anim.lineClosing && _anim.closing) { if (_anim.lineClosing && _anim.closing) {
_anim.active = false; _anim.active = false;
display->clear();
display->display();
#if defined(OLED_REAL_OFF)
display->displayOff(); display->displayOff();
#endif
if (_oledoff != nullptr) if (_oledoff != nullptr)
_oledoff(); _oledoff();
_displayon = false; _displayon = false;
@ -339,8 +345,10 @@ void OLEDUIPlus::OTAStart(void)
{ {
if (_oled) { if (_oled) {
#if defined(OLED_REAL_OFF)
if (false == _displayon) if (false == _displayon)
_oled->displayOn(); _oled->displayOn();
#endif
_oled->clear(); _oled->clear();
_oled->setFont(ArialMT_Plain_10); _oled->setFont(ArialMT_Plain_10);
_oled->setTextAlignment(TEXT_ALIGN_CENTER_BOTH); _oled->setTextAlignment(TEXT_ALIGN_CENTER_BOTH);