Triple GPS state (#3157)

* Triple state GPS refactoring

* Skip probe

* Move GPS toggle into the GPSThread

* Consolidate

* make all happy (including me)

* corrected screen texts

* NOT_PRESENT guard in main.cpp

---------

Co-authored-by: mverch67 <manuel.verch@gmx.de>
This commit is contained in:
Ben Meadors
2024-02-01 15:24:39 -06:00
committed by GitHub
parent 0c0a3c4b55
commit 7f7c5cbd62
7 changed files with 61 additions and 33 deletions

View File

@@ -193,15 +193,7 @@ class ButtonThread : public concurrency::OSThread
static void userButtonMultiPressed()
{
if (!config.device.disable_triple_click && (gps != nullptr)) {
config.position.gps_enabled = !(config.position.gps_enabled);
if (config.position.gps_enabled) {
LOG_DEBUG("Flag set to true to restore power\n");
gps->enable();
} else {
LOG_DEBUG("Flag set to false for gps power\n");
gps->disable();
}
gps->toggleGpsMode();
}
}