2022-11-25 10:37:10 +01:00
|
|
|
#include "scheduling.h"
|
|
|
|
|
2023-03-26 16:42:00 +02:00
|
|
|
#include <mission/tcs/Max31865Definitions.h>
|
|
|
|
|
2022-11-25 10:37:10 +01:00
|
|
|
#include "fsfw/tasks/PeriodicTaskIF.h"
|
|
|
|
|
2022-11-25 10:47:23 +01:00
|
|
|
void scheduling::scheduleTmpTempSensors(PeriodicTaskIF* tmpTask) {
|
2023-04-26 17:36:38 +02:00
|
|
|
const std::array<object_id_t, 4> tmpIds = {objects::TMP1075_HANDLER_TCS_0,
|
|
|
|
objects::TMP1075_HANDLER_TCS_1,
|
|
|
|
objects::TMP1075_HANDLER_PLPCDU_0,
|
|
|
|
// damaged.
|
|
|
|
// objects::TMP1075_HANDLER_PLPCDU_1,
|
|
|
|
objects::TMP1075_HANDLER_IF_BOARD};
|
2022-11-25 10:47:23 +01:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-25 10:37:10 +01:00
|
|
|
void scheduling::scheduleRtdSensors(PeriodicTaskIF* tcsTask) {
|
2022-11-25 10:47:23 +01:00
|
|
|
const std::array<object_id_t, EiveMax31855::NUM_RTDS> rtdIds = {
|
2022-11-25 10:37:10 +01:00
|
|
|
objects::RTD_0_IC3_PLOC_HEATSPREADER,
|
|
|
|
objects::RTD_1_IC4_PLOC_MISSIONBOARD,
|
|
|
|
objects::RTD_2_IC5_4K_CAMERA,
|
|
|
|
objects::RTD_3_IC6_DAC_HEATSPREADER,
|
|
|
|
objects::RTD_4_IC7_STARTRACKER,
|
|
|
|
objects::RTD_5_IC8_RW1_MX_MY,
|
|
|
|
objects::RTD_6_IC9_DRO,
|
|
|
|
objects::RTD_7_IC10_SCEX,
|
|
|
|
objects::RTD_8_IC11_X8,
|
|
|
|
objects::RTD_9_IC12_HPA,
|
|
|
|
objects::RTD_10_IC13_PL_TX,
|
|
|
|
objects::RTD_11_IC14_MPA,
|
|
|
|
objects::RTD_12_IC15_ACU,
|
|
|
|
objects::RTD_13_IC16_PLPCDU_HEATSPREADER,
|
|
|
|
objects::RTD_14_IC17_TCS_BOARD,
|
|
|
|
objects::RTD_15_IC18_IMTQ,
|
|
|
|
};
|
|
|
|
|
|
|
|
for (const auto& rtd : rtdIds) {
|
|
|
|
tcsTask->addComponent(rtd, DeviceHandlerIF::PERFORM_OPERATION);
|
|
|
|
tcsTask->addComponent(rtd, DeviceHandlerIF::SEND_WRITE);
|
|
|
|
tcsTask->addComponent(rtd, DeviceHandlerIF::GET_WRITE);
|
|
|
|
tcsTask->addComponent(rtd, DeviceHandlerIF::SEND_READ);
|
|
|
|
tcsTask->addComponent(rtd, DeviceHandlerIF::GET_READ);
|
|
|
|
}
|
|
|
|
}
|