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 } }