this seems better
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good

This commit is contained in:
Marius Eggert 2024-04-09 13:31:27 +02:00
parent 0f3eeb42d6
commit 1c36f36b1f

View File

@ -248,9 +248,15 @@ ReturnValue_t GpsHyperionLinuxController::handleCoreTelemetry(bool modeIsSet) {
maxTimeToReachFix.resetTimer(); maxTimeToReachFix.resetTimer();
} }
newFix = gps.fix.mode; newFix = gps.fix.mode;
}
if (gpsSet.fixMode.value != newFix) {
handleFixChangedEvent(newFix);
}
gpsSet.fixMode = newFix;
gpsSet.fixMode.setValid(modeIsSet);
// We are supposed to be on and functioning, but no fix was found
if (not validFix) { if (not validFix) {
if (maxTimeToReachFix.hasTimedOut()) { if (maxTimeToReachFix.hasTimedOut()) {
// We are supposed to be on and functioning, but no fix was found
// Set HK entries invalid // Set HK entries invalid
gpsSet.setValidity(false, true); gpsSet.setValidity(false, true);
if (oneShotSwitches.cantGetFixSwitch) { if (oneShotSwitches.cantGetFixSwitch) {
@ -274,12 +280,6 @@ ReturnValue_t GpsHyperionLinuxController::handleCoreTelemetry(bool modeIsSet) {
} }
} }
} }
}
if (gpsSet.fixMode.value != newFix) {
handleFixChangedEvent(newFix);
}
gpsSet.fixMode = newFix;
gpsSet.fixMode.setValid(modeIsSet);
// Only set on specific messages, so only set a valid flag to invalid // Only set on specific messages, so only set a valid flag to invalid
// if not set for more than a full message set (10 messages here) // if not set for more than a full message set (10 messages here)