From f792c307f5a37c42206090a1013c7e3b736bcb6b Mon Sep 17 00:00:00 2001 From: Stephan <31169771+Blueforcer@users.noreply.github.com> Date: Wed, 1 Nov 2023 18:29:45 +0100 Subject: [PATCH] fixes menu navigation --- src/Overlays.cpp | 2 ++ src/PeripheryManager.cpp | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/src/Overlays.cpp b/src/Overlays.cpp index 4e55cce9..b48ca6af 100644 --- a/src/Overlays.cpp +++ b/src/Overlays.cpp @@ -24,8 +24,10 @@ void StatusOverlay(FastLED_NeoMatrix *matrix, MatrixDisplayUiState *state, GifPl void MenuOverlay(FastLED_NeoMatrix *matrix, MatrixDisplayUiState *state, GifPlayer *gifPlayer) { + if (!MenuManager.inMenu) return; + matrix->fillScreen(0); DisplayManager.setTextColor(0xFFFFFF); DisplayManager.printText(0, 6, utf8ascii(MenuManager.menutext()).c_str(), true, 2); diff --git a/src/PeripheryManager.cpp b/src/PeripheryManager.cpp index a66a093a..7d85cf0f 100644 --- a/src/PeripheryManager.cpp +++ b/src/PeripheryManager.cpp @@ -427,6 +427,12 @@ void PeripheryManager_::tick() MQTTManager.sendButton(1, button_select.read()); ServerManager.sendButton(1, button_select.read()); } + else + { + button_left.read(); + button_select.read(); + button_right.read(); + } unsigned long currentMillis_BatTempHum = millis(); if (currentMillis_BatTempHum - previousMillis_BatTempHum >= interval_BatTempHum)