diff --git a/mission/controller/ThermalController.cpp b/mission/controller/ThermalController.cpp index f0356f66..6f7b7193 100644 --- a/mission/controller/ThermalController.cpp +++ b/mission/controller/ThermalController.cpp @@ -19,6 +19,7 @@ ThermalController::ThermalController(object_id_t objectId) sensorTemperatures(this), susTemperatures(this), deviceTemperatures(this), + heaterInfo(this), max31865Set0(objects::RTD_0_IC3_PLOC_HEATSPREADER, EiveMax31855::RtdCommands::EXCHANGE_SET_ID), max31865Set1(objects::RTD_1_IC4_PLOC_MISSIONBOARD, diff --git a/mission/controller/ThermalController.h b/mission/controller/ThermalController.h index 5f4569c3..1783e932 100644 --- a/mission/controller/ThermalController.h +++ b/mission/controller/ThermalController.h @@ -37,6 +37,7 @@ class ThermalController : public ExtendedControllerBase { thermalControllerDefinitions::SensorTemperatures sensorTemperatures; thermalControllerDefinitions::SusTemperatures susTemperatures; thermalControllerDefinitions::DeviceTemperatures deviceTemperatures; + thermalControllerDefinitions::HeaterInfo heaterInfo; // Temperature Sensors MAX31865::Max31865Set max31865Set0; diff --git a/mission/controller/controllerdefinitions/ThermalControllerDefinitions.h b/mission/controller/controllerdefinitions/ThermalControllerDefinitions.h index 9f800bec..89a1d10e 100644 --- a/mission/controller/controllerdefinitions/ThermalControllerDefinitions.h +++ b/mission/controller/controllerdefinitions/ThermalControllerDefinitions.h @@ -3,14 +3,16 @@ #include #include +#include "devices/heaterSwitcherList.h" namespace thermalControllerDefinitions { enum SetIds : uint32_t { - SENSOR_TEMPERATURES, - DEVICE_TEMPERATURES, - SUS_TEMPERATURES, - COMPONENT_TEMPERATURES + SENSOR_TEMPERATURES = 0, + DEVICE_TEMPERATURES = 1, + SUS_TEMPERATURES = 2, + COMPONENT_TEMPERATURES = 3, + HEATER_SET = 4, }; enum PoolIds : lp_id_t { @@ -75,7 +77,10 @@ enum PoolIds : lp_id_t { TEMP_GYRO_3_SIDE_B, TEMP_MGM_0_SIDE_A, TEMP_MGM_2_SIDE_B, - TEMP_ADC_PAYLOAD_PCDU + TEMP_ADC_PAYLOAD_PCDU, + + HEATER_SWITCH_LIST, + HEATER_CURRENT }; static const uint8_t ENTRIES_SENSOR_TEMPERATURE_SET = 25; @@ -201,6 +206,16 @@ class SusTemperatures : public StaticLocalDataSet { lp_var_t(sid.objectId, PoolIds::SUS_11_R_LOC_XBYMZB_PT_ZB, this); }; +class HeaterInfo: public StaticLocalDataSet<12> { +public: + HeaterInfo(HasLocalDataPoolIF* owner): StaticLocalDataSet(owner, HEATER_SET) {} + HeaterInfo(object_id_t objectId): StaticLocalDataSet(sid_t(objectId, HEATER_SET)) {} + + lp_vec_t heaterSwitchState = + lp_vec_t(sid.objectId, PoolIds::HEATER_SWITCH_LIST, this); + lp_var_t heaterCurrent = lp_var_t(sid.objectId, PoolIds::HEATER_CURRENT, this); +}; + } // namespace thermalControllerDefinitions #endif /* MISSION_CONTROLLER_CONTROLLERDEFINITIONS_THERMALCONTROLLERDEFINITIONS_H_ */ diff --git a/tmtc b/tmtc index 49f27c99..5998aa12 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 49f27c9923cfa13a3bafce46c37dd2631550f4af +Subproject commit 5998aa12a4750584eb474b5d936fa461e9725154