|
|
|
@ -38,8 +38,11 @@ ThermalController::ThermalController(object_id_t objectId)
|
|
|
|
|
EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
|
|
|
|
|
max31865Set14(objects::RTD_14_IC17_TCS_BOARD, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
|
|
|
|
|
max31865Set15(objects::RTD_15_IC18_IMTQ, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
|
|
|
|
|
tmp1075Set1(objects::TMP1075_HANDLER_TCS_0),
|
|
|
|
|
tmp1075Set2(objects::TMP1075_HANDLER_TCS_1),
|
|
|
|
|
tmp1075SetTcs0(objects::TMP1075_HANDLER_TCS_0),
|
|
|
|
|
tmp1075SetTcs1(objects::TMP1075_HANDLER_TCS_1),
|
|
|
|
|
tmp1075SetPlPcdu0(objects::TMP1075_HANDLER_PLPCDU_0),
|
|
|
|
|
tmp1075SetPlPcdu1(objects::TMP1075_HANDLER_PLPCDU_1),
|
|
|
|
|
tmp1075SetIfBoard(objects::TMP1075_HANDLER_IF_BOARD),
|
|
|
|
|
susSet0(objects::SUS_0_N_LOC_XFYFZM_PT_XF),
|
|
|
|
|
susSet1(objects::SUS_1_N_LOC_XBYFZM_PT_XB),
|
|
|
|
|
susSet2(objects::SUS_2_N_LOC_XFYBZB_PT_YB),
|
|
|
|
@ -128,10 +131,11 @@ ReturnValue_t ThermalController::initializeLocalDataPool(localpool::DataPool& lo
|
|
|
|
|
new PoolEntry<float>({14.0}));
|
|
|
|
|
localDataPoolMap.emplace(thermalControllerDefinitions::SENSOR_MAGNETTORQUER,
|
|
|
|
|
new PoolEntry<float>({15.0}));
|
|
|
|
|
localDataPoolMap.emplace(thermalControllerDefinitions::SENSOR_TMP1075_1,
|
|
|
|
|
new PoolEntry<float>({15.0}));
|
|
|
|
|
localDataPoolMap.emplace(thermalControllerDefinitions::SENSOR_TMP1075_2,
|
|
|
|
|
new PoolEntry<float>({15.0}));
|
|
|
|
|
localDataPoolMap.emplace(thermalControllerDefinitions::SENSOR_TMP1075_TCS_0, &tmp1075Tcs0);
|
|
|
|
|
localDataPoolMap.emplace(thermalControllerDefinitions::SENSOR_TMP1075_TCS_1, &tmp1075Tcs1);
|
|
|
|
|
localDataPoolMap.emplace(thermalControllerDefinitions::SENSOR_TMP1075_PLPCDU_0, &tmp1075PlPcdu0);
|
|
|
|
|
localDataPoolMap.emplace(thermalControllerDefinitions::SENSOR_TMP1075_PLPCDU_1, &tmp1075PlPcdu1);
|
|
|
|
|
localDataPoolMap.emplace(thermalControllerDefinitions::SENSOR_TMP1075_IF_BOARD, &tmp1075IfBrd);
|
|
|
|
|
|
|
|
|
|
localDataPoolMap.emplace(thermalControllerDefinitions::SUS_0_N_LOC_XFYFZM_PT_XF,
|
|
|
|
|
new PoolEntry<float>({0.0}));
|
|
|
|
@ -415,23 +419,53 @@ void ThermalController::copySensors() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
PoolReadGuard pg111(&tmp1075Set1, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
|
|
|
|
if (pg111.getReadResult() == returnvalue::OK) {
|
|
|
|
|
sensorTemperatures.sensor_tmp1075_1.value = tmp1075Set1.temperatureCelcius.value;
|
|
|
|
|
sensorTemperatures.sensor_tmp1075_1.setValid(tmp1075Set1.temperatureCelcius.isValid());
|
|
|
|
|
if (not tmp1075Set1.temperatureCelcius.isValid()) {
|
|
|
|
|
sensorTemperatures.sensor_tmp1075_1.value = INVALID_TEMPERATURE;
|
|
|
|
|
PoolReadGuard pg(&tmp1075SetTcs0, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
|
|
|
|
if (pg.getReadResult() == returnvalue::OK) {
|
|
|
|
|
sensorTemperatures.tmp1075Tcs0.value = tmp1075SetTcs0.temperatureCelcius.value;
|
|
|
|
|
sensorTemperatures.tmp1075Tcs0.setValid(tmp1075SetTcs0.temperatureCelcius.isValid());
|
|
|
|
|
if (not tmp1075SetTcs0.temperatureCelcius.isValid()) {
|
|
|
|
|
sensorTemperatures.tmp1075Tcs0.value = INVALID_TEMPERATURE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
PoolReadGuard pg112(&tmp1075Set2, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
|
|
|
|
if (pg112.getReadResult() == returnvalue::OK) {
|
|
|
|
|
sensorTemperatures.sensor_tmp1075_2.value = tmp1075Set2.temperatureCelcius.value;
|
|
|
|
|
sensorTemperatures.sensor_tmp1075_2.setValid(tmp1075Set2.temperatureCelcius.isValid());
|
|
|
|
|
if (not tmp1075Set2.temperatureCelcius.isValid()) {
|
|
|
|
|
sensorTemperatures.sensor_tmp1075_2.value = INVALID_TEMPERATURE;
|
|
|
|
|
PoolReadGuard pg(&tmp1075SetTcs1, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
|
|
|
|
if (pg.getReadResult() == returnvalue::OK) {
|
|
|
|
|
sensorTemperatures.tmp1075Tcs1.value = tmp1075SetTcs1.temperatureCelcius.value;
|
|
|
|
|
sensorTemperatures.tmp1075Tcs1.setValid(tmp1075SetTcs1.temperatureCelcius.isValid());
|
|
|
|
|
if (not tmp1075SetTcs1.temperatureCelcius.isValid()) {
|
|
|
|
|
sensorTemperatures.tmp1075Tcs1.value = INVALID_TEMPERATURE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
PoolReadGuard pg(&tmp1075SetPlPcdu0, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
|
|
|
|
if (pg.getReadResult() == returnvalue::OK) {
|
|
|
|
|
sensorTemperatures.tmp1075PlPcdu0.value = tmp1075SetPlPcdu0.temperatureCelcius.value;
|
|
|
|
|
sensorTemperatures.tmp1075PlPcdu0.setValid(tmp1075SetPlPcdu0.temperatureCelcius.isValid());
|
|
|
|
|
if (not tmp1075SetPlPcdu0.temperatureCelcius.isValid()) {
|
|
|
|
|
sensorTemperatures.tmp1075PlPcdu0.value = INVALID_TEMPERATURE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
PoolReadGuard pg(&tmp1075SetPlPcdu1, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
|
|
|
|
if (pg.getReadResult() == returnvalue::OK) {
|
|
|
|
|
sensorTemperatures.tmp1075PlPcdu1.value = tmp1075SetPlPcdu1.temperatureCelcius.value;
|
|
|
|
|
sensorTemperatures.tmp1075PlPcdu1.setValid(tmp1075SetPlPcdu1.temperatureCelcius.isValid());
|
|
|
|
|
if (not tmp1075SetPlPcdu1.temperatureCelcius.isValid()) {
|
|
|
|
|
sensorTemperatures.tmp1075PlPcdu1.value = INVALID_TEMPERATURE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
PoolReadGuard pg(&tmp1075SetIfBoard, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
|
|
|
|
if (pg.getReadResult() == returnvalue::OK) {
|
|
|
|
|
sensorTemperatures.tmp1075IfBrd.value = tmp1075SetIfBoard.temperatureCelcius.value;
|
|
|
|
|
sensorTemperatures.tmp1075IfBrd.setValid(tmp1075SetIfBoard.temperatureCelcius.isValid());
|
|
|
|
|
if (not tmp1075SetIfBoard.temperatureCelcius.isValid()) {
|
|
|
|
|
sensorTemperatures.tmp1075IfBrd.value = INVALID_TEMPERATURE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|