diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f1896d6..e9c3ab63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,9 +25,26 @@ change warranting a new major release: ## Changed +- ActCmds now returns command vectors as integers as required by the actuators + +# [v1.26.3] 2023-02-09 + +eive-tmtc: v2.12.2 + +## Added + +- First version of a TCS controller heater control loop, but + the loop is disabled for now. + +## Changed + - Reworked dummy handling for the TCS controller. - Generator scripts now generate files for hosted and for Q7S build. -- ActCmds now returns command vectors as integers as required by the actuators + +## 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 diff --git a/CMakeLists.txt b/CMakeLists.txt index a221f578..f52bc9f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ cmake_minimum_required(VERSION 3.13) set(OBSW_VERSION_MAJOR 1) set(OBSW_VERSION_MINOR 26) -set(OBSW_VERSION_REVISION 2) +set(OBSW_VERSION_REVISION 3) # set(CMAKE_VERBOSE TRUE) 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_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(); } 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..14a92b3d 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 6ce80ea6c5b7621876422d2c7614096cbca6f302 +Subproject commit 14a92b3d89e37d50ccd46b250826cac293185d68 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; } diff --git a/mission/controller/ThermalController.cpp b/mission/controller/ThermalController.cpp index 8915071e..947119ad 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, @@ -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,