create TCS CTRL TMP1075 PLCDU 1 se tdynamically
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
@ -57,8 +57,6 @@ ThermalController::ThermalController(object_id_t objectId, HeaterHandler& heater
|
||||
tmp1075SetTcs0(objects::TMP1075_HANDLER_TCS_0),
|
||||
tmp1075SetTcs1(objects::TMP1075_HANDLER_TCS_1),
|
||||
tmp1075SetPlPcdu0(objects::TMP1075_HANDLER_PLPCDU_0),
|
||||
// damaged
|
||||
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),
|
||||
@ -73,6 +71,9 @@ ThermalController::ThermalController(object_id_t objectId, HeaterHandler& heater
|
||||
susSet10(objects::SUS_10_N_LOC_XMYBZF_PT_ZF),
|
||||
susSet11(objects::SUS_11_R_LOC_XBYMZB_PT_ZB),
|
||||
tcsBrdShortlyUnavailable(tcsBoardShortUnavailable) {
|
||||
if (pollPcdu1Tmp) {
|
||||
tmp1075SetPlPcdu1 = new TMP1075::Tmp1075Dataset(objects::TMP1075_HANDLER_PLPCDU_1);
|
||||
}
|
||||
resetSensorsArray();
|
||||
}
|
||||
|
||||
@ -539,14 +540,13 @@ void ThermalController::copySensors() {
|
||||
}
|
||||
}
|
||||
// damaged on FM, and no dummies for now
|
||||
|
||||
if (pollPcdu1Tmp) {
|
||||
{
|
||||
PoolReadGuard pg(&tmp1075SetPlPcdu1, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
||||
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 = tmp1075SetPlPcdu1->temperatureCelcius.value;
|
||||
sensorTemperatures.tmp1075PlPcdu1.setValid(tmp1075SetPlPcdu1->temperatureCelcius.isValid());
|
||||
if (not tmp1075SetPlPcdu1->temperatureCelcius.isValid()) {
|
||||
sensorTemperatures.tmp1075PlPcdu1.value = INVALID_TEMPERATURE;
|
||||
}
|
||||
}
|
||||
@ -1831,6 +1831,12 @@ void ThermalController::heaterSwitchHelperAllOff() {
|
||||
}
|
||||
}
|
||||
|
||||
ThermalController::~ThermalController() {
|
||||
if (tmp1075SetPlPcdu1 != nullptr) {
|
||||
delete tmp1075SetPlPcdu1;
|
||||
}
|
||||
}
|
||||
|
||||
void ThermalController::tooHotHandlerWhichClearsOneShotFlag(object_id_t object, bool& oneShotFlag) {
|
||||
// Clear the one shot flag is the component is in acceptable temperature range.
|
||||
if (not tooHotHandler(object, oneShotFlag) and not componentAboveUpperLimit) {
|
||||
|
@ -104,6 +104,7 @@ class ThermalController : public ExtendedControllerBase {
|
||||
|
||||
ThermalController(object_id_t objectId, HeaterHandler& heater,
|
||||
const std::atomic_bool& tcsBoardShortUnavailable, bool pollPcdu1Tmp);
|
||||
virtual ~ThermalController();
|
||||
|
||||
ReturnValue_t initialize() override;
|
||||
|
||||
@ -174,7 +175,7 @@ class ThermalController : public ExtendedControllerBase {
|
||||
TMP1075::Tmp1075Dataset tmp1075SetTcs1;
|
||||
TMP1075::Tmp1075Dataset tmp1075SetPlPcdu0;
|
||||
// damaged
|
||||
TMP1075::Tmp1075Dataset tmp1075SetPlPcdu1;
|
||||
TMP1075::Tmp1075Dataset* tmp1075SetPlPcdu1;
|
||||
TMP1075::Tmp1075Dataset tmp1075SetIfBoard;
|
||||
|
||||
// SUS
|
||||
|
Reference in New Issue
Block a user