GNSS Ctrl Improvements #871

Merged
meggert merged 24 commits from gnss-ctrl-improvements into main 2024-04-10 11:40:24 +02:00
Showing only changes of commit 1c36f36b1f - Show all commits

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)