From 236916bf67258fe40f60f64f5b7f48ef7477650b Mon Sep 17 00:00:00 2001 From: meggert Date: Thu, 29 Feb 2024 16:06:55 +0100 Subject: [PATCH 01/20] this should remove the fix changed spam --- bsp_q7s/core/CoreController.cpp | 3 +-- bsp_q7s/core/CoreController.h | 2 +- linux/acs/GpsHyperionLinuxController.cpp | 28 +++++++++++++++--------- linux/acs/GpsHyperionLinuxController.h | 13 ++++++----- mission/acs/archive/GPSDefinitions.h | 6 ++--- 5 files changed, 30 insertions(+), 22 deletions(-) diff --git a/bsp_q7s/core/CoreController.cpp b/bsp_q7s/core/CoreController.cpp index e1b48fd2..ac5e5292 100644 --- a/bsp_q7s/core/CoreController.cpp +++ b/bsp_q7s/core/CoreController.cpp @@ -2072,8 +2072,7 @@ ReturnValue_t CoreController::initClockFromTimeFile() { std::string fileName = currMntPrefix + BACKUP_TIME_FILE; std::error_code e; if (sdcMan->isSdCardUsable(std::nullopt) and std::filesystem::exists(fileName, e) and - ((gpsFix == FixMode::UNKNOWN or gpsFix == FixMode::NOT_SEEN) or - not utility::timeSanityCheck())) { + ((gpsFix == FixMode::NOT_SEEN) or not utility::timeSanityCheck())) { ifstream timeFile(fileName); string nextWord; getline(timeFile, nextWord); diff --git a/bsp_q7s/core/CoreController.h b/bsp_q7s/core/CoreController.h index 79224ed2..78925b9c 100644 --- a/bsp_q7s/core/CoreController.h +++ b/bsp_q7s/core/CoreController.h @@ -209,7 +209,7 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe static constexpr MutexIF::TimeoutType TIMEOUT_TYPE = MutexIF::TimeoutType::WAITING; static constexpr uint32_t MUTEX_TIMEOUT = 20; bool enableHkSet = false; - GpsHyperion::FixMode gpsFix = GpsHyperion::FixMode::UNKNOWN; + GpsHyperion::FixMode gpsFix = GpsHyperion::FixMode::NOT_SEEN; // States for SD state machine, which is used in non-blocking mode enum class SdStates { diff --git a/linux/acs/GpsHyperionLinuxController.cpp b/linux/acs/GpsHyperionLinuxController.cpp index a2dbd81b..71967140 100644 --- a/linux/acs/GpsHyperionLinuxController.cpp +++ b/linux/acs/GpsHyperionLinuxController.cpp @@ -58,8 +58,8 @@ ReturnValue_t GpsHyperionLinuxController::checkModeCommand(Mode_t mode, Submode_ PoolReadGuard pg(&gpsSet); gpsSet.setValidity(false, true); // There can't be a fix with a device that is off. - triggerEvent(GpsHyperion::GPS_FIX_CHANGE, gpsSet.fixMode.value, 0); - gpsSet.fixMode.value = 0; + handleFixChangedEvent(GpsHyperion::FixMode::NOT_SEEN); + gpsSet.fixMode.value = GpsHyperion::FixMode::NOT_SEEN; oneShotSwitches.reset(); modeCommanded = false; } @@ -249,11 +249,12 @@ ReturnValue_t GpsHyperionLinuxController::handleCoreTelemetry(bool modeIsSet) { 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) { + if (gps.fix.mode == GpsHyperion::FixMode::FIX_2D or + gps.fix.mode == GpsHyperion::FixMode::FIX_3D) { validFix = true; } newFix = gps.fix.mode; - if (newFix == 0 or newFix == 1) { + if (newFix == GpsHyperion::FixMode::NOT_SEEN or newFix == GpsHyperion::FixMode::NO_FIX) { 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) { @@ -264,9 +265,7 @@ ReturnValue_t GpsHyperionLinuxController::handleCoreTelemetry(bool modeIsSet) { } } if (gpsSet.fixMode.value != newFix) { -#if OBSW_Q7S_EM != 1 - triggerEvent(GpsHyperion::GPS_FIX_CHANGE, gpsSet.fixMode.value, newFix); -#endif + handleFixChangedEvent(newFix); } gpsSet.fixMode = newFix; gpsSet.fixMode.setValid(modeIsSet); @@ -297,7 +296,7 @@ ReturnValue_t GpsHyperionLinuxController::handleCoreTelemetry(bool modeIsSet) { // Negative latitude -> South direction gpsSet.latitude.value = gps.fix.latitude; // As specified in gps.h: Only valid if mode >= 2 - if (gps.fix.mode >= 2) { + if (gps.fix.mode >= GpsHyperion::FixMode::FIX_2D) { latValid = true; } } @@ -306,7 +305,7 @@ ReturnValue_t GpsHyperionLinuxController::handleCoreTelemetry(bool modeIsSet) { // Negative longitude -> West direction gpsSet.longitude.value = gps.fix.longitude; // As specified in gps.h: Only valid if mode >= 2 - if (gps.fix.mode >= 2) { + if (gps.fix.mode >= GpsHyperion::FixMode::FIX_2D) { longValid = true; } } @@ -319,7 +318,7 @@ ReturnValue_t GpsHyperionLinuxController::handleCoreTelemetry(bool modeIsSet) { if (ALTITUDE_SET == (ALTITUDE_SET & gps.set) && std::isfinite(gps.fix.altitude)) { gpsSet.altitude.value = gps.fix.altitude; // As specified in gps.h: Only valid if mode == 3 - if (gps.fix.mode == 3) { + if (gps.fix.mode == GpsHyperion::FixMode::FIX_3D) { altitudeValid = true; } } @@ -430,3 +429,12 @@ void GpsHyperionLinuxController::overwriteTimeIfNotSane(timeval time, bool valid timeInit = true; } } + +void GpsHyperionLinuxController::handleFixChangedEvent(uint8_t newFix) { + if (gainedNewFix.hasTimedOut()) { + triggerEvent(GpsHyperion::GPS_FIX_CHANGE, newFix, fixChangeCounter); + fixChangeCounter = 0; + } + fixChangeCounter++; + gainedNewFix.resetTimer(); +} diff --git a/linux/acs/GpsHyperionLinuxController.h b/linux/acs/GpsHyperionLinuxController.h index 3378ac55..9f63bac5 100644 --- a/linux/acs/GpsHyperionLinuxController.h +++ b/linux/acs/GpsHyperionLinuxController.h @@ -1,14 +1,13 @@ #ifndef MISSION_DEVICES_GPSHYPERIONHANDLER_H_ #define MISSION_DEVICES_GPSHYPERIONHANDLER_H_ +#include +#include +#include +#include #include #include -#include "eive/eventSubsystemIds.h" -#include "fsfw/FSFW.h" -#include "fsfw/controller/ExtendedControllerBase.h" -#include "fsfw/devicehandlers/DeviceHandlerBase.h" - #ifdef FSFW_OSAL_LINUX #include #include @@ -65,6 +64,8 @@ class GpsHyperionLinuxController : public ExtendedControllerBase { const char* currentClientBuf = nullptr; ReadModes readMode = ReadModes::SOCKET; Countdown maxTimeToReachFix = Countdown(MAX_SECONDS_TO_REACH_FIX * 1000); + Countdown gainedNewFix = Countdown(60 * 2 * 1000); + uint32_t fixChangeCounter = 0; bool modeCommanded = false; bool timeInit = false; uint8_t satNotSetCounter = 0; @@ -92,6 +93,8 @@ class GpsHyperionLinuxController : public ExtendedControllerBase { // we set it with the roughly valid time from the GPS. For some reason, NTP might only work // if the time difference between sys time and current time is not too large void overwriteTimeIfNotSane(timeval time, bool validFix); + + void handleFixChangedEvent(uint8_t newFix); }; #endif /* MISSION_DEVICES_GPSHYPERIONHANDLER_H_ */ diff --git a/mission/acs/archive/GPSDefinitions.h b/mission/acs/archive/GPSDefinitions.h index 67169cbc..8feb46a7 100644 --- a/mission/acs/archive/GPSDefinitions.h +++ b/mission/acs/archive/GPSDefinitions.h @@ -7,10 +7,10 @@ namespace GpsHyperion { -enum class FixMode : uint8_t { NOT_SEEN = 0, NO_FIX = 1, FIX_2D = 2, FIX_3D = 3, UNKNOWN = 4 }; +enum FixMode : uint8_t { NOT_SEEN = 0, NO_FIX = 1, FIX_2D = 2, FIX_3D = 3 }; static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::GPS_HANDLER; -//! [EXPORT] : [COMMENT] Fix has changed. P1: Old fix. P2: New fix +//! [EXPORT] : [COMMENT] Fix has changed. P1: New fix. P2: Missed fix changes //! 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix static constexpr Event GPS_FIX_CHANGE = event::makeEvent(SUBSYSTEM_ID, 0, severity::INFO); //! [EXPORT] : [COMMENT] Could not get fix in maximum allowed time. P1: Maximum allowed time @@ -53,8 +53,6 @@ static constexpr uint8_t SKYVIEW_ENTRIES = 6; static constexpr uint8_t MAX_SATELLITES = 30; -enum GpsFixModes : uint8_t { INVALID = 0, NO_FIX = 1, FIX_2D = 2, FIX_3D = 3 }; - } // namespace GpsHyperion class GpsPrimaryDataset : public StaticLocalDataSet { -- 2.34.1 From ffce866ad030e7c52bdc335cebcd757c75861537 Mon Sep 17 00:00:00 2001 From: meggert Date: Thu, 29 Feb 2024 16:09:16 +0100 Subject: [PATCH 02/20] small fix --- linux/acs/GpsHyperionLinuxController.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/linux/acs/GpsHyperionLinuxController.cpp b/linux/acs/GpsHyperionLinuxController.cpp index 71967140..982af4f5 100644 --- a/linux/acs/GpsHyperionLinuxController.cpp +++ b/linux/acs/GpsHyperionLinuxController.cpp @@ -58,6 +58,7 @@ ReturnValue_t GpsHyperionLinuxController::checkModeCommand(Mode_t mode, Submode_ PoolReadGuard pg(&gpsSet); gpsSet.setValidity(false, true); // There can't be a fix with a device that is off. + gainedNewFix.timeOut(); handleFixChangedEvent(GpsHyperion::FixMode::NOT_SEEN); gpsSet.fixMode.value = GpsHyperion::FixMode::NOT_SEEN; oneShotSwitches.reset(); -- 2.34.1 From 7e7d8c249e2d43eb12a3736a640bb26e6f5283c6 Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 1 Mar 2024 10:09:49 +0100 Subject: [PATCH 03/20] between how many beers was this written --- linux/acs/GpsHyperionLinuxController.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/linux/acs/GpsHyperionLinuxController.cpp b/linux/acs/GpsHyperionLinuxController.cpp index 982af4f5..1822fc2e 100644 --- a/linux/acs/GpsHyperionLinuxController.cpp +++ b/linux/acs/GpsHyperionLinuxController.cpp @@ -76,13 +76,16 @@ ReturnValue_t GpsHyperionLinuxController::executeAction(ActionId_t actionId, PoolReadGuard pg(&gpsSet); // Set HK entries invalid gpsSet.setValidity(false, true); - resetCallback(data, size, resetCallbackArgs); + ReturnValue_t result = resetCallback(data, size, resetCallbackArgs); + if (result != returnvalue::OK) { + return result; + } return HasActionsIF::EXECUTION_FINISHED; } return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED; } } - return returnvalue::OK; + return HasActionsIF::INVALID_ACTION_ID; } ReturnValue_t GpsHyperionLinuxController::initializeLocalDataPool( -- 2.34.1 From 8fe7307a5869424d31100fb9ee82dca01c4f4598 Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 1 Mar 2024 10:59:37 +0100 Subject: [PATCH 04/20] remove whatever this is --- linux/acs/GpsHyperionLinuxController.cpp | 20 ++++++-------------- linux/acs/GpsHyperionLinuxController.h | 1 - 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/linux/acs/GpsHyperionLinuxController.cpp b/linux/acs/GpsHyperionLinuxController.cpp index 1822fc2e..d4f04720 100644 --- a/linux/acs/GpsHyperionLinuxController.cpp +++ b/linux/acs/GpsHyperionLinuxController.cpp @@ -44,17 +44,13 @@ LocalPoolDataSetBase *GpsHyperionLinuxController::getDataSetHandle(sid_t sid) { ReturnValue_t GpsHyperionLinuxController::checkModeCommand(Mode_t mode, Submode_t submode, uint32_t *msToReachTheMode) { - if (not modeCommanded) { - if (mode == MODE_ON or mode == MODE_OFF) { - // 5h time to reach fix - *msToReachTheMode = MAX_SECONDS_TO_REACH_FIX; - maxTimeToReachFix.resetTimer(); - modeCommanded = true; - } else if (mode == MODE_NORMAL) { - return HasModesIF::INVALID_MODE; - } + if (mode == MODE_ON) { + maxTimeToReachFix.resetTimer(); + } else if (mode == MODE_NORMAL) { + return HasModesIF::INVALID_MODE; } if (mode == MODE_OFF) { + maxTimeToReachFix.timeOut(); PoolReadGuard pg(&gpsSet); gpsSet.setValidity(false, true); // There can't be a fix with a device that is off. @@ -62,7 +58,6 @@ ReturnValue_t GpsHyperionLinuxController::checkModeCommand(Mode_t mode, Submode_ handleFixChangedEvent(GpsHyperion::FixMode::NOT_SEEN); gpsSet.fixMode.value = GpsHyperion::FixMode::NOT_SEEN; oneShotSwitches.reset(); - modeCommanded = false; } return returnvalue::OK; } @@ -261,10 +256,7 @@ ReturnValue_t GpsHyperionLinuxController::handleCoreTelemetry(bool modeIsSet) { if (newFix == GpsHyperion::FixMode::NOT_SEEN or newFix == GpsHyperion::FixMode::NO_FIX) { 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) { - mode = MODE_OFF; - } - modeCommanded = false; + // ToDo:: maybe pull reset pins here } } } diff --git a/linux/acs/GpsHyperionLinuxController.h b/linux/acs/GpsHyperionLinuxController.h index 9f63bac5..f9039bbd 100644 --- a/linux/acs/GpsHyperionLinuxController.h +++ b/linux/acs/GpsHyperionLinuxController.h @@ -66,7 +66,6 @@ class GpsHyperionLinuxController : public ExtendedControllerBase { Countdown maxTimeToReachFix = Countdown(MAX_SECONDS_TO_REACH_FIX * 1000); Countdown gainedNewFix = Countdown(60 * 2 * 1000); uint32_t fixChangeCounter = 0; - bool modeCommanded = false; bool timeInit = false; uint8_t satNotSetCounter = 0; -- 2.34.1 From b7bf9272880fe75e8507b13aa1092a47a0a184d3 Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 1 Mar 2024 11:31:01 +0100 Subject: [PATCH 05/20] boop --- linux/acs/GpsHyperionLinuxController.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/acs/GpsHyperionLinuxController.cpp b/linux/acs/GpsHyperionLinuxController.cpp index d4f04720..c108a828 100644 --- a/linux/acs/GpsHyperionLinuxController.cpp +++ b/linux/acs/GpsHyperionLinuxController.cpp @@ -51,10 +51,10 @@ ReturnValue_t GpsHyperionLinuxController::checkModeCommand(Mode_t mode, Submode_ } if (mode == MODE_OFF) { maxTimeToReachFix.timeOut(); + gainedNewFix.timeOut(); PoolReadGuard pg(&gpsSet); gpsSet.setValidity(false, true); // There can't be a fix with a device that is off. - gainedNewFix.timeOut(); handleFixChangedEvent(GpsHyperion::FixMode::NOT_SEEN); gpsSet.fixMode.value = GpsHyperion::FixMode::NOT_SEEN; oneShotSwitches.reset(); -- 2.34.1 From 8374a02ae28379413c8d56e80c0d66de758dcf42 Mon Sep 17 00:00:00 2001 From: meggert Date: Wed, 13 Mar 2024 13:54:49 +0100 Subject: [PATCH 06/20] lets wait a bit longer --- bsp_q7s/objectFactory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp_q7s/objectFactory.cpp b/bsp_q7s/objectFactory.cpp index c0dc489a..ee83636c 100644 --- a/bsp_q7s/objectFactory.cpp +++ b/bsp_q7s/objectFactory.cpp @@ -510,7 +510,7 @@ void ObjectFactory::createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF* debugGps = true; #endif RESET_ARGS_GNSS.gpioComIF = gpioComIF; - RESET_ARGS_GNSS.waitPeriodMs = 5; + RESET_ARGS_GNSS.waitPeriodMs = 10 * 1e6; auto gpsCtrl = new GpsHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, enableHkSets, debugGps); gpsCtrl->setResetPinTriggerFunction(gps::triggerGpioResetPin, &RESET_ARGS_GNSS); -- 2.34.1 From 3c869e521505a11aae2bc9215c7568f77ecf8228 Mon Sep 17 00:00:00 2001 From: meggert Date: Wed, 13 Mar 2024 16:08:21 +0100 Subject: [PATCH 07/20] idk what i am doing here --- linux/acs/GpsHyperionLinuxController.cpp | 20 +++++++++++++++++++- mission/acs/archive/GPSDefinitions.h | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/linux/acs/GpsHyperionLinuxController.cpp b/linux/acs/GpsHyperionLinuxController.cpp index c108a828..a9381ce4 100644 --- a/linux/acs/GpsHyperionLinuxController.cpp +++ b/linux/acs/GpsHyperionLinuxController.cpp @@ -254,9 +254,27 @@ ReturnValue_t GpsHyperionLinuxController::handleCoreTelemetry(bool modeIsSet) { } newFix = gps.fix.mode; if (newFix == GpsHyperion::FixMode::NOT_SEEN or newFix == GpsHyperion::FixMode::NO_FIX) { - if (modeCommanded and maxTimeToReachFix.hasTimedOut()) { + if (maxTimeToReachFix.hasTimedOut()) { // We are supposed to be on and functioning, but no fix was found // ToDo:: maybe pull reset pins here + if (resetCallback != nullptr) { + PoolReadGuard pg(&gpsSet); + // Set HK entries invalid + gpsSet.setValidity(false, true); + ReturnValue_t result = resetCallback(0, 1, resetCallbackArgs); + if (result != returnvalue::OK) { + return result; + } + } + if (resetCallback != nullptr) { + PoolReadGuard pg(&gpsSet); + // Set HK entries invalid + gpsSet.setValidity(false, true); + ReturnValue_t result = resetCallback(1, 1, resetCallbackArgs); + if (result != returnvalue::OK) { + return result; + } + } } } } diff --git a/mission/acs/archive/GPSDefinitions.h b/mission/acs/archive/GPSDefinitions.h index 8feb46a7..0f597397 100644 --- a/mission/acs/archive/GPSDefinitions.h +++ b/mission/acs/archive/GPSDefinitions.h @@ -15,7 +15,7 @@ static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::GPS_HANDLER; static constexpr Event GPS_FIX_CHANGE = event::makeEvent(SUBSYSTEM_ID, 0, severity::INFO); //! [EXPORT] : [COMMENT] Could not get fix in maximum allowed time. P1: Maximum allowed time //! to get a fix after the GPS was switched on. -static constexpr Event CANT_GET_FIX = event::makeEvent(SUBSYSTEM_ID, 1, severity::LOW); +static constexpr Event CANT_GET_FIX = event::makeEvent(SUBSYSTEM_ID, 1, severity::MEDIUM); static constexpr DeviceCommandId_t GPS_REPLY = 0; static constexpr DeviceCommandId_t TRIGGER_RESET_PIN_GNSS = 5; -- 2.34.1 From 7a43e1bc67ef960228e207e299d1bc142bb34161 Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 15 Mar 2024 14:54:16 +0100 Subject: [PATCH 08/20] better but still not fixed --- linux/acs/GpsHyperionLinuxController.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/linux/acs/GpsHyperionLinuxController.cpp b/linux/acs/GpsHyperionLinuxController.cpp index a9381ce4..8031ba46 100644 --- a/linux/acs/GpsHyperionLinuxController.cpp +++ b/linux/acs/GpsHyperionLinuxController.cpp @@ -256,23 +256,17 @@ ReturnValue_t GpsHyperionLinuxController::handleCoreTelemetry(bool modeIsSet) { if (newFix == GpsHyperion::FixMode::NOT_SEEN or newFix == GpsHyperion::FixMode::NO_FIX) { if (maxTimeToReachFix.hasTimedOut()) { // We are supposed to be on and functioning, but no fix was found - // ToDo:: maybe pull reset pins here + // Set HK entries invalid + PoolReadGuard pg(&gpsSet); + gpsSet.setValidity(false, true); if (resetCallback != nullptr) { - PoolReadGuard pg(&gpsSet); - // Set HK entries invalid - gpsSet.setValidity(false, true); ReturnValue_t result = resetCallback(0, 1, resetCallbackArgs); if (result != returnvalue::OK) { - return result; + // ToDo: Trigger Event } - } - if (resetCallback != nullptr) { - PoolReadGuard pg(&gpsSet); - // Set HK entries invalid - gpsSet.setValidity(false, true); - ReturnValue_t result = resetCallback(1, 1, resetCallbackArgs); + result = resetCallback(1, 1, resetCallbackArgs); if (result != returnvalue::OK) { - return result; + // ToDo: Trigger Event } } } -- 2.34.1 From 18d3c8fa91d805b6edf81bd98c37620eb489fd40 Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 18 Mar 2024 17:20:40 +0100 Subject: [PATCH 09/20] not sure why this was ever archived --- {mission/acs/archive => linux/acs}/GPSDefinitions.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {mission/acs/archive => linux/acs}/GPSDefinitions.h (100%) diff --git a/mission/acs/archive/GPSDefinitions.h b/linux/acs/GPSDefinitions.h similarity index 100% rename from mission/acs/archive/GPSDefinitions.h rename to linux/acs/GPSDefinitions.h -- 2.34.1 From 0cbac07f15c1f4fda85897399652558027cf0e4a Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 18 Mar 2024 17:20:55 +0100 Subject: [PATCH 10/20] this might work --- linux/acs/GpsHyperionLinuxController.cpp | 11 ++++++----- linux/acs/GpsHyperionLinuxController.h | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/linux/acs/GpsHyperionLinuxController.cpp b/linux/acs/GpsHyperionLinuxController.cpp index 8031ba46..5fa2d344 100644 --- a/linux/acs/GpsHyperionLinuxController.cpp +++ b/linux/acs/GpsHyperionLinuxController.cpp @@ -257,16 +257,17 @@ ReturnValue_t GpsHyperionLinuxController::handleCoreTelemetry(bool modeIsSet) { if (maxTimeToReachFix.hasTimedOut()) { // We are supposed to be on and functioning, but no fix was found // Set HK entries invalid - PoolReadGuard pg(&gpsSet); gpsSet.setValidity(false, true); if (resetCallback != nullptr) { - ReturnValue_t result = resetCallback(0, 1, resetCallbackArgs); + uint8_t chip = GpsHyperion::GnssChip::A_SIDE; + ReturnValue_t result = resetCallback(&chip, 1, resetCallbackArgs); if (result != returnvalue::OK) { - // ToDo: Trigger Event + triggerEvent(GpsHyperion::RESET_FAIL, chip); } - result = resetCallback(1, 1, resetCallbackArgs); + chip = GpsHyperion::GnssChip::B_SIDE; + result = resetCallback(&chip, 1, resetCallbackArgs); if (result != returnvalue::OK) { - // ToDo: Trigger Event + triggerEvent(GpsHyperion::RESET_FAIL, chip); } } } diff --git a/linux/acs/GpsHyperionLinuxController.h b/linux/acs/GpsHyperionLinuxController.h index f9039bbd..00a8218f 100644 --- a/linux/acs/GpsHyperionLinuxController.h +++ b/linux/acs/GpsHyperionLinuxController.h @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #ifdef FSFW_OSAL_LINUX -- 2.34.1 From f2f856e2275980d2685e82877e191027ed29325e Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 18 Mar 2024 17:21:08 +0100 Subject: [PATCH 11/20] cleanup --- bsp_q7s/core/CoreController.h | 2 +- dummies/GpsCtrlDummy.h | 2 +- dummies/GpsDhbDummy.cpp | 2 +- linux/acs/GPSDefinitions.h | 4 ++++ mission/controller/acs/SensorValues.h | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bsp_q7s/core/CoreController.h b/bsp_q7s/core/CoreController.h index 9c053008..6827a392 100644 --- a/bsp_q7s/core/CoreController.h +++ b/bsp_q7s/core/CoreController.h @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/dummies/GpsCtrlDummy.h b/dummies/GpsCtrlDummy.h index 18b990fb..b64647b1 100644 --- a/dummies/GpsCtrlDummy.h +++ b/dummies/GpsCtrlDummy.h @@ -2,7 +2,7 @@ #define DUMMIES_GPSCTRLDUMMY_H_ #include -#include +#include class GpsCtrlDummy : public ExtendedControllerBase { public: diff --git a/dummies/GpsDhbDummy.cpp b/dummies/GpsDhbDummy.cpp index 4e385ec5..73addb3c 100644 --- a/dummies/GpsDhbDummy.cpp +++ b/dummies/GpsDhbDummy.cpp @@ -1,5 +1,5 @@ #include -#include +#include GpsDhbDummy::GpsDhbDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie) : DeviceHandlerBase(objectId, comif, comCookie) {} diff --git a/linux/acs/GPSDefinitions.h b/linux/acs/GPSDefinitions.h index 0f597397..9fb9e31d 100644 --- a/linux/acs/GPSDefinitions.h +++ b/linux/acs/GPSDefinitions.h @@ -9,6 +9,8 @@ namespace GpsHyperion { enum FixMode : uint8_t { NOT_SEEN = 0, NO_FIX = 1, FIX_2D = 2, FIX_3D = 3 }; +enum GnssChip : uint8_t { A_SIDE = 0, B_SIDE = 1 }; + static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::GPS_HANDLER; //! [EXPORT] : [COMMENT] Fix has changed. P1: New fix. P2: Missed fix changes //! 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix @@ -16,6 +18,8 @@ static constexpr Event GPS_FIX_CHANGE = event::makeEvent(SUBSYSTEM_ID, 0, severi //! [EXPORT] : [COMMENT] Could not get fix in maximum allowed time. P1: Maximum allowed time //! to get a fix after the GPS was switched on. static constexpr Event CANT_GET_FIX = event::makeEvent(SUBSYSTEM_ID, 1, severity::MEDIUM); +//! [EXPORT] : [COMMENT] Failed to reset an GNNS Device. P1: Board-Side. +static constexpr Event RESET_FAIL = event::makeEvent(SUBSYSTEM_ID, 2, severity::HIGH); static constexpr DeviceCommandId_t GPS_REPLY = 0; static constexpr DeviceCommandId_t TRIGGER_RESET_PIN_GNSS = 5; diff --git a/mission/controller/acs/SensorValues.h b/mission/controller/acs/SensorValues.h index d7da66c0..69761666 100644 --- a/mission/controller/acs/SensorValues.h +++ b/mission/controller/acs/SensorValues.h @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include #include -- 2.34.1 From 2057ab9c10b148f3a84de9d62fe3f2e5cc6f5ccc Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 9 Apr 2024 09:58:05 +0200 Subject: [PATCH 12/20] some cleanup --- linux/acs/GpsHyperionLinuxController.cpp | 96 +++++++++++++----------- 1 file changed, 53 insertions(+), 43 deletions(-) diff --git a/linux/acs/GpsHyperionLinuxController.cpp b/linux/acs/GpsHyperionLinuxController.cpp index 5fa2d344..058c68ed 100644 --- a/linux/acs/GpsHyperionLinuxController.cpp +++ b/linux/acs/GpsHyperionLinuxController.cpp @@ -54,7 +54,7 @@ ReturnValue_t GpsHyperionLinuxController::checkModeCommand(Mode_t mode, Submode_ gainedNewFix.timeOut(); PoolReadGuard pg(&gpsSet); gpsSet.setValidity(false, true); - // There can't be a fix with a device that is off. + // The ctrl is off, so it cannot detect the data from the devices. handleFixChangedEvent(GpsHyperion::FixMode::NOT_SEEN); gpsSet.fixMode.value = GpsHyperion::FixMode::NOT_SEEN; oneShotSwitches.reset(); @@ -215,15 +215,9 @@ ReturnValue_t GpsHyperionLinuxController::handleGpsReadData() { bool modeIsSet = true; if (MODE_SET != (MODE_SET & gps.set)) { if (mode != MODE_OFF) { - if (maxTimeToReachFix.hasTimedOut() and oneShotSwitches.cantGetFixSwitch) { - sif::warning << "GpsHyperionLinuxController: No mode could be set in allowed " - << maxTimeToReachFix.getTimeoutMs() / 1000 << " seconds" << std::endl; - triggerEvent(GpsHyperion::CANT_GET_FIX, maxTimeToReachFix.getTimeoutMs()); - oneShotSwitches.cantGetFixSwitch = false; - } modeIsSet = false; } else { - // GPS device is off anyway, so do other handling + // GPS ctrl is off anyway, so do other handling return returnvalue::FAILED; } } @@ -253,21 +247,28 @@ ReturnValue_t GpsHyperionLinuxController::handleCoreTelemetry(bool modeIsSet) { validFix = true; } newFix = gps.fix.mode; - if (newFix == GpsHyperion::FixMode::NOT_SEEN or newFix == GpsHyperion::FixMode::NO_FIX) { + if (not validFix) { if (maxTimeToReachFix.hasTimedOut()) { // We are supposed to be on and functioning, but no fix was found // Set HK entries invalid gpsSet.setValidity(false, true); - if (resetCallback != nullptr) { - uint8_t chip = GpsHyperion::GnssChip::A_SIDE; - ReturnValue_t result = resetCallback(&chip, 1, resetCallbackArgs); - if (result != returnvalue::OK) { - triggerEvent(GpsHyperion::RESET_FAIL, chip); - } - chip = GpsHyperion::GnssChip::B_SIDE; - result = resetCallback(&chip, 1, resetCallbackArgs); - if (result != returnvalue::OK) { - triggerEvent(GpsHyperion::RESET_FAIL, chip); + if (oneShotSwitches.cantGetFixSwitch) { + sif::warning << "GpsHyperionLinuxController: No fix detected in allowed " + << maxTimeToReachFix.getTimeoutMs() / 1000 << " seconds" << std::endl; + triggerEvent(GpsHyperion::CANT_GET_FIX, maxTimeToReachFix.getTimeoutMs()); + oneShotSwitches.cantGetFixSwitch = false; + // Try resetting the devices + if (resetCallback != nullptr) { + uint8_t chip = GpsHyperion::GnssChip::A_SIDE; + ReturnValue_t result = resetCallback(&chip, 1, resetCallbackArgs); + if (result != returnvalue::OK) { + triggerEvent(GpsHyperion::RESET_FAIL, chip); + } + chip = GpsHyperion::GnssChip::B_SIDE; + result = resetCallback(&chip, 1, resetCallbackArgs); + if (result != returnvalue::OK) { + triggerEvent(GpsHyperion::RESET_FAIL, chip); + } } } } @@ -290,9 +291,12 @@ ReturnValue_t GpsHyperionLinuxController::handleCoreTelemetry(bool modeIsSet) { } satNotSetCounter = 0; } else { - satNotSetCounter++; - if (gpsSet.satInUse.isValid() and satNotSetCounter >= 10) { + if (satNotSetCounter < 10) { + satNotSetCounter++; + } else { + gpsSet.satInUse.value = 0; gpsSet.satInUse.setValid(false); + gpsSet.satInView.value = 0; gpsSet.satInView.setValid(false); } } @@ -300,22 +304,24 @@ ReturnValue_t GpsHyperionLinuxController::handleCoreTelemetry(bool modeIsSet) { // LATLON is set for every message, no need for a counter bool latValid = false; bool longValid = false; - if (LATLON_SET == (LATLON_SET & gps.set)) { - if (std::isfinite(gps.fix.latitude)) { - // Negative latitude -> South direction - gpsSet.latitude.value = gps.fix.latitude; - // As specified in gps.h: Only valid if mode >= 2 - if (gps.fix.mode >= GpsHyperion::FixMode::FIX_2D) { - latValid = true; + if (modeIsSet) { + if (LATLON_SET == (LATLON_SET & gps.set)) { + if (std::isfinite(gps.fix.latitude)) { + // Negative latitude -> South direction + gpsSet.latitude.value = gps.fix.latitude; + // As specified in gps.h: Only valid if mode >= 2 + if (gps.fix.mode >= GpsHyperion::FixMode::FIX_2D) { + latValid = true; + } } - } - if (std::isfinite(gps.fix.longitude)) { - // Negative longitude -> West direction - gpsSet.longitude.value = gps.fix.longitude; - // As specified in gps.h: Only valid if mode >= 2 - if (gps.fix.mode >= GpsHyperion::FixMode::FIX_2D) { - longValid = true; + if (std::isfinite(gps.fix.longitude)) { + // Negative longitude -> West direction + gpsSet.longitude.value = gps.fix.longitude; + // As specified in gps.h: Only valid if mode >= 2 + if (gps.fix.mode >= GpsHyperion::FixMode::FIX_2D) { + longValid = true; + } } } } @@ -324,20 +330,24 @@ ReturnValue_t GpsHyperionLinuxController::handleCoreTelemetry(bool modeIsSet) { // ALTITUDE is set for every message, no need for a counter bool altitudeValid = false; - if (ALTITUDE_SET == (ALTITUDE_SET & gps.set) && std::isfinite(gps.fix.altitude)) { - gpsSet.altitude.value = gps.fix.altitude; - // As specified in gps.h: Only valid if mode == 3 - if (gps.fix.mode == GpsHyperion::FixMode::FIX_3D) { - altitudeValid = true; + if (modeIsSet) { + if (ALTITUDE_SET == (ALTITUDE_SET & gps.set) && std::isfinite(gps.fix.altitude)) { + gpsSet.altitude.value = gps.fix.altitude; + // As specified in gps.h: Only valid if mode == 3 + if (gps.fix.mode == GpsHyperion::FixMode::FIX_3D) { + altitudeValid = true; + } } } gpsSet.altitude.setValid(altitudeValid); // SPEED is set for every message, no need for a counter bool speedValid = false; - if (SPEED_SET == (SPEED_SET & gps.set) && std::isfinite(gps.fix.speed)) { - gpsSet.speed.value = gps.fix.speed; - speedValid = true; + if (modeIsSet) { + if (SPEED_SET == (SPEED_SET & gps.set) && std::isfinite(gps.fix.speed)) { + gpsSet.speed.value = gps.fix.speed; + speedValid = true; + } } gpsSet.speed.setValid(speedValid); -- 2.34.1 From f3d4e09487ca346f1348a4db0865feca34abee70 Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 9 Apr 2024 09:59:21 +0200 Subject: [PATCH 13/20] improved event comment --- linux/acs/GPSDefinitions.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux/acs/GPSDefinitions.h b/linux/acs/GPSDefinitions.h index 9fb9e31d..82025a22 100644 --- a/linux/acs/GPSDefinitions.h +++ b/linux/acs/GPSDefinitions.h @@ -15,8 +15,8 @@ static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::GPS_HANDLER; //! [EXPORT] : [COMMENT] Fix has changed. P1: New fix. P2: Missed fix changes //! 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix static constexpr Event GPS_FIX_CHANGE = event::makeEvent(SUBSYSTEM_ID, 0, severity::INFO); -//! [EXPORT] : [COMMENT] Could not get fix in maximum allowed time. P1: Maximum allowed time -//! to get a fix after the GPS was switched on. +//! [EXPORT] : [COMMENT] Could not get fix in maximum allowed time. Trying to reset both GNSS +//! devices. P1: Maximum allowed time to get a fix after the GPS was switched on. static constexpr Event CANT_GET_FIX = event::makeEvent(SUBSYSTEM_ID, 1, severity::MEDIUM); //! [EXPORT] : [COMMENT] Failed to reset an GNNS Device. P1: Board-Side. static constexpr Event RESET_FAIL = event::makeEvent(SUBSYSTEM_ID, 2, severity::HIGH); -- 2.34.1 From d4eb124cdf52b80e48a02088281a49af063af134 Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 9 Apr 2024 11:26:55 +0200 Subject: [PATCH 14/20] missing reset --- linux/acs/GpsHyperionLinuxController.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/linux/acs/GpsHyperionLinuxController.cpp b/linux/acs/GpsHyperionLinuxController.cpp index 058c68ed..9b93b22b 100644 --- a/linux/acs/GpsHyperionLinuxController.cpp +++ b/linux/acs/GpsHyperionLinuxController.cpp @@ -245,6 +245,7 @@ ReturnValue_t GpsHyperionLinuxController::handleCoreTelemetry(bool modeIsSet) { if (gps.fix.mode == GpsHyperion::FixMode::FIX_2D or gps.fix.mode == GpsHyperion::FixMode::FIX_3D) { validFix = true; + maxTimeToReachFix.resetTimer(); } newFix = gps.fix.mode; if (not validFix) { -- 2.34.1 From 887f1654845ccb4357269ab5d2a2917c1c02a701 Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 9 Apr 2024 13:29:42 +0200 Subject: [PATCH 15/20] ye maybe dont hold the reset pin for 3h --- bsp_q7s/objectFactory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp_q7s/objectFactory.cpp b/bsp_q7s/objectFactory.cpp index ee83636c..0f61a51d 100644 --- a/bsp_q7s/objectFactory.cpp +++ b/bsp_q7s/objectFactory.cpp @@ -510,7 +510,7 @@ void ObjectFactory::createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF* debugGps = true; #endif RESET_ARGS_GNSS.gpioComIF = gpioComIF; - RESET_ARGS_GNSS.waitPeriodMs = 10 * 1e6; + RESET_ARGS_GNSS.waitPeriodMs = 10 * 1e3; auto gpsCtrl = new GpsHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, enableHkSets, debugGps); gpsCtrl->setResetPinTriggerFunction(gps::triggerGpioResetPin, &RESET_ARGS_GNSS); -- 2.34.1 From 0f3eeb42d638d4e8e6811c06a2180fb7070bf05d Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 9 Apr 2024 13:30:22 +0200 Subject: [PATCH 16/20] 15 should be enough --- linux/acs/GpsHyperionLinuxController.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux/acs/GpsHyperionLinuxController.h b/linux/acs/GpsHyperionLinuxController.h index 00a8218f..b8c3ed7a 100644 --- a/linux/acs/GpsHyperionLinuxController.h +++ b/linux/acs/GpsHyperionLinuxController.h @@ -23,8 +23,8 @@ */ class GpsHyperionLinuxController : public ExtendedControllerBase { public: - // 30 minutes - static constexpr uint32_t MAX_SECONDS_TO_REACH_FIX = 60 * 30; + // 15 minutes + static constexpr uint32_t MAX_SECONDS_TO_REACH_FIX = 60 * 15; enum ReadModes { SHM = 0, SOCKET = 1 }; -- 2.34.1 From 1c36f36b1fec206bd30a1abb91443c1338563af5 Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 9 Apr 2024 13:31:27 +0200 Subject: [PATCH 17/20] this seems better --- linux/acs/GpsHyperionLinuxController.cpp | 52 ++++++++++++------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/linux/acs/GpsHyperionLinuxController.cpp b/linux/acs/GpsHyperionLinuxController.cpp index 9b93b22b..4015ee4f 100644 --- a/linux/acs/GpsHyperionLinuxController.cpp +++ b/linux/acs/GpsHyperionLinuxController.cpp @@ -248,38 +248,38 @@ ReturnValue_t GpsHyperionLinuxController::handleCoreTelemetry(bool modeIsSet) { maxTimeToReachFix.resetTimer(); } newFix = gps.fix.mode; - if (not validFix) { - if (maxTimeToReachFix.hasTimedOut()) { - // We are supposed to be on and functioning, but no fix was found - // Set HK entries invalid - gpsSet.setValidity(false, true); - if (oneShotSwitches.cantGetFixSwitch) { - sif::warning << "GpsHyperionLinuxController: No fix detected in allowed " - << maxTimeToReachFix.getTimeoutMs() / 1000 << " seconds" << std::endl; - triggerEvent(GpsHyperion::CANT_GET_FIX, maxTimeToReachFix.getTimeoutMs()); - oneShotSwitches.cantGetFixSwitch = false; - // Try resetting the devices - if (resetCallback != nullptr) { - uint8_t chip = GpsHyperion::GnssChip::A_SIDE; - ReturnValue_t result = resetCallback(&chip, 1, resetCallbackArgs); - if (result != returnvalue::OK) { - triggerEvent(GpsHyperion::RESET_FAIL, chip); - } - chip = GpsHyperion::GnssChip::B_SIDE; - result = resetCallback(&chip, 1, resetCallbackArgs); - if (result != returnvalue::OK) { - triggerEvent(GpsHyperion::RESET_FAIL, chip); - } - } - } - } - } } 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 (maxTimeToReachFix.hasTimedOut()) { + // Set HK entries invalid + gpsSet.setValidity(false, true); + if (oneShotSwitches.cantGetFixSwitch) { + sif::warning << "GpsHyperionLinuxController: No fix detected in allowed " + << maxTimeToReachFix.getTimeoutMs() / 1000 << " seconds" << std::endl; + triggerEvent(GpsHyperion::CANT_GET_FIX, maxTimeToReachFix.getTimeoutMs()); + oneShotSwitches.cantGetFixSwitch = false; + // Try resetting the devices + if (resetCallback != nullptr) { + uint8_t chip = GpsHyperion::GnssChip::A_SIDE; + ReturnValue_t result = resetCallback(&chip, 1, resetCallbackArgs); + if (result != returnvalue::OK) { + triggerEvent(GpsHyperion::RESET_FAIL, chip); + } + chip = GpsHyperion::GnssChip::B_SIDE; + result = resetCallback(&chip, 1, resetCallbackArgs); + if (result != returnvalue::OK) { + triggerEvent(GpsHyperion::RESET_FAIL, chip); + } + } + } + } + } // 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) -- 2.34.1 From 427c53df8c8074be79eb6d740fc531087af6ae16 Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 9 Apr 2024 14:04:20 +0200 Subject: [PATCH 18/20] better --- linux/acs/GpsHyperionLinuxController.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux/acs/GpsHyperionLinuxController.cpp b/linux/acs/GpsHyperionLinuxController.cpp index 4015ee4f..946c5c0a 100644 --- a/linux/acs/GpsHyperionLinuxController.cpp +++ b/linux/acs/GpsHyperionLinuxController.cpp @@ -454,6 +454,8 @@ void GpsHyperionLinuxController::handleFixChangedEvent(uint8_t newFix) { if (gainedNewFix.hasTimedOut()) { triggerEvent(GpsHyperion::GPS_FIX_CHANGE, newFix, fixChangeCounter); fixChangeCounter = 0; + gainedNewFix.resetTimer(); + return; } fixChangeCounter++; gainedNewFix.resetTimer(); -- 2.34.1 From 7a12c1c8fef7fc671470b1345708613f49050fa4 Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 9 Apr 2024 14:43:47 +0200 Subject: [PATCH 19/20] the first fix should trigger an event --- linux/acs/GpsHyperionLinuxController.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/linux/acs/GpsHyperionLinuxController.cpp b/linux/acs/GpsHyperionLinuxController.cpp index 946c5c0a..54198ca9 100644 --- a/linux/acs/GpsHyperionLinuxController.cpp +++ b/linux/acs/GpsHyperionLinuxController.cpp @@ -46,6 +46,7 @@ ReturnValue_t GpsHyperionLinuxController::checkModeCommand(Mode_t mode, Submode_ uint32_t *msToReachTheMode) { if (mode == MODE_ON) { maxTimeToReachFix.resetTimer(); + gainedNewFix.timeOut(); } else if (mode == MODE_NORMAL) { return HasModesIF::INVALID_MODE; } -- 2.34.1 From 7b53275d61cd2c895d53303f3b126d176c86bb60 Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 9 Apr 2024 15:06:23 +0200 Subject: [PATCH 20/20] changelog --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a79f1cf9..4505af87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,17 @@ will consitute of a breaking change warranting a new major release: - Reverted lower OP limit of `PLOC` to -10°C. - All pointing laws are now allowed to use the `MEKF` per default. +- The `GPS Controller` does not set itself to `OFF` anymore, if it has not detected a valid fix for + some time. Instead it attempts to reset both GNSS devices once. +- The maximum time to reach a fix is shortened from 30min to 15min. +- The time the reset pin of the GNSS devices is pulled is prolonged from 5ms to 10s. +- A `GPS FIX HAS CHANGED` is now only triggered if no fix change has been detected within the past + 2min. This means, this event might be thrown with a 2min delay. It is instantly thrown, if the mode + of the controller is changed. As arguments it now displays the new fix and the numer of fix changes + missed. +- The number of satellites seen and used is reset to 0, in case they are set to invalid. +- Altitude, latitude and longitude messages are not checked anymore, in case the mode message was + already invalid. # [v7.7.4] 2024-03-21 -- 2.34.1