From 32992606533fde0f481d707b2a95d036366bd09d Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 4 Apr 2023 20:59:25 +0200 Subject: [PATCH] fix GPS HK enabling --- CHANGELOG.md | 5 +++++ bsp_q7s/core/ObjectFactory.cpp | 7 ++++--- bsp_q7s/core/ObjectFactory.h | 2 +- linux/acs/GpsHyperionLinuxController.cpp | 4 +++- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 370c9aff..2e678fff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,11 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +## Changed + +- Adapted HK data rates to new table for LEOP SAFE mode. +- GPS controller HK is now generated periodically as well. + # [v1.43.1] 2023-04-04 ## Fixed diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 3b71c6cd..72c042c1 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -360,7 +360,8 @@ void ObjectFactory::createAcsBoardGpios(GpioCookie& cookie) { } void ObjectFactory::createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF* gpioComIF, - SerialComIF* uartComIF, PowerSwitchIF& pwrSwitcher) { + SerialComIF* uartComIF, PowerSwitchIF& pwrSwitcher, + bool enableHkSets) { using namespace gpio; GpioCookie* gpioCookieAcsBoard = new GpioCookie(); createAcsBoardGpios(*gpioCookieAcsBoard); @@ -514,8 +515,8 @@ void ObjectFactory::createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF* #endif RESET_ARGS_GNSS.gpioComIF = gpioComIF; RESET_ARGS_GNSS.waitPeriodMs = 100; - auto gpsCtrl = - new GpsHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, debugGps); + auto gpsCtrl = new GpsHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, + enableHkSets, debugGps); gpsCtrl->setResetPinTriggerFunction(gps::triggerGpioResetPin, &RESET_ARGS_GNSS); ObjectFactory::createAcsBoardAssy(pwrSwitcher, assemblyChildren, gpsCtrl, gpioComIF); diff --git a/bsp_q7s/core/ObjectFactory.h b/bsp_q7s/core/ObjectFactory.h index b7380f2a..9daa4d01 100644 --- a/bsp_q7s/core/ObjectFactory.h +++ b/bsp_q7s/core/ObjectFactory.h @@ -62,7 +62,7 @@ void createTmpComponents(); ReturnValue_t createRadSensorComponent(LinuxLibgpioIF* gpioComIF, Stack5VHandler& handler); void createAcsBoardGpios(GpioCookie& cookie); void createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF* gpioComIF, SerialComIF* uartComIF, - PowerSwitchIF& pwrSwitcher); + PowerSwitchIF& pwrSwitcher, bool enableHkSets); void createHeaterComponents(GpioIF* gpioIF, PowerSwitchIF* pwrSwitcher, HealthTableIF* healthTable, HeaterHandler*& heaterHandler); void createImtqComponents(PowerSwitchIF* pwrSwitcher, bool enableHkSets); diff --git a/linux/acs/GpsHyperionLinuxController.cpp b/linux/acs/GpsHyperionLinuxController.cpp index 0bd4e3df..900de0aa 100644 --- a/linux/acs/GpsHyperionLinuxController.cpp +++ b/linux/acs/GpsHyperionLinuxController.cpp @@ -19,7 +19,9 @@ GpsHyperionLinuxController::GpsHyperionLinuxController(object_id_t objectId, object_id_t parentId, bool enableHkSets, bool debugHyperionGps) - : ExtendedControllerBase(objectId), gpsSet(this), enableHkSets(enableHkSets), + : ExtendedControllerBase(objectId), + gpsSet(this), + enableHkSets(enableHkSets), debugHyperionGps(debugHyperionGps) {} GpsHyperionLinuxController::~GpsHyperionLinuxController() {