From 19b1d3069e154305290fe7c0e82e9aa47c231dc6 Mon Sep 17 00:00:00 2001 From: Pavel Brychta Date: Fri, 12 Feb 2021 07:35:32 +0100 Subject: [PATCH] Vypinani zaporneho napeti OLED rizeno direktivou OLED_REAL_OFF --- src/OLEDUIPlus.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/OLEDUIPlus.cpp b/src/OLEDUIPlus.cpp index 809c3fa..475fb32 100644 --- a/src/OLEDUIPlus.cpp +++ b/src/OLEDUIPlus.cpp @@ -72,7 +72,9 @@ void OLEDUIPlus::startAnim(int open) _anim.height = _oled->height() / 2; _anim.lineClosing = false; _anim.lineWidth = 0; +#if defined(OLED_REAL_OFF) _oled->displayOn(); +#endif _displayon = true; } else { _anim.closing = true; @@ -123,7 +125,11 @@ void onOffOverlay(OLEDDisplay *display, OLEDDisplayUiState *state) if (_anim.lineClosing && _anim.closing) { _anim.active = false; + display->clear(); + display->display(); +#if defined(OLED_REAL_OFF) display->displayOff(); +#endif if (_oledoff != nullptr) _oledoff(); _displayon = false; @@ -339,8 +345,10 @@ void OLEDUIPlus::OTAStart(void) { if (_oled) { +#if defined(OLED_REAL_OFF) if (false == _displayon) _oled->displayOn(); +#endif _oled->clear(); _oled->setFont(ArialMT_Plain_10); _oled->setTextAlignment(TEXT_ALIGN_CENTER_BOTH);