diff --git a/bsp_hosted/scheduling.cpp b/bsp_hosted/scheduling.cpp index 6525bde6..ef73cdaf 100644 --- a/bsp_hosted/scheduling.cpp +++ b/bsp_hosted/scheduling.cpp @@ -186,6 +186,7 @@ void scheduling::initTasks() { PeriodicTaskIF* tcsTask = factory->createPeriodicTask( "TCS_TASK", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.5, missedDeadlineFunc); + scheduling::scheduleTmpTempSensors(tcsTask); scheduling::scheduleRtdSensors(tcsTask); sif::info << "Starting tasks.." << std::endl; diff --git a/dummies/TemperatureSensorInserter.h b/dummies/TemperatureSensorInserter.h index 74221458..8c87176d 100644 --- a/dummies/TemperatureSensorInserter.h +++ b/dummies/TemperatureSensorInserter.h @@ -5,7 +5,7 @@ class TemperatureSensorInserter : public ExecutableObjectIF, public SystemObject { public: - TemperatureSensorInserter(object_id_t objectId); + explicit TemperatureSensorInserter(object_id_t objectId); ReturnValue_t initialize() override; @@ -18,5 +18,5 @@ class TemperatureSensorInserter : public ExecutableObjectIF, public SystemObject MAX31865::PrimarySet max31865PlocHeatspreaderSet; MAX31865::PrimarySet max31865PlocMissionboardSet; - void noise(); + // void noise(); }; diff --git a/mission/core/scheduling.cpp b/mission/core/scheduling.cpp index fb119525..50b5e473 100644 --- a/mission/core/scheduling.cpp +++ b/mission/core/scheduling.cpp @@ -3,8 +3,22 @@ #include "fsfw/tasks/PeriodicTaskIF.h" #include "mission/devices/devicedefinitions/Max31865Definitions.h" +void scheduling::scheduleTmpTempSensors(PeriodicTaskIF* tmpTask) { + const std::array tmpIds = { + objects::TMP1075_HANDLER_TCS_0, objects::TMP1075_HANDLER_TCS_1, + objects::TMP1075_HANDLER_PLPCDU_0, objects::TMP1075_HANDLER_PLPCDU_1, + objects::TMP1075_HANDLER_IF_BOARD}; + for (const auto& tmpId : tmpIds) { + tmpTask->addComponent(tmpId, DeviceHandlerIF::PERFORM_OPERATION); + tmpTask->addComponent(tmpId, DeviceHandlerIF::SEND_WRITE); + tmpTask->addComponent(tmpId, DeviceHandlerIF::GET_WRITE); + tmpTask->addComponent(tmpId, DeviceHandlerIF::SEND_READ); + tmpTask->addComponent(tmpId, DeviceHandlerIF::GET_READ); + } +} + void scheduling::scheduleRtdSensors(PeriodicTaskIF* tcsTask) { - std::array rtdIds = { + const std::array rtdIds = { objects::RTD_0_IC3_PLOC_HEATSPREADER, objects::RTD_1_IC4_PLOC_MISSIONBOARD, objects::RTD_2_IC5_4K_CAMERA, diff --git a/mission/core/scheduling.h b/mission/core/scheduling.h index d6f68288..6023d5df 100644 --- a/mission/core/scheduling.h +++ b/mission/core/scheduling.h @@ -4,7 +4,8 @@ class PeriodicTaskIF; namespace scheduling { +void scheduleTmpTempSensors(PeriodicTaskIF* tmpSensors); void scheduleRtdSensors(PeriodicTaskIF* periodicTask); -} +} // namespace scheduling #endif // EIVE_OBSW_SCHEDULING_H