mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-08 06:02:05 +00:00
Banner message state reset
This commit is contained in:
parent
6c3f24dfe6
commit
67d3cafc6f
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user