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:
parent
8f7d3dd815
commit
df4e657ec3
@ -100,21 +100,6 @@ void ObjectFactory::produce(void* args) {
|
||||
|
||||
new CoreController(objects::CORE_CONTROLLER, enableHkSets);
|
||||
|
||||
// Regular FM code, does not work for EM if the hardware is not connected
|
||||
// createPcduComponents(gpioComIF, &pwrSwitcher);
|
||||
// createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher);
|
||||
// createSyrlinksComponents(pwrSwitcher);
|
||||
// createSunSensorComponents(gpioComIF, spiMainComIF, pwrSwitcher, q7s::SPI_DEFAULT_DEV);
|
||||
// createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher, spiMainComIF);
|
||||
// createTmpComponents();
|
||||
// createSolarArrayDeploymentComponents();
|
||||
// createPayloadComponents(gpioComIF);
|
||||
// createHeaterComponents(gpioComIF, pwrSwitcher, healthTable);
|
||||
|
||||
// TODO: Careful! Switching this on somehow messes with the communication with the ProASIC
|
||||
// and will cause xsc_boot_copy commands to always boot to 0 0
|
||||
// createRadSensorComponent(gpioComIF);
|
||||
|
||||
#if OBSW_ADD_ACS_BOARD == 1
|
||||
// Still initialize chip select to avoid SPI bus issues.
|
||||
createRadSensorChipSelect(gpioComIF);
|
||||
|
@ -121,7 +121,7 @@ void ObjectFactory::produce(void* args) {
|
||||
#endif /* OBSW_ADD_TEST_CODE == 1 */
|
||||
|
||||
createMiscComponents();
|
||||
createThermalController(*heaterHandler);
|
||||
createThermalController(*heaterHandler, false);
|
||||
createAcsController(true, enableHkSets);
|
||||
satsystem::init();
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user