From d01308f0ba9716dadf1530c3da4b0504d2c5ecb8 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 9 Feb 2023 17:17:58 +0100 Subject: [PATCH] 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,