From 22cd8ef1e0aab2ece4ef813751475616b0527b95 Mon Sep 17 00:00:00 2001 From: Pavel Brychta Date: Tue, 5 Jan 2021 10:14:56 +0100 Subject: [PATCH] Kontrola, zda je zadany frame indexem. --- src/OLEDUIPlus.cpp | 9 +++++++++ src/OLEDUIPlus.h | 1 + 2 files changed, 10 insertions(+) diff --git a/src/OLEDUIPlus.cpp b/src/OLEDUIPlus.cpp index 95d977c..809c3fa 100644 --- a/src/OLEDUIPlus.cpp +++ b/src/OLEDUIPlus.cpp @@ -383,4 +383,13 @@ void OLEDUIPlus::setOnCb(oledon olon) _oledon = olon; } +bool OLEDUIPlus::isMainFrame(uint8_t idx) +{ + bool retval = false; + + if (idx == _mainFrame) + retval = true; + return retval; +} + OLEDUIPlus ui; diff --git a/src/OLEDUIPlus.h b/src/OLEDUIPlus.h index 48ef9fb..2ef6d49 100644 --- a/src/OLEDUIPlus.h +++ b/src/OLEDUIPlus.h @@ -62,6 +62,7 @@ public: bool isVisible(void); void setOffCb(oledoff oloff); void setOnCb(oledon olon); + bool isMainFrame(uint8_t idx); #if defined(USE_OTA) void OTAStart(void);