Swap PL and PS I2C #725

Merged
muellerr merged 20 commits from swap-pl-ps-i2c into main 2023-07-06 15:05:54 +02:00
6 changed files with 23 additions and 19 deletions
Showing only changes of commit ecb8de1550 - Show all commits

View File

@ -172,6 +172,6 @@ void ObjectFactory::produce(void* args) {
createAcsController(true, enableHkSets); createAcsController(true, enableHkSets);
HeaterHandler* heaterHandler; HeaterHandler* heaterHandler;
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable, heaterHandler); createHeaterComponents(gpioComIF, pwrSwitcher, healthTable, heaterHandler);
createThermalController(*heaterHandler); createThermalController(*heaterHandler, true);
satsystem::init(); satsystem::init();
} }

View File

@ -24,9 +24,11 @@
#define LOWER_RW_UPPER_LIMITS 0 #define LOWER_RW_UPPER_LIMITS 0
ThermalController::ThermalController(object_id_t objectId, HeaterHandler& heater, ThermalController::ThermalController(object_id_t objectId, HeaterHandler& heater,
const std::atomic_bool& tcsBoardShortUnavailable) const std::atomic_bool& tcsBoardShortUnavailable,
bool pollPcdu1Tmp)
: ExtendedControllerBase(objectId), : ExtendedControllerBase(objectId),
heaterHandler(heater), heaterHandler(heater),
pollPcdu1Tmp(pollPcdu1Tmp),
sensorTemperatures(this), sensorTemperatures(this),
susTemperatures(this), susTemperatures(this),
deviceTemperatures(this), deviceTemperatures(this),
@ -56,7 +58,7 @@ ThermalController::ThermalController(object_id_t objectId, HeaterHandler& heater
tmp1075SetTcs1(objects::TMP1075_HANDLER_TCS_1), tmp1075SetTcs1(objects::TMP1075_HANDLER_TCS_1),
tmp1075SetPlPcdu0(objects::TMP1075_HANDLER_PLPCDU_0), tmp1075SetPlPcdu0(objects::TMP1075_HANDLER_PLPCDU_0),
// damaged // damaged
// tmp1075SetPlPcdu1(objects::TMP1075_HANDLER_PLPCDU_1), tmp1075SetPlPcdu1(objects::TMP1075_HANDLER_PLPCDU_1),
tmp1075SetIfBoard(objects::TMP1075_HANDLER_IF_BOARD), tmp1075SetIfBoard(objects::TMP1075_HANDLER_IF_BOARD),
susSet0(objects::SUS_0_N_LOC_XFYFZM_PT_XF), susSet0(objects::SUS_0_N_LOC_XFYFZM_PT_XF),
susSet1(objects::SUS_1_N_LOC_XBYFZM_PT_XB), susSet1(objects::SUS_1_N_LOC_XBYFZM_PT_XB),
@ -536,19 +538,20 @@ void ThermalController::copySensors() {
} }
} }
} }
// damaged // damaged on FM, and no dummies for now
/*
{ if (pollPcdu1Tmp) {
PoolReadGuard pg(&tmp1075SetPlPcdu1, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT); {
if (pg.getReadResult() == returnvalue::OK) { PoolReadGuard pg(&tmp1075SetPlPcdu1, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
sensorTemperatures.tmp1075PlPcdu1.value = tmp1075SetPlPcdu1.temperatureCelcius.value; if (pg.getReadResult() == returnvalue::OK) {
sensorTemperatures.tmp1075PlPcdu1.setValid(tmp1075SetPlPcdu1.temperatureCelcius.isValid()); sensorTemperatures.tmp1075PlPcdu1.value = tmp1075SetPlPcdu1.temperatureCelcius.value;
if (not tmp1075SetPlPcdu1.temperatureCelcius.isValid()) { sensorTemperatures.tmp1075PlPcdu1.setValid(tmp1075SetPlPcdu1.temperatureCelcius.isValid());
sensorTemperatures.tmp1075PlPcdu1.value = INVALID_TEMPERATURE; if (not tmp1075SetPlPcdu1.temperatureCelcius.isValid()) {
sensorTemperatures.tmp1075PlPcdu1.value = INVALID_TEMPERATURE;
}
} }
} }
} }
*/
{ {
PoolReadGuard pg(&tmp1075SetIfBoard, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT); PoolReadGuard pg(&tmp1075SetIfBoard, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg.getReadResult() == returnvalue::OK) { if (pg.getReadResult() == returnvalue::OK) {

View File

@ -103,7 +103,7 @@ class ThermalController : public ExtendedControllerBase {
static constexpr int16_t SANITY_LIMIT_UPPER_TEMP = 160; static constexpr int16_t SANITY_LIMIT_UPPER_TEMP = 160;
ThermalController(object_id_t objectId, HeaterHandler& heater, ThermalController(object_id_t objectId, HeaterHandler& heater,
const std::atomic_bool& tcsBoardShortUnavailable); const std::atomic_bool& tcsBoardShortUnavailable, bool pollPcdu1Tmp);
ReturnValue_t initialize() override; ReturnValue_t initialize() override;
@ -142,6 +142,7 @@ class ThermalController : public ExtendedControllerBase {
HeaterHandler& heaterHandler; HeaterHandler& heaterHandler;
bool pollPcdu1Tmp;
tcsCtrl::SensorTemperatures sensorTemperatures; tcsCtrl::SensorTemperatures sensorTemperatures;
tcsCtrl::SusTemperatures susTemperatures; tcsCtrl::SusTemperatures susTemperatures;
tcsCtrl::DeviceTemperatures deviceTemperatures; tcsCtrl::DeviceTemperatures deviceTemperatures;
@ -173,7 +174,7 @@ class ThermalController : public ExtendedControllerBase {
TMP1075::Tmp1075Dataset tmp1075SetTcs1; TMP1075::Tmp1075Dataset tmp1075SetTcs1;
TMP1075::Tmp1075Dataset tmp1075SetPlPcdu0; TMP1075::Tmp1075Dataset tmp1075SetPlPcdu0;
// damaged // damaged
// TMP1075::Tmp1075Dataset tmp1075SetPlPcdu1; TMP1075::Tmp1075Dataset tmp1075SetPlPcdu1;
TMP1075::Tmp1075Dataset tmp1075SetIfBoard; TMP1075::Tmp1075Dataset tmp1075SetIfBoard;
// SUS // SUS

View File

@ -305,9 +305,9 @@ void ObjectFactory::createGenericHeaterComponents(GpioIF& gpioIF, PowerSwitchIF&
heaterHandler->connectModeTreeParent(satsystem::tcs::SUBSYSTEM); heaterHandler->connectModeTreeParent(satsystem::tcs::SUBSYSTEM);
} }
void ObjectFactory::createThermalController(HeaterHandler& heaterHandler) { void ObjectFactory::createThermalController(HeaterHandler& heaterHandler, bool pollPlPcduTmp1) {
auto* tcsCtrl = new ThermalController(objects::THERMAL_CONTROLLER, heaterHandler, auto* tcsCtrl = new ThermalController(objects::THERMAL_CONTROLLER, heaterHandler,
tcs::TCS_BOARD_SHORTLY_UNAVAILABLE); tcs::TCS_BOARD_SHORTLY_UNAVAILABLE, pollPlPcduTmp1);
tcsCtrl->connectModeTreeParent(satsystem::tcs::SUBSYSTEM); tcsCtrl->connectModeTreeParent(satsystem::tcs::SUBSYSTEM);
} }
void ObjectFactory::createRwAssy(PowerSwitchIF& pwrSwitcher, power::Switch_t theSwitch, void ObjectFactory::createRwAssy(PowerSwitchIF& pwrSwitcher, power::Switch_t theSwitch,

View File

@ -49,7 +49,7 @@ void produceGenericObjects(HealthTableIF** healthTable, PusTmFunnel** pusFunnel,
void createGenericHeaterComponents(GpioIF& gpioIF, PowerSwitchIF& pwrSwitcher, void createGenericHeaterComponents(GpioIF& gpioIF, PowerSwitchIF& pwrSwitcher,
HeaterHandler*& heaterHandler); HeaterHandler*& heaterHandler);
void createThermalController(HeaterHandler& heaterHandler); void createThermalController(HeaterHandler& heaterHandler, bool pollPlPcduTmp1);
void createRwAssy(PowerSwitchIF& pwrSwitcher, power::Switch_t theSwitch, void createRwAssy(PowerSwitchIF& pwrSwitcher, power::Switch_t theSwitch,
std::array<DeviceHandlerBase*, 4> rws, std::array<object_id_t, 4> rwIds); std::array<DeviceHandlerBase*, 4> rws, std::array<object_id_t, 4> rwIds);
void createSusAssy(PowerSwitchIF& pwrSwitcher, std::array<DeviceHandlerBase*, 12> suses); void createSusAssy(PowerSwitchIF& pwrSwitcher, std::array<DeviceHandlerBase*, 12> suses);

2
tmtc

@ -1 +1 @@
Subproject commit b9038f1c86fb2b3cb9cae5be42fafd678e12de52 Subproject commit 79060acfb688a8896cf56c27d83da14e5630f091