From af1c18e8cf2933f937cdd0d92c20c2311cd589bd Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 7 Mar 2023 21:02:59 +0100 Subject: [PATCH 1/2] now fix loss should always be detected and reported --- linux/devices/GpsHyperionLinuxController.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/linux/devices/GpsHyperionLinuxController.cpp b/linux/devices/GpsHyperionLinuxController.cpp index 3beb0d87..18461c14 100644 --- a/linux/devices/GpsHyperionLinuxController.cpp +++ b/linux/devices/GpsHyperionLinuxController.cpp @@ -214,16 +214,14 @@ ReturnValue_t GpsHyperionLinuxController::handleGpsReadData() { } bool validFix = false; + uint8_t newFix = 0; if (modeIsSet) { // 0: Not seen, 1: No fix, 2: 2D-Fix, 3: 3D-Fix if (gps.fix.mode == 2 or gps.fix.mode == 3) { validFix = true; } - if (gpsSet.fixMode.value != gps.fix.mode) { - triggerEvent(GpsHyperion::GPS_FIX_CHANGE, gpsSet.fixMode.value, gps.fix.mode); - } - gpsSet.fixMode.value = gps.fix.mode; - if (gps.fix.mode == 0 or gps.fix.mode == 1) { + newFix = gps.fix.mode; + if (newFix == 0 or newFix == 1) { if (modeCommanded and maxTimeToReachFix.hasTimedOut()) { // We are supposed to be on and functioning, but no fix was found if (mode == MODE_ON or mode == MODE_NORMAL) { @@ -233,6 +231,10 @@ ReturnValue_t GpsHyperionLinuxController::handleGpsReadData() { } } } + if (gpsSet.fixMode.value != newFix) { + triggerEvent(GpsHyperion::GPS_FIX_CHANGE, gpsSet.fixMode.value, newFix); + } + gpsSet.fixMode = newFix; gpsSet.fixMode.setValid(modeIsSet); // Only set on specific messages, so only set a valid flag to invalid From f5c4e2b78885b477bdd028903f33a58713948bf3 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 7 Mar 2023 21:07:58 +0100 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff9b3511..ac052a44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ will consitute of a breaking change warranting a new major release: ## Fixed +- GPS fix loss was not reported if mode is unset. - Allow arbitrary submodes for dual lane boards to avoid FDIR reactions of subsystem components. Bump FSFW to allow this. - PUS 15 was not scheduled