added reading of current value
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2023-01-24 15:46:20 +01:00
parent 485ee2f8e0
commit d0a7d2892e
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
2 changed files with 16 additions and 0 deletions

View File

@ -104,6 +104,18 @@ void ThermalController::performControlOperation() {
copyDevices(); copyDevices();
deviceTemperatures.commit(); deviceTemperatures.commit();
} }
{
PoolReadGuard pg(&heaterInfo);
if (pg.getReadResult() == returnvalue::OK) {
{
PoolReadGuard pg(&currentVecPdu2);
if (pg.getReadResult() == returnvalue::OK) {
heaterInfo.heaterCurrent.value = currentVecPdu2.value[PDU2::Channels::TCS_HEATER_IN];
}
}
}
}
} }
ReturnValue_t ThermalController::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, ReturnValue_t ThermalController::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,

View File

@ -8,6 +8,8 @@
#include <mission/devices/devicedefinitions/SusDefinitions.h> #include <mission/devices/devicedefinitions/SusDefinitions.h>
#include <mission/devices/devicedefinitions/Tmp1075Definitions.h> #include <mission/devices/devicedefinitions/Tmp1075Definitions.h>
#include "mission/devices/devicedefinitions/GomspaceDefinitions.h"
class ThermalController : public ExtendedControllerBase { class ThermalController : public ExtendedControllerBase {
public: public:
static const uint16_t INVALID_TEMPERATURE = 999; static const uint16_t INVALID_TEMPERATURE = 999;
@ -38,6 +40,8 @@ class ThermalController : public ExtendedControllerBase {
thermalControllerDefinitions::SusTemperatures susTemperatures; thermalControllerDefinitions::SusTemperatures susTemperatures;
thermalControllerDefinitions::DeviceTemperatures deviceTemperatures; thermalControllerDefinitions::DeviceTemperatures deviceTemperatures;
thermalControllerDefinitions::HeaterInfo heaterInfo; thermalControllerDefinitions::HeaterInfo heaterInfo;
lp_vec_t<int16_t, 9> currentVecPdu2 =
lp_vec_t<int16_t, 9>(gp_id_t(objects::PDU2_HANDLER, PDU::pool::PDU_CURRENTS));
// Temperature Sensors // Temperature Sensors
MAX31865::Max31865Set max31865Set0; MAX31865::Max31865Set max31865Set0;