diff --git a/src/LiquidLine.cpp b/src/LiquidLine.cpp index 92e56ad..39f96ae 100644 --- a/src/LiquidLine.cpp +++ b/src/LiquidLine.cpp @@ -156,7 +156,7 @@ void LiquidLine::print_variable(DisplayClass *p_liquidCrystal, uint8_t number) { case DataType::CHAR_PTR: { char* variable = const_cast(reinterpret_cast(_variable[number])); DEBUG(F("(char*)")); DEBUG(variable); - ESP_LOGD("LiquidLine", "print_variable(char*):%s", variable); + ESP_LOGV("LiquidLine", "print_variable(char*):%s", variable); p_liquidCrystal->print(variable); break; } //case CHAR_PTR diff --git a/src/LiquidMenu.cpp b/src/LiquidMenu.cpp index 10e9d03..eaedd26 100644 --- a/src/LiquidMenu.cpp +++ b/src/LiquidMenu.cpp @@ -97,6 +97,11 @@ uint8_t LiquidMenu::get_currentScreenNumber() const return _currentScreen; } +uint8_t LiquidMenu::get_screenCount() const +{ + return _screenCount; +} + void LiquidMenu::next_screen() { _p_liquidCrystal->clear(); diff --git a/src/LiquidMenu.h b/src/LiquidMenu.h index 5b33eb2..ababed4 100644 --- a/src/LiquidMenu.h +++ b/src/LiquidMenu.h @@ -711,6 +711,9 @@ class LiquidScreen { */ bool set_focusedLine(uint8_t lineIndex); + LiquidLine *_p_liquidLine[MAX_LINES]; ///< The LiquidLine objects + uint8_t get_lineCount() const; + private: /// Prints the lines pointed by the screen. /** @@ -764,7 +767,6 @@ class LiquidScreen { */ bool call_function(uint8_t number) const; - LiquidLine *_p_liquidLine[MAX_LINES]; ///< The LiquidLine objects uint8_t _lineCount; ///< Count of the LiquidLine objects uint8_t _focus; ///< Index of the focused line uint8_t _displayLineCount; ///< The number of lines the display supports @@ -1045,10 +1047,11 @@ class LiquidMenu { DisplayClass *_p_liquidCrystal; ///< Pointer to the DisplayClass object FIXME LiquidScreen *_p_liquidScreen[MAX_SCREENS]; ///< The LiquidScreen objects + uint8_t get_screenCount() const; private: - uint8_t _screenCount; ///< Count of the LiquidScreen objects - uint8_t _currentScreen; // FIXME DEBUG should be private + uint8_t _screenCount; ///< Count of the LiquidScreen objects + uint8_t _currentScreen; // FIXME DEBUG should be private }; /// Represents a collection of menus forming a menu system. diff --git a/src/LiquidScreen.cpp b/src/LiquidScreen.cpp index 74d84c7..e5f8fdc 100644 --- a/src/LiquidScreen.cpp +++ b/src/LiquidScreen.cpp @@ -201,6 +201,10 @@ uint8_t LiquidScreen::get_focusedLine() const { return _focus; } +uint8_t LiquidScreen::get_lineCount() const { + return _lineCount; +} + bool LiquidScreen::is_callable(uint8_t number) const { if (_focus != _lineCount) { return _p_liquidLine[_focus]->is_callable(number);