diff --git a/mission/controller/ThermalController.cpp b/mission/controller/ThermalController.cpp index 35391599..63bbf861 100644 --- a/mission/controller/ThermalController.cpp +++ b/mission/controller/ThermalController.cpp @@ -104,6 +104,18 @@ void ThermalController::performControlOperation() { copyDevices(); deviceTemperatures.commit(); } + + { + PoolReadGuard pg(&heaterInfo); + if (pg.getReadResult() == returnvalue::OK) { + { + PoolReadGuard pg(¤tVecPdu2); + if (pg.getReadResult() == returnvalue::OK) { + heaterInfo.heaterCurrent.value = currentVecPdu2.value[PDU2::Channels::TCS_HEATER_IN]; + } + } + } + } } ReturnValue_t ThermalController::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, diff --git a/mission/controller/ThermalController.h b/mission/controller/ThermalController.h index df36defd..f661876d 100644 --- a/mission/controller/ThermalController.h +++ b/mission/controller/ThermalController.h @@ -8,6 +8,8 @@ #include #include +#include "mission/devices/devicedefinitions/GomspaceDefinitions.h" + class ThermalController : public ExtendedControllerBase { public: static const uint16_t INVALID_TEMPERATURE = 999; @@ -38,6 +40,8 @@ class ThermalController : public ExtendedControllerBase { thermalControllerDefinitions::SusTemperatures susTemperatures; thermalControllerDefinitions::DeviceTemperatures deviceTemperatures; thermalControllerDefinitions::HeaterInfo heaterInfo; + lp_vec_t currentVecPdu2 = + lp_vec_t(gp_id_t(objects::PDU2_HANDLER, PDU::pool::PDU_CURRENTS)); // Temperature Sensors MAX31865::Max31865Set max31865Set0;