eive-obsw/mission/scheduling.cpp
Robin Mueller d6fd28e124
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
fix hosted build
2023-08-16 13:35:09 +02:00

52 lines
2.0 KiB
C++

#include "scheduling.h"
#include <mission/tcs/Max31865Definitions.h>
#include "fsfw/tasks/PeriodicTaskIF.h"
void scheduling::scheduleTmpTempSensors(PeriodicTaskIF* tmpTask, bool schedulePlPcdu1) {
std::vector<object_id_t> tmpIds = {objects::TMP1075_HANDLER_TCS_0,
objects::TMP1075_HANDLER_TCS_1,
objects::TMP1075_HANDLER_PLPCDU_0,
objects::TMP1075_HANDLER_IF_BOARD};
if(schedulePlPcdu1) {
tmpIds.push_back(objects::TMP1075_HANDLER_PLPCDU_1);
}
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) {
const std::array<object_id_t, EiveMax31855::NUM_RTDS> rtdIds = {
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);
}
}