From ee51b5428d41c6fab7125975138c4024f873564a Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 9 Feb 2023 16:13:29 +0100 Subject: [PATCH 01/11] disable TCS ctrl for hosted build --- bsp_hosted/scheduling.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bsp_hosted/scheduling.cpp b/bsp_hosted/scheduling.cpp index 843b2892..4e9f6b8c 100644 --- a/bsp_hosted/scheduling.cpp +++ b/bsp_hosted/scheduling.cpp @@ -154,10 +154,11 @@ void scheduling::initTasks() { scheduling::printAddObjectError("Core controller dummy", objects::CORE_CONTROLLER); } - result = thermalTask->addComponent(objects::THERMAL_CONTROLLER); - if (result != returnvalue::OK) { - scheduling::printAddObjectError("THERMAL_CONTROLLER", objects::THERMAL_CONTROLLER); - } + // Disabled until more stable + //result = thermalTask->addComponent(objects::THERMAL_CONTROLLER); + //if (result != returnvalue::OK) { + // scheduling::printAddObjectError("THERMAL_CONTROLLER", objects::THERMAL_CONTROLLER); + //} FixedTimeslotTaskIF* pstTask = factory->createFixedTimeslotTask( "DUMMY_PST", 75, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc); From d01308f0ba9716dadf1530c3da4b0504d2c5ecb8 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 9 Feb 2023 17:17:58 +0100 Subject: [PATCH 02/11] reduced number of errors for hosted build --- bsp_hosted/ObjectFactory.cpp | 18 ------------------ bsp_hosted/fsfwconfig/returnvalues/classIds.h | 2 +- bsp_hosted/scheduling.cpp | 8 ++++---- dummies/ImtqDummy.cpp | 2 +- dummies/TemperatureSensorInserter.cpp | 9 +++++---- dummies/TemperatureSensorInserter.h | 5 ++--- dummies/helpers.cpp | 3 ++- fsfw | 2 +- mission/controller/ThermalController.cpp | 2 +- 9 files changed, 17 insertions(+), 34 deletions(-) diff --git a/bsp_hosted/ObjectFactory.cpp b/bsp_hosted/ObjectFactory.cpp index cc955148..f0308ee5 100644 --- a/bsp_hosted/ObjectFactory.cpp +++ b/bsp_hosted/ObjectFactory.cpp @@ -9,7 +9,6 @@ #include #include "OBSWConfig.h" -#include "devConf.h" #include "fsfw/platform.h" #include "fsfw_tests/integration/task/TestTask.h" @@ -22,30 +21,13 @@ #include "fsfw/osal/common/TcpTmTcServer.h" #endif -#include - #if OBSW_ADD_TEST_CODE == 1 #include #endif #include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../dummies/TemperatureSensorInserter.h" #include "dummies/helpers.h" #include "mission/utility/GlobalConfigHandler.h" diff --git a/bsp_hosted/fsfwconfig/returnvalues/classIds.h b/bsp_hosted/fsfwconfig/returnvalues/classIds.h index d7c66f4c..16e6eab3 100644 --- a/bsp_hosted/fsfwconfig/returnvalues/classIds.h +++ b/bsp_hosted/fsfwconfig/returnvalues/classIds.h @@ -13,7 +13,7 @@ namespace CLASS_ID { enum { CLASS_ID_START = COMMON_CLASS_ID_END, - CLASS_ID_END // [EXPORT] : [END] + CLASS_ID_END // [EXPORT] : [END] }; } diff --git a/bsp_hosted/scheduling.cpp b/bsp_hosted/scheduling.cpp index 4e9f6b8c..cb97a27f 100644 --- a/bsp_hosted/scheduling.cpp +++ b/bsp_hosted/scheduling.cpp @@ -155,10 +155,10 @@ void scheduling::initTasks() { } // Disabled until more stable - //result = thermalTask->addComponent(objects::THERMAL_CONTROLLER); - //if (result != returnvalue::OK) { - // scheduling::printAddObjectError("THERMAL_CONTROLLER", objects::THERMAL_CONTROLLER); - //} + // result = thermalTask->addComponent(objects::THERMAL_CONTROLLER); + // if (result != returnvalue::OK) { + // scheduling::printAddObjectError("THERMAL_CONTROLLER", objects::THERMAL_CONTROLLER); + // } FixedTimeslotTaskIF* pstTask = factory->createFixedTimeslotTask( "DUMMY_PST", 75, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc); diff --git a/dummies/ImtqDummy.cpp b/dummies/ImtqDummy.cpp index bf8bcb1b..44a7e377 100644 --- a/dummies/ImtqDummy.cpp +++ b/dummies/ImtqDummy.cpp @@ -43,5 +43,5 @@ ReturnValue_t ImtqDummy::initializeLocalDataPool(localpool::DataPool &localDataP localDataPoolMap.emplace(IMTQ::ACTUATION_CAL_STATUS, new PoolEntry({0})); localDataPoolMap.emplace(IMTQ::MTM_RAW, new PoolEntry({0.12, 0.76, -0.45}, true)); localDataPoolMap.emplace(IMTQ::ACTUATION_RAW_STATUS, new PoolEntry({0})); - return returnvalue::OK; + return DeviceHandlerBase::initializeLocalDataPool(localDataPoolMap, poolManager); } diff --git a/dummies/TemperatureSensorInserter.cpp b/dummies/TemperatureSensorInserter.cpp index efbec2d0..c75b008c 100644 --- a/dummies/TemperatureSensorInserter.cpp +++ b/dummies/TemperatureSensorInserter.cpp @@ -4,13 +4,14 @@ #include #include +#include TemperatureSensorInserter::TemperatureSensorInserter(object_id_t objectId, - const Max31865DummyMap& tempSensorDummies_, - const Tmp1075DummyMap& tempTmpSensorDummies_) + Max31865DummyMap tempSensorDummies_, + Tmp1075DummyMap tempTmpSensorDummies_) : SystemObject(objects::THERMAL_TEMP_INSERTER), - max31865DummyMap(tempSensorDummies_), - tmp1075DummyMap(tempTmpSensorDummies_) {} + max31865DummyMap(std::move(tempSensorDummies_)), + tmp1075DummyMap(std::move(tempTmpSensorDummies_)) {} ReturnValue_t TemperatureSensorInserter::initialize() { if (performTest) { diff --git a/dummies/TemperatureSensorInserter.h b/dummies/TemperatureSensorInserter.h index ff3f939e..33d61443 100644 --- a/dummies/TemperatureSensorInserter.h +++ b/dummies/TemperatureSensorInserter.h @@ -10,9 +10,8 @@ class TemperatureSensorInserter : public ExecutableObjectIF, public SystemObject public: using Max31865DummyMap = std::map; using Tmp1075DummyMap = std::map; - explicit TemperatureSensorInserter(object_id_t objectId, - const Max31865DummyMap& tempSensorDummies_, - const Tmp1075DummyMap& tempTmpSensorDummies_); + explicit TemperatureSensorInserter(object_id_t objectId, Max31865DummyMap tempSensorDummies_, + Tmp1075DummyMap tempTmpSensorDummies_); ReturnValue_t initialize() override; diff --git a/dummies/helpers.cpp b/dummies/helpers.cpp index 6231fe78..adcb82bb 100644 --- a/dummies/helpers.cpp +++ b/dummies/helpers.cpp @@ -46,7 +46,8 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitch) { if (cfg.addSyrlinksDummies) { new SyrlinksDummy(objects::SYRLINKS_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); } - new ImtqDummy(objects::IMTQ_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); + auto* imtqDummy = new ImtqDummy(objects::IMTQ_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); + imtqDummy->setUpThermalModule(ThermalStateCfg()); if (cfg.addPowerDummies) { new AcuDummy(objects::ACU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); new PduDummy(objects::PDU1_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); diff --git a/fsfw b/fsfw index 6ce80ea6..1841f929 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 6ce80ea6c5b7621876422d2c7614096cbca6f302 +Subproject commit 1841f929442d7945fd0c9401de4accc72031003d diff --git a/mission/controller/ThermalController.cpp b/mission/controller/ThermalController.cpp index 8915071e..9ff3b7d8 100644 --- a/mission/controller/ThermalController.cpp +++ b/mission/controller/ThermalController.cpp @@ -21,7 +21,7 @@ ThermalController::ThermalController(object_id_t objectId, HeaterHandler& heater sensorTemperatures(this), susTemperatures(this), deviceTemperatures(this), - imtqThermalSet(objects::IMTQ_HANDLER), + imtqThermalSet(objects::IMTQ_HANDLER, ThermalStateCfg()), max31865Set0(objects::RTD_0_IC3_PLOC_HEATSPREADER, EiveMax31855::RtdCommands::EXCHANGE_SET_ID), max31865Set1(objects::RTD_1_IC4_PLOC_MISSIONBOARD, From 29eda50e35527ed65d88121e2716b2fbcdb8ff06 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 9 Feb 2023 17:23:30 +0100 Subject: [PATCH 03/11] EM compiles --- bsp_q7s/core/ObjectFactory.cpp | 2 +- bsp_q7s/em/emObjectFactory.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 0c0701ad..448c0e09 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -926,7 +926,7 @@ void ObjectFactory::createImtqComponents(PowerSwitchIF* pwrSwitcher) { I2cCookie* imtqI2cCookie = new I2cCookie(addresses::IMTQ, IMTQ::MAX_REPLY_SIZE, q7s::I2C_PL_EIVE); auto imtqHandler = new ImtqHandler(objects::IMTQ_HANDLER, objects::I2C_COM_IF, imtqI2cCookie, pcdu::Switches::PDU1_CH3_MGT_5V); - imtqHandler->setThermalStateRequestPoolIds(); + imtqHandler->setUpThermalModule(ThermalStateCfg()); imtqHandler->setPowerSwitcher(pwrSwitcher); imtqHandler->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM); static_cast(imtqHandler); diff --git a/bsp_q7s/em/emObjectFactory.cpp b/bsp_q7s/em/emObjectFactory.cpp index 1627a858..1a838b17 100644 --- a/bsp_q7s/em/emObjectFactory.cpp +++ b/bsp_q7s/em/emObjectFactory.cpp @@ -112,6 +112,8 @@ void ObjectFactory::produce(void* args) { pcdu::Switches::PDU1_CH5_SOLAR_CELL_EXP_5V); #endif createAcsController(true); - createThermalController(); + HeaterHandler* heaterHandler = nullptr; + ObjectFactory::createGenericHeaterComponents(*gpioComIF, *pwrSwitcher, heaterHandler); + createThermalController(*heaterHandler); satsystem::com::init(); } From 4bb802362babdb4321dcca62ec2841b0b1319d8f Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 9 Feb 2023 17:32:40 +0100 Subject: [PATCH 04/11] disable thermal ctrl loop, throws too many useless events --- bsp_hosted/scheduling.cpp | 9 ++-- mission/controller/ThermalController.cpp | 52 +++++++++++++----------- mission/controller/ThermalController.h | 1 + 3 files changed, 33 insertions(+), 29 deletions(-) diff --git a/bsp_hosted/scheduling.cpp b/bsp_hosted/scheduling.cpp index cb97a27f..843b2892 100644 --- a/bsp_hosted/scheduling.cpp +++ b/bsp_hosted/scheduling.cpp @@ -154,11 +154,10 @@ void scheduling::initTasks() { scheduling::printAddObjectError("Core controller dummy", objects::CORE_CONTROLLER); } - // Disabled until more stable - // result = thermalTask->addComponent(objects::THERMAL_CONTROLLER); - // if (result != returnvalue::OK) { - // scheduling::printAddObjectError("THERMAL_CONTROLLER", objects::THERMAL_CONTROLLER); - // } + result = thermalTask->addComponent(objects::THERMAL_CONTROLLER); + if (result != returnvalue::OK) { + scheduling::printAddObjectError("THERMAL_CONTROLLER", objects::THERMAL_CONTROLLER); + } FixedTimeslotTaskIF* pstTask = factory->createFixedTimeslotTask( "DUMMY_PST", 75, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc); diff --git a/mission/controller/ThermalController.cpp b/mission/controller/ThermalController.cpp index 9ff3b7d8..947119ad 100644 --- a/mission/controller/ThermalController.cpp +++ b/mission/controller/ThermalController.cpp @@ -109,30 +109,7 @@ void ThermalController::performControlOperation() { deviceTemperatures.commit(); } - ctrlCameraBody(); - ctrlAcsBoard(); - ctrlMgt(); - ctrlRw(); - ctrlStr(); - ctrlIfBoard(); - ctrlAcsBoard(); - ctrlObc(); - ctrlObcIfBoard(); - ctrlSBandTransceiver(); - ctrlPcduP60Board(); - ctrlPcduAcu(); - ctrlPcduPdu(); - ctrlPlPcduBoard(); - ctrlPlocMissionBoard(); - ctrlPlocProcessingBoard(); - ctrlDac(); - - ctrlDro(); - ctrlX8(); - ctrlHpa(); - ctrlTx(); - ctrlMpa(); - ctrlScexBoard(); + //performThermalModuleCtrl(); } ReturnValue_t ThermalController::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, @@ -1338,6 +1315,33 @@ void ThermalController::ctrlHpa() { } } +void ThermalController::performThermalModuleCtrl() { + ctrlCameraBody(); + ctrlAcsBoard(); + ctrlMgt(); + ctrlRw(); + ctrlStr(); + ctrlIfBoard(); + ctrlAcsBoard(); + ctrlObc(); + ctrlObcIfBoard(); + ctrlSBandTransceiver(); + ctrlPcduP60Board(); + ctrlPcduAcu(); + ctrlPcduPdu(); + ctrlPlPcduBoard(); + ctrlPlocMissionBoard(); + ctrlPlocProcessingBoard(); + ctrlDac(); + + ctrlDro(); + ctrlX8(); + ctrlHpa(); + ctrlTx(); + ctrlMpa(); + ctrlScexBoard(); +} + void ThermalController::ctrlScexBoard() { sensors[0].first = sensorTemperatures.sensor_scex.isValid(); sensors[0].second = sensorTemperatures.sensor_scex.value; diff --git a/mission/controller/ThermalController.h b/mission/controller/ThermalController.h index 79ef4a95..03c7954c 100644 --- a/mission/controller/ThermalController.h +++ b/mission/controller/ThermalController.h @@ -44,6 +44,7 @@ class ThermalController : public ExtendedControllerBase { ReturnValue_t initialize() override; protected: + void performThermalModuleCtrl(); ReturnValue_t handleCommandMessage(CommandMessage* message) override; void performControlOperation() override; ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap, From ea7b43234e7f27660f2d8b8d401c0217d314cab5 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 9 Feb 2023 17:56:20 +0100 Subject: [PATCH 05/11] gps bugfix --- CHANGELOG.md | 5 ++++ generators/.run/all.run.xml | 24 ++++++++++++++++++++ linux/devices/GpsHyperionLinuxController.cpp | 1 + 3 files changed, 30 insertions(+) create mode 100644 generators/.run/all.run.xml diff --git a/CHANGELOG.md b/CHANGELOG.md index d92d6113..f63fbafe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,11 @@ change warranting a new major release: - Reworked dummy handling for the TCS controller. - Generator scripts now generate files for hosted and for Q7S build. +## Fixed + +- GPS Controller: Set fix value to 0 when switching off to allow + `GPS_FIX_CHANGE` to work when switching the GPS back on. + # [v1.26.2] 2023-02-08 ## Changed diff --git a/generators/.run/all.run.xml b/generators/.run/all.run.xml new file mode 100644 index 00000000..089f02d0 --- /dev/null +++ b/generators/.run/all.run.xml @@ -0,0 +1,24 @@ + + + + + \ No newline at end of file diff --git a/linux/devices/GpsHyperionLinuxController.cpp b/linux/devices/GpsHyperionLinuxController.cpp index d3f1f868..afc76fcf 100644 --- a/linux/devices/GpsHyperionLinuxController.cpp +++ b/linux/devices/GpsHyperionLinuxController.cpp @@ -47,6 +47,7 @@ ReturnValue_t GpsHyperionLinuxController::checkModeCommand(Mode_t mode, Submode_ 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; oneShotSwitches.reset(); modeCommanded = false; } From 99e5d3bb03968a07cdc2b85c7e0ebb62ff0dab01 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 9 Feb 2023 18:01:55 +0100 Subject: [PATCH 06/11] prep v1.27.0 --- CHANGELOG.md | 4 ++++ CMakeLists.txt | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f63fbafe..8d322221 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,10 @@ change warranting a new major release: # [unreleased] +# [v1.27.0] 2023-02-09 + +eive-tmtc: v2.12.2 + ## Added - First version of a TCS controller heater control loop. diff --git a/CMakeLists.txt b/CMakeLists.txt index a221f578..60b4bf0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,8 +10,8 @@ cmake_minimum_required(VERSION 3.13) set(OBSW_VERSION_MAJOR 1) -set(OBSW_VERSION_MINOR 26) -set(OBSW_VERSION_REVISION 2) +set(OBSW_VERSION_MINOR 27) +set(OBSW_VERSION_REVISION 0) # set(CMAKE_VERBOSE TRUE) From bcec465f9a7f51540d69bf64ea3f46b6dee3d13d Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 9 Feb 2023 18:03:37 +0100 Subject: [PATCH 07/11] prev v1.26.3 --- CHANGELOG.md | 5 +++-- CMakeLists.txt | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d322221..18f99dff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,13 +17,14 @@ change warranting a new major release: # [unreleased] -# [v1.27.0] 2023-02-09 +# [v1.26.3] 2023-02-09 eive-tmtc: v2.12.2 ## Added -- First version of a TCS controller heater control loop. +- First version of a TCS controller heater control loop, but + the loop is disabled for now. ## Changed diff --git a/CMakeLists.txt b/CMakeLists.txt index 60b4bf0b..f52bc9f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,8 +10,8 @@ cmake_minimum_required(VERSION 3.13) set(OBSW_VERSION_MAJOR 1) -set(OBSW_VERSION_MINOR 27) -set(OBSW_VERSION_REVISION 0) +set(OBSW_VERSION_MINOR 26) +set(OBSW_VERSION_REVISION 3) # set(CMAKE_VERBOSE TRUE) From 57aab39b8b470107b67ec45a86c441c2d136d5aa Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 9 Feb 2023 18:13:02 +0100 Subject: [PATCH 08/11] bump fsfw --- fsfw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw b/fsfw index 1841f929..f4d188c3 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 1841f929442d7945fd0c9401de4accc72031003d +Subproject commit f4d188c36f0f08c94d678048a979261d373e7642 From 22fdb6994a8101a890b77d6900fdde7065faee8e Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 9 Feb 2023 18:14:12 +0100 Subject: [PATCH 09/11] bump fsfw --- fsfw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw b/fsfw index f4d188c3..820a7f05 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit f4d188c36f0f08c94d678048a979261d373e7642 +Subproject commit 820a7f059c05d4b2f2012536bfe9482c1625961d From c5e856aaa62d1f1714a9bb86ddfdac93b8f54e9b Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 9 Feb 2023 18:26:02 +0100 Subject: [PATCH 10/11] bump fsfw again --- fsfw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw b/fsfw index 820a7f05..e4fd424d 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 820a7f059c05d4b2f2012536bfe9482c1625961d +Subproject commit e4fd424d66e3e6972418aa89184af867d9ce6588 From d73946e005f975c2d0e7efa4d8c64bad5b44db97 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 9 Feb 2023 18:31:56 +0100 Subject: [PATCH 11/11] bump fsfw for typo fix --- fsfw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw b/fsfw index e4fd424d..14a92b3d 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit e4fd424d66e3e6972418aa89184af867d9ce6588 +Subproject commit 14a92b3d89e37d50ccd46b250826cac293185d68