improve SW switch handling
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

- also add CANT_GET_FIX event
This commit is contained in:
2023-02-07 14:16:43 +01:00
parent ab0a3bfd45
commit 36ed787db1
3 changed files with 33 additions and 25 deletions

View File

@ -58,10 +58,19 @@ class GpsHyperionLinuxController : public ExtendedControllerBase {
const char* currentClientBuf = nullptr;
ReadModes readMode = ReadModes::SOCKET;
Countdown maxTimeToReachFix = Countdown(MAX_SECONDS_TO_REACH_FIX * 1000);
bool modeCommanded = true;
bool modeCommanded = false;
bool timeInit = false;
bool gpsNotOpenSwitch = true;
bool gpsReadFailedSwitch = true;
struct OneShotSwitches {
void reset() {
gpsReadFailedSwitch = true;
cantGetFixSwitch = true;
}
bool gpsReadFailedSwitch = true;
bool cantGetFixSwitch = true;
} oneShotSwitches;
bool debugHyperionGps = false;
int32_t noModeSetCntr = 0;
Countdown timeUpdateCd = Countdown(60);