From 67d3cafc6f0fbadce6412423c7ea8983320f51e2 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Fri, 6 Jun 2025 23:42:05 -0500 Subject: [PATCH] Banner message state reset --- src/graphics/Screen.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index c6d3c5f13..6906dfe14 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -144,6 +144,7 @@ void Screen::showOverlayBanner(const char *message, uint32_t durationMs, uint8_t NotificationRenderer::alertBannerUntil = (durationMs == 0) ? 0 : millis() + durationMs; NotificationRenderer::alertBannerOptions = options; NotificationRenderer::alertBannerCallback = bannerCallback; + NotificationRenderer::curSelected = 0; } static void drawModuleFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) @@ -1846,6 +1847,19 @@ int Screen::handleInputEvent(const InputEvent *event) } }); } +#endif +#if HAS_GPS + if (this->ui->getUiState()->currentFrame == framesetInfo.positions.gps) { + showOverlayBanner("Toggle GPS\nENABLED\nDISABLED", 30000, 2, [](int selected) -> void { + if (selected == 0) { + config.position.gps_enabled = true; + gps->enable(); + } else if (selected == 1) { + config.position.gps_enabled = false; + gps->disable(); + } + }); + } #endif } }