Merge remote-tracking branch 'origin/develop' into mueller/acs-ss-init
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2022-10-20 17:03:50 +02:00
commit 48ed7500d8
9 changed files with 67 additions and 72 deletions

2
fsfw

@ -1 +1 @@
Subproject commit 1d6ccfe5ab63c268e1b62a731eb55d35eac88492 Subproject commit ec7566fb8c38ebe232fbbb71e2ed1095fcc864e2

View File

@ -235,7 +235,7 @@ ReturnValue_t ThermalController::checkModeCommand(Mode_t mode, Submode_t submode
void ThermalController::copySensors() { void ThermalController::copySensors() {
{ {
PoolReadGuard pg0(&max31865Set0); PoolReadGuard pg0(&max31865Set0, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg0.getReadResult() == returnvalue::OK) { if (pg0.getReadResult() == returnvalue::OK) {
sensorTemperatures.sensor_ploc_heatspreader.value = max31865Set0.temperatureCelcius.value; sensorTemperatures.sensor_ploc_heatspreader.value = max31865Set0.temperatureCelcius.value;
sensorTemperatures.sensor_ploc_heatspreader.setValid( sensorTemperatures.sensor_ploc_heatspreader.setValid(
@ -247,7 +247,7 @@ void ThermalController::copySensors() {
} }
{ {
PoolReadGuard pg1(&max31865Set1); PoolReadGuard pg1(&max31865Set1, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg1.getReadResult() == returnvalue::OK) { if (pg1.getReadResult() == returnvalue::OK) {
sensorTemperatures.sensor_ploc_missionboard.value = max31865Set1.temperatureCelcius.value; sensorTemperatures.sensor_ploc_missionboard.value = max31865Set1.temperatureCelcius.value;
sensorTemperatures.sensor_ploc_missionboard.setValid( sensorTemperatures.sensor_ploc_missionboard.setValid(
@ -259,7 +259,7 @@ void ThermalController::copySensors() {
} }
{ {
PoolReadGuard pg2(&max31865Set2); PoolReadGuard pg2(&max31865Set2, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg2.getReadResult() == returnvalue::OK) { if (pg2.getReadResult() == returnvalue::OK) {
sensorTemperatures.sensor_4k_camera.value = max31865Set2.temperatureCelcius.value; sensorTemperatures.sensor_4k_camera.value = max31865Set2.temperatureCelcius.value;
sensorTemperatures.sensor_4k_camera.setValid(max31865Set2.temperatureCelcius.isValid()); sensorTemperatures.sensor_4k_camera.setValid(max31865Set2.temperatureCelcius.isValid());
@ -270,7 +270,7 @@ void ThermalController::copySensors() {
} }
{ {
PoolReadGuard pg3(&max31865Set3); PoolReadGuard pg3(&max31865Set3, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg3.getReadResult() == returnvalue::OK) { if (pg3.getReadResult() == returnvalue::OK) {
sensorTemperatures.sensor_dac_heatspreader.value = max31865Set3.temperatureCelcius.value; sensorTemperatures.sensor_dac_heatspreader.value = max31865Set3.temperatureCelcius.value;
sensorTemperatures.sensor_dac_heatspreader.setValid( sensorTemperatures.sensor_dac_heatspreader.setValid(
@ -282,7 +282,7 @@ void ThermalController::copySensors() {
} }
{ {
PoolReadGuard pg4(&max31865Set4); PoolReadGuard pg4(&max31865Set4, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg4.getReadResult() == returnvalue::OK) { if (pg4.getReadResult() == returnvalue::OK) {
sensorTemperatures.sensor_startracker.value = max31865Set4.temperatureCelcius.value; sensorTemperatures.sensor_startracker.value = max31865Set4.temperatureCelcius.value;
sensorTemperatures.sensor_startracker.setValid(max31865Set4.temperatureCelcius.isValid()); sensorTemperatures.sensor_startracker.setValid(max31865Set4.temperatureCelcius.isValid());
@ -293,7 +293,7 @@ void ThermalController::copySensors() {
} }
{ {
PoolReadGuard pg5(&max31865Set5); PoolReadGuard pg5(&max31865Set5, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg5.getReadResult() == returnvalue::OK) { if (pg5.getReadResult() == returnvalue::OK) {
sensorTemperatures.sensor_rw1.value = max31865Set5.temperatureCelcius.value; sensorTemperatures.sensor_rw1.value = max31865Set5.temperatureCelcius.value;
sensorTemperatures.sensor_rw1.setValid(max31865Set5.temperatureCelcius.isValid()); sensorTemperatures.sensor_rw1.setValid(max31865Set5.temperatureCelcius.isValid());
@ -304,7 +304,7 @@ void ThermalController::copySensors() {
} }
{ {
PoolReadGuard pg6(&max31865Set6); PoolReadGuard pg6(&max31865Set6, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg6.getReadResult() == returnvalue::OK) { if (pg6.getReadResult() == returnvalue::OK) {
sensorTemperatures.sensor_dro.value = max31865Set6.temperatureCelcius.value; sensorTemperatures.sensor_dro.value = max31865Set6.temperatureCelcius.value;
sensorTemperatures.sensor_dro.setValid(max31865Set6.temperatureCelcius.isValid()); sensorTemperatures.sensor_dro.setValid(max31865Set6.temperatureCelcius.isValid());
@ -315,7 +315,7 @@ void ThermalController::copySensors() {
} }
{ {
PoolReadGuard pg7(&max31865Set7); PoolReadGuard pg7(&max31865Set7, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg7.getReadResult() == returnvalue::OK) { if (pg7.getReadResult() == returnvalue::OK) {
sensorTemperatures.sensor_scex.value = max31865Set7.temperatureCelcius.value; sensorTemperatures.sensor_scex.value = max31865Set7.temperatureCelcius.value;
sensorTemperatures.sensor_scex.setValid(max31865Set7.temperatureCelcius.isValid()); sensorTemperatures.sensor_scex.setValid(max31865Set7.temperatureCelcius.isValid());
@ -326,7 +326,7 @@ void ThermalController::copySensors() {
} }
{ {
PoolReadGuard pg8(&max31865Set8); PoolReadGuard pg8(&max31865Set8, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg8.getReadResult() == returnvalue::OK) { if (pg8.getReadResult() == returnvalue::OK) {
sensorTemperatures.sensor_x8.value = max31865Set8.temperatureCelcius.value; sensorTemperatures.sensor_x8.value = max31865Set8.temperatureCelcius.value;
sensorTemperatures.sensor_x8.setValid(max31865Set8.temperatureCelcius.isValid()); sensorTemperatures.sensor_x8.setValid(max31865Set8.temperatureCelcius.isValid());
@ -337,7 +337,7 @@ void ThermalController::copySensors() {
} }
{ {
PoolReadGuard pg9(&max31865Set9); PoolReadGuard pg9(&max31865Set9, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg9.getReadResult() == returnvalue::OK) { if (pg9.getReadResult() == returnvalue::OK) {
sensorTemperatures.sensor_hpa.value = max31865Set9.temperatureCelcius.value; sensorTemperatures.sensor_hpa.value = max31865Set9.temperatureCelcius.value;
sensorTemperatures.sensor_hpa.setValid(max31865Set9.temperatureCelcius.isValid()); sensorTemperatures.sensor_hpa.setValid(max31865Set9.temperatureCelcius.isValid());
@ -348,7 +348,7 @@ void ThermalController::copySensors() {
} }
{ {
PoolReadGuard pg10(&max31865Set10); PoolReadGuard pg10(&max31865Set10, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg10.getReadResult() == returnvalue::OK) { if (pg10.getReadResult() == returnvalue::OK) {
sensorTemperatures.sensor_tx_modul.value = max31865Set10.temperatureCelcius.value; sensorTemperatures.sensor_tx_modul.value = max31865Set10.temperatureCelcius.value;
sensorTemperatures.sensor_tx_modul.setValid(max31865Set10.temperatureCelcius.isValid()); sensorTemperatures.sensor_tx_modul.setValid(max31865Set10.temperatureCelcius.isValid());
@ -359,7 +359,7 @@ void ThermalController::copySensors() {
} }
{ {
PoolReadGuard pg11(&max31865Set11); PoolReadGuard pg11(&max31865Set11, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg11.getReadResult() == returnvalue::OK) { if (pg11.getReadResult() == returnvalue::OK) {
sensorTemperatures.sensor_mpa.value = max31865Set11.temperatureCelcius.value; sensorTemperatures.sensor_mpa.value = max31865Set11.temperatureCelcius.value;
sensorTemperatures.sensor_mpa.setValid(max31865Set11.temperatureCelcius.isValid()); sensorTemperatures.sensor_mpa.setValid(max31865Set11.temperatureCelcius.isValid());
@ -370,7 +370,7 @@ void ThermalController::copySensors() {
} }
{ {
PoolReadGuard pg12(&max31865Set12); PoolReadGuard pg12(&max31865Set12, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg12.getReadResult() == returnvalue::OK) { if (pg12.getReadResult() == returnvalue::OK) {
sensorTemperatures.sensor_acu.value = max31865Set12.temperatureCelcius.value; sensorTemperatures.sensor_acu.value = max31865Set12.temperatureCelcius.value;
sensorTemperatures.sensor_acu.setValid(max31865Set12.temperatureCelcius.isValid()); sensorTemperatures.sensor_acu.setValid(max31865Set12.temperatureCelcius.isValid());
@ -381,7 +381,7 @@ void ThermalController::copySensors() {
} }
{ {
PoolReadGuard pg13(&max31865Set13); PoolReadGuard pg13(&max31865Set13, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg13.getReadResult() == returnvalue::OK) { if (pg13.getReadResult() == returnvalue::OK) {
sensorTemperatures.sensor_plpcdu_heatspreader.value = max31865Set13.temperatureCelcius.value; sensorTemperatures.sensor_plpcdu_heatspreader.value = max31865Set13.temperatureCelcius.value;
sensorTemperatures.sensor_plpcdu_heatspreader.setValid( sensorTemperatures.sensor_plpcdu_heatspreader.setValid(
@ -393,7 +393,7 @@ void ThermalController::copySensors() {
} }
{ {
PoolReadGuard pg14(&max31865Set14); PoolReadGuard pg14(&max31865Set14, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg14.getReadResult() == returnvalue::OK) { if (pg14.getReadResult() == returnvalue::OK) {
sensorTemperatures.sensor_tcs_board.value = max31865Set14.temperatureCelcius.value; sensorTemperatures.sensor_tcs_board.value = max31865Set14.temperatureCelcius.value;
sensorTemperatures.sensor_tcs_board.setValid(max31865Set14.temperatureCelcius.isValid()); sensorTemperatures.sensor_tcs_board.setValid(max31865Set14.temperatureCelcius.isValid());
@ -404,7 +404,7 @@ void ThermalController::copySensors() {
} }
{ {
PoolReadGuard pg15(&max31865Set15); PoolReadGuard pg15(&max31865Set15, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg15.getReadResult() == returnvalue::OK) { if (pg15.getReadResult() == returnvalue::OK) {
sensorTemperatures.sensor_magnettorquer.value = max31865Set15.temperatureCelcius.value; sensorTemperatures.sensor_magnettorquer.value = max31865Set15.temperatureCelcius.value;
sensorTemperatures.sensor_magnettorquer.setValid(max31865Set15.temperatureCelcius.isValid()); sensorTemperatures.sensor_magnettorquer.setValid(max31865Set15.temperatureCelcius.isValid());
@ -415,7 +415,7 @@ void ThermalController::copySensors() {
} }
{ {
PoolReadGuard pg111(&tmp1075Set1); PoolReadGuard pg111(&tmp1075Set1, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg111.getReadResult() == returnvalue::OK) { if (pg111.getReadResult() == returnvalue::OK) {
sensorTemperatures.sensor_tmp1075_1.value = tmp1075Set1.temperatureCelcius.value; sensorTemperatures.sensor_tmp1075_1.value = tmp1075Set1.temperatureCelcius.value;
sensorTemperatures.sensor_tmp1075_1.setValid(tmp1075Set1.temperatureCelcius.isValid()); sensorTemperatures.sensor_tmp1075_1.setValid(tmp1075Set1.temperatureCelcius.isValid());
@ -426,7 +426,7 @@ void ThermalController::copySensors() {
} }
{ {
PoolReadGuard pg112(&tmp1075Set2); PoolReadGuard pg112(&tmp1075Set2, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg112.getReadResult() == returnvalue::OK) { if (pg112.getReadResult() == returnvalue::OK) {
sensorTemperatures.sensor_tmp1075_2.value = tmp1075Set2.temperatureCelcius.value; sensorTemperatures.sensor_tmp1075_2.value = tmp1075Set2.temperatureCelcius.value;
sensorTemperatures.sensor_tmp1075_2.setValid(tmp1075Set2.temperatureCelcius.isValid()); sensorTemperatures.sensor_tmp1075_2.setValid(tmp1075Set2.temperatureCelcius.isValid());
@ -439,7 +439,7 @@ void ThermalController::copySensors() {
void ThermalController::copySus() { void ThermalController::copySus() {
{ {
PoolReadGuard pg0(&susSet0); PoolReadGuard pg0(&susSet0, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg0.getReadResult() == returnvalue::OK) { if (pg0.getReadResult() == returnvalue::OK) {
susTemperatures.sus_0_n_loc_xfyfzm_pt_xf.value = susSet0.temperatureCelcius.value; susTemperatures.sus_0_n_loc_xfyfzm_pt_xf.value = susSet0.temperatureCelcius.value;
susTemperatures.sus_0_n_loc_xfyfzm_pt_xf.setValid(susSet0.temperatureCelcius.isValid()); susTemperatures.sus_0_n_loc_xfyfzm_pt_xf.setValid(susSet0.temperatureCelcius.isValid());
@ -450,7 +450,7 @@ void ThermalController::copySus() {
} }
{ {
PoolReadGuard pg1(&susSet1); PoolReadGuard pg1(&susSet1, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg1.getReadResult() == returnvalue::OK) { if (pg1.getReadResult() == returnvalue::OK) {
susTemperatures.sus_6_r_loc_xfybzm_pt_xf.value = susSet1.temperatureCelcius.value; susTemperatures.sus_6_r_loc_xfybzm_pt_xf.value = susSet1.temperatureCelcius.value;
susTemperatures.sus_6_r_loc_xfybzm_pt_xf.setValid(susSet1.temperatureCelcius.isValid()); susTemperatures.sus_6_r_loc_xfybzm_pt_xf.setValid(susSet1.temperatureCelcius.isValid());
@ -461,7 +461,7 @@ void ThermalController::copySus() {
} }
{ {
PoolReadGuard pg2(&susSet2); PoolReadGuard pg2(&susSet2, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg2.getReadResult() == returnvalue::OK) { if (pg2.getReadResult() == returnvalue::OK) {
susTemperatures.sus_1_n_loc_xbyfzm_pt_xb.value = susSet2.temperatureCelcius.value; susTemperatures.sus_1_n_loc_xbyfzm_pt_xb.value = susSet2.temperatureCelcius.value;
susTemperatures.sus_1_n_loc_xbyfzm_pt_xb.setValid(susSet2.temperatureCelcius.isValid()); susTemperatures.sus_1_n_loc_xbyfzm_pt_xb.setValid(susSet2.temperatureCelcius.isValid());
@ -472,7 +472,7 @@ void ThermalController::copySus() {
} }
{ {
PoolReadGuard pg3(&susSet3); PoolReadGuard pg3(&susSet3, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg3.getReadResult() == returnvalue::OK) { if (pg3.getReadResult() == returnvalue::OK) {
susTemperatures.sus_7_r_loc_xbybzm_pt_xb.value = susSet3.temperatureCelcius.value; susTemperatures.sus_7_r_loc_xbybzm_pt_xb.value = susSet3.temperatureCelcius.value;
susTemperatures.sus_7_r_loc_xbybzm_pt_xb.setValid(susSet3.temperatureCelcius.isValid()); susTemperatures.sus_7_r_loc_xbybzm_pt_xb.setValid(susSet3.temperatureCelcius.isValid());
@ -483,7 +483,7 @@ void ThermalController::copySus() {
} }
{ {
PoolReadGuard pg4(&susSet4); PoolReadGuard pg4(&susSet4, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg4.getReadResult() == returnvalue::OK) { if (pg4.getReadResult() == returnvalue::OK) {
susTemperatures.sus_2_n_loc_xfybzb_pt_yb.value = susSet4.temperatureCelcius.value; susTemperatures.sus_2_n_loc_xfybzb_pt_yb.value = susSet4.temperatureCelcius.value;
susTemperatures.sus_2_n_loc_xfybzb_pt_yb.setValid(susSet4.temperatureCelcius.isValid()); susTemperatures.sus_2_n_loc_xfybzb_pt_yb.setValid(susSet4.temperatureCelcius.isValid());
@ -494,7 +494,7 @@ void ThermalController::copySus() {
} }
{ {
PoolReadGuard pg5(&susSet5); PoolReadGuard pg5(&susSet5, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg5.getReadResult() == returnvalue::OK) { if (pg5.getReadResult() == returnvalue::OK) {
susTemperatures.sus_8_r_loc_xbybzb_pt_yb.value = susSet5.temperatureCelcius.value; susTemperatures.sus_8_r_loc_xbybzb_pt_yb.value = susSet5.temperatureCelcius.value;
susTemperatures.sus_8_r_loc_xbybzb_pt_yb.setValid(susSet5.temperatureCelcius.isValid()); susTemperatures.sus_8_r_loc_xbybzb_pt_yb.setValid(susSet5.temperatureCelcius.isValid());
@ -505,7 +505,7 @@ void ThermalController::copySus() {
} }
{ {
PoolReadGuard pg6(&susSet6); PoolReadGuard pg6(&susSet6, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg6.getReadResult() == returnvalue::OK) { if (pg6.getReadResult() == returnvalue::OK) {
susTemperatures.sus_3_n_loc_xfybzf_pt_yf.value = susSet6.temperatureCelcius.value; susTemperatures.sus_3_n_loc_xfybzf_pt_yf.value = susSet6.temperatureCelcius.value;
susTemperatures.sus_3_n_loc_xfybzf_pt_yf.setValid(susSet6.temperatureCelcius.isValid()); susTemperatures.sus_3_n_loc_xfybzf_pt_yf.setValid(susSet6.temperatureCelcius.isValid());
@ -516,7 +516,7 @@ void ThermalController::copySus() {
} }
{ {
PoolReadGuard pg7(&susSet7); PoolReadGuard pg7(&susSet7, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg7.getReadResult() == returnvalue::OK) { if (pg7.getReadResult() == returnvalue::OK) {
susTemperatures.sus_9_r_loc_xbybzb_pt_yf.value = susSet7.temperatureCelcius.value; susTemperatures.sus_9_r_loc_xbybzb_pt_yf.value = susSet7.temperatureCelcius.value;
susTemperatures.sus_9_r_loc_xbybzb_pt_yf.setValid(susSet7.temperatureCelcius.isValid()); susTemperatures.sus_9_r_loc_xbybzb_pt_yf.setValid(susSet7.temperatureCelcius.isValid());
@ -527,7 +527,7 @@ void ThermalController::copySus() {
} }
{ {
PoolReadGuard pg8(&susSet8); PoolReadGuard pg8(&susSet8, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg8.getReadResult() == returnvalue::OK) { if (pg8.getReadResult() == returnvalue::OK) {
susTemperatures.sus_4_n_loc_xmyfzf_pt_zf.value = susSet8.temperatureCelcius.value; susTemperatures.sus_4_n_loc_xmyfzf_pt_zf.value = susSet8.temperatureCelcius.value;
susTemperatures.sus_4_n_loc_xmyfzf_pt_zf.setValid(susSet8.temperatureCelcius.isValid()); susTemperatures.sus_4_n_loc_xmyfzf_pt_zf.setValid(susSet8.temperatureCelcius.isValid());
@ -538,7 +538,7 @@ void ThermalController::copySus() {
} }
{ {
PoolReadGuard pg9(&susSet9); PoolReadGuard pg9(&susSet9, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg9.getReadResult() == returnvalue::OK) { if (pg9.getReadResult() == returnvalue::OK) {
susTemperatures.sus_10_n_loc_xmybzf_pt_zf.value = susSet9.temperatureCelcius.value; susTemperatures.sus_10_n_loc_xmybzf_pt_zf.value = susSet9.temperatureCelcius.value;
susTemperatures.sus_10_n_loc_xmybzf_pt_zf.setValid(susSet9.temperatureCelcius.isValid()); susTemperatures.sus_10_n_loc_xmybzf_pt_zf.setValid(susSet9.temperatureCelcius.isValid());
@ -549,7 +549,7 @@ void ThermalController::copySus() {
} }
{ {
PoolReadGuard pg10(&susSet10); PoolReadGuard pg10(&susSet10, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg10.getReadResult() == returnvalue::OK) { if (pg10.getReadResult() == returnvalue::OK) {
susTemperatures.sus_5_n_loc_xfymzb_pt_zb.value = susSet10.temperatureCelcius.value; susTemperatures.sus_5_n_loc_xfymzb_pt_zb.value = susSet10.temperatureCelcius.value;
susTemperatures.sus_5_n_loc_xfymzb_pt_zb.setValid(susSet10.temperatureCelcius.isValid()); susTemperatures.sus_5_n_loc_xfymzb_pt_zb.setValid(susSet10.temperatureCelcius.isValid());
@ -560,7 +560,7 @@ void ThermalController::copySus() {
} }
{ {
PoolReadGuard pg11(&susSet11); PoolReadGuard pg11(&susSet11, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
if (pg11.getReadResult() == returnvalue::OK) { if (pg11.getReadResult() == returnvalue::OK) {
susTemperatures.sus_11_r_loc_xbymzb_pt_zb.value = susSet11.temperatureCelcius.value; susTemperatures.sus_11_r_loc_xbymzb_pt_zb.value = susSet11.temperatureCelcius.value;
susTemperatures.sus_11_r_loc_xbymzb_pt_zb.setValid(susSet11.temperatureCelcius.isValid()); susTemperatures.sus_11_r_loc_xbymzb_pt_zb.setValid(susSet11.temperatureCelcius.isValid());

View File

@ -75,6 +75,7 @@ class ThermalController : public ExtendedControllerBase {
// Initial delay to make sure all pool variables have been initialized their owners // Initial delay to make sure all pool variables have been initialized their owners
Countdown initialCountdown = Countdown(DELAY); Countdown initialCountdown = Countdown(DELAY);
static constexpr dur_millis_t MUTEX_TIMEOUT = 50;
void copySensors(); void copySensors();
void copySus(); void copySus();
void copyDevices(); void copyDevices();

View File

@ -52,8 +52,8 @@ ReturnValue_t PCDUHandler::initialize() {
return returnvalue::FAILED; return returnvalue::FAILED;
} }
result = pdu2Handler->getSubscriptionInterface()->subscribeForSetUpdateMessage( result = pdu2Handler->getSubscriptionInterface()->subscribeForSetUpdateMessage(
static_cast<uint32_t>(P60System::SetIds::PDU_2_CORE), this->getObjectId(), static_cast<uint32_t>(P60System::SetIds::CORE), this->getObjectId(), commandQueue->getId(),
commandQueue->getId(), true); true);
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
sif::error << "PCDUHandler::initialize: Failed to subscribe for set update messages from " sif::error << "PCDUHandler::initialize: Failed to subscribe for set update messages from "
<< "PDU2Handler" << std::endl; << "PDU2Handler" << std::endl;
@ -68,8 +68,8 @@ ReturnValue_t PCDUHandler::initialize() {
return returnvalue::FAILED; return returnvalue::FAILED;
} }
result = pdu1Handler->getSubscriptionInterface()->subscribeForSetUpdateMessage( result = pdu1Handler->getSubscriptionInterface()->subscribeForSetUpdateMessage(
static_cast<uint32_t>(P60System::SetIds::PDU_1_CORE), this->getObjectId(), static_cast<uint32_t>(P60System::SetIds::CORE), this->getObjectId(), commandQueue->getId(),
commandQueue->getId(), true); true);
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
sif::error << "PCDUHandler::initialize: Failed to subscribe for set update messages from " sif::error << "PCDUHandler::initialize: Failed to subscribe for set update messages from "
<< "PDU1Handler" << std::endl; << "PDU1Handler" << std::endl;
@ -110,11 +110,10 @@ void PCDUHandler::readCommandQueue() {
MessageQueueId_t PCDUHandler::getCommandQueue() const { return commandQueue->getId(); } MessageQueueId_t PCDUHandler::getCommandQueue() const { return commandQueue->getId(); }
void PCDUHandler::handleChangedDataset(sid_t sid, store_address_t storeId, bool* clearMessage) { void PCDUHandler::handleChangedDataset(sid_t sid, store_address_t storeId, bool* clearMessage) {
if (sid == sid_t(objects::PDU2_HANDLER, static_cast<uint32_t>(P60System::SetIds::PDU_2_CORE))) { if (sid == sid_t(objects::PDU2_HANDLER, static_cast<uint32_t>(P60System::SetIds::CORE))) {
updateHkTableDataset(storeId, &pdu2CoreHk, &timeStampPdu2HkDataset); updateHkTableDataset(storeId, &pdu2CoreHk, &timeStampPdu2HkDataset);
updatePdu2SwitchStates(); updatePdu2SwitchStates();
} else if (sid == } else if (sid == sid_t(objects::PDU1_HANDLER, static_cast<uint32_t>(P60System::SetIds::CORE))) {
sid_t(objects::PDU1_HANDLER, static_cast<uint32_t>(P60System::SetIds::PDU_1_CORE))) {
updateHkTableDataset(storeId, &pdu1CoreHk, &timeStampPdu1HkDataset); updateHkTableDataset(storeId, &pdu1CoreHk, &timeStampPdu1HkDataset);
updatePdu1SwitchStates(); updatePdu1SwitchStates();
} else { } else {

View File

@ -33,6 +33,7 @@ void PayloadPcduHandler::doStartUp() {
if (pwrStateMachine.getState() == power::States::IDLE) { if (pwrStateMachine.getState() == power::States::IDLE) {
pwrStateMachine.start(MODE_ON, pwrSubmode); pwrStateMachine.start(MODE_ON, pwrSubmode);
} }
clearSetOnOffFlag = true;
auto opCode = pwrStateMachine.fsm(); auto opCode = pwrStateMachine.fsm();
if (opCode == power::OpCodes::TO_NOT_OFF_DONE or opCode == power::OpCodes::TIMEOUT_OCCURED) { if (opCode == power::OpCodes::TO_NOT_OFF_DONE or opCode == power::OpCodes::TIMEOUT_OCCURED) {
pwrStateMachine.reset(); pwrStateMachine.reset();
@ -50,6 +51,11 @@ void PayloadPcduHandler::doShutDown() {
if (pwrStateMachine.getState() == power::States::IDLE) { if (pwrStateMachine.getState() == power::States::IDLE) {
pwrStateMachine.start(MODE_OFF, 0); pwrStateMachine.start(MODE_OFF, 0);
} }
if (clearSetOnOffFlag) {
std::memset(adcSet.processed.value, 0, adcSet.processed.getSerializedSize());
clearSetOnOffFlag = false;
}
auto opCode = pwrStateMachine.fsm(); auto opCode = pwrStateMachine.fsm();
if (opCode == power::OpCodes::TO_OFF_DONE or opCode == power::OpCodes::TIMEOUT_OCCURED) { if (opCode == power::OpCodes::TO_OFF_DONE or opCode == power::OpCodes::TIMEOUT_OCCURED) {
pwrStateMachine.reset(); pwrStateMachine.reset();

View File

@ -124,6 +124,7 @@ class PayloadPcduHandler : public DeviceHandlerBase {
bool txToMpaInjectionRequested = false; bool txToMpaInjectionRequested = false;
bool mpaToHpaInjectionRequested = false; bool mpaToHpaInjectionRequested = false;
bool allOnInjectRequested = false; bool allOnInjectRequested = false;
bool clearSetOnOffFlag = true;
PeriodicOperationDivider opDivider = PeriodicOperationDivider(5); PeriodicOperationDivider opDivider = PeriodicOperationDivider(5);
uint8_t tempReadDivisor = 1; uint8_t tempReadDivisor = 1;

View File

@ -304,9 +304,9 @@ ReturnValue_t RwHandler::checkSpeedAndRampTime(const uint8_t* commandData, size_
return INVALID_SPEED; return INVALID_SPEED;
} }
uint16_t rampTime = *(commandData + 4) << 8 | *(commandData + 5); uint16_t rampTime = (*(commandData + 4) << 8) | *(commandData + 5);
if (rampTime < 10 || rampTime > 10000) { if (rampTime < 10 || rampTime > 20000) {
sif::error << "RwHandler::checkSpeedAndRampTime: Command has invalid ramp time" << std::endl; sif::error << "RwHandler::checkSpeedAndRampTime: Command has invalid ramp time" << std::endl;
return INVALID_RAMP_TIME; return INVALID_RAMP_TIME;
} }

View File

@ -102,19 +102,7 @@ namespace P60System {
enum class BatteryModes : uint8_t { CRITICAL = 1, SAFE = 2, NORMAL = 3, FULL = 4 }; enum class BatteryModes : uint8_t { CRITICAL = 1, SAFE = 2, NORMAL = 3, FULL = 4 };
enum class SetIds : uint32_t { enum class SetIds : uint32_t { CORE = 1, AUX = 2, CONFIG = 3 };
PDU_1_CORE = 1,
PDU_1_AUX = 2,
PDU_2_CORE = 3,
PDU_2_AUX = 4,
P60_CORE = 5,
P60_AUX = 6,
ACU_CORE = 7,
ACU_AUX = 8,
PDU_1_CONFIG = 9,
PDU_2_CONFIG = 10
};
} // namespace P60System } // namespace P60System
@ -217,10 +205,10 @@ static const uint8_t HK_TABLE_ENTRIES = 100;
class CoreHkSet : public StaticLocalDataSet<16> { class CoreHkSet : public StaticLocalDataSet<16> {
public: public:
CoreHkSet(HasLocalDataPoolIF* owner) CoreHkSet(HasLocalDataPoolIF* owner)
: StaticLocalDataSet(owner, static_cast<uint32_t>(::P60System::SetIds::P60_CORE)) {} : StaticLocalDataSet(owner, static_cast<uint32_t>(::P60System::SetIds::CORE)) {}
CoreHkSet(object_id_t objectId) CoreHkSet(object_id_t objectId)
: StaticLocalDataSet(sid_t(objectId, static_cast<uint32_t>(::P60System::SetIds::P60_CORE))) {} : StaticLocalDataSet(sid_t(objectId, static_cast<uint32_t>(::P60System::SetIds::CORE))) {}
/** Measured output currents */ /** Measured output currents */
lp_vec_t<int16_t, P60Dock::hk::Index::CHNLS_LEN> currents = lp_vec_t<int16_t, P60Dock::hk::Index::CHNLS_LEN> currents =
@ -254,10 +242,10 @@ class CoreHkSet : public StaticLocalDataSet<16> {
class HkTableDataset : public StaticLocalDataSet<32> { class HkTableDataset : public StaticLocalDataSet<32> {
public: public:
HkTableDataset(HasLocalDataPoolIF* owner) HkTableDataset(HasLocalDataPoolIF* owner)
: StaticLocalDataSet(owner, static_cast<uint32_t>(::P60System::SetIds::P60_AUX)) {} : StaticLocalDataSet(owner, static_cast<uint32_t>(::P60System::SetIds::AUX)) {}
HkTableDataset(object_id_t objectId) HkTableDataset(object_id_t objectId)
: StaticLocalDataSet(sid_t(objectId, static_cast<uint32_t>(::P60System::SetIds::P60_AUX))) {} : StaticLocalDataSet(sid_t(objectId, static_cast<uint32_t>(::P60System::SetIds::AUX))) {}
/** Number of detected latchups on each output channel */ /** Number of detected latchups on each output channel */
lp_vec_t<uint16_t, P60Dock::hk::Index::CHNLS_LEN> latchups = lp_vec_t<uint16_t, P60Dock::hk::Index::CHNLS_LEN> latchups =
@ -545,25 +533,25 @@ static const uint16_t CONFIG_ADDRESS_OUT_EN_CHANNEL8 = 0x50;
class Pdu1CoreHk : public ::PDU::PduCoreHk { class Pdu1CoreHk : public ::PDU::PduCoreHk {
public: public:
Pdu1CoreHk(HasLocalDataPoolIF* owner) Pdu1CoreHk(HasLocalDataPoolIF* owner)
: PduCoreHk(owner, static_cast<uint32_t>(::P60System::SetIds::PDU_1_CORE)) {} : PduCoreHk(owner, static_cast<uint32_t>(::P60System::SetIds::CORE)) {}
Pdu1CoreHk(object_id_t objectId) Pdu1CoreHk(object_id_t objectId)
: PduCoreHk(objectId, static_cast<uint32_t>(::P60System::SetIds::PDU_1_CORE)) {} : PduCoreHk(objectId, static_cast<uint32_t>(::P60System::SetIds::CORE)) {}
}; };
class Pdu1AuxHk : public ::PDU::PduAuxHk { class Pdu1AuxHk : public ::PDU::PduAuxHk {
public: public:
Pdu1AuxHk(HasLocalDataPoolIF* owner) Pdu1AuxHk(HasLocalDataPoolIF* owner)
: PduAuxHk(owner, static_cast<uint32_t>(::P60System::SetIds::PDU_1_AUX)) {} : PduAuxHk(owner, static_cast<uint32_t>(::P60System::SetIds::AUX)) {}
Pdu1AuxHk(object_id_t objectId) Pdu1AuxHk(object_id_t objectId)
: PduAuxHk(objectId, static_cast<uint32_t>(::P60System::SetIds::PDU_1_AUX)) {} : PduAuxHk(objectId, static_cast<uint32_t>(::P60System::SetIds::AUX)) {}
}; };
class Pdu1Config : public ::PDU::PduConfig { class Pdu1Config : public ::PDU::PduConfig {
public: public:
Pdu1Config(HasLocalDataPoolIF* owner) Pdu1Config(HasLocalDataPoolIF* owner)
: PduConfig(owner, static_cast<uint32_t>(::P60System::SetIds::PDU_1_CONFIG)) {} : PduConfig(owner, static_cast<uint32_t>(::P60System::SetIds::CONFIG)) {}
}; };
} // namespace PDU1 } // namespace PDU1
@ -600,25 +588,25 @@ static const uint16_t CONFIG_ADDRESS_OUT_EN_PAYLOAD_CAMERA = 0x50;
class Pdu2CoreHk : public ::PDU::PduCoreHk { class Pdu2CoreHk : public ::PDU::PduCoreHk {
public: public:
Pdu2CoreHk(HasLocalDataPoolIF* owner) Pdu2CoreHk(HasLocalDataPoolIF* owner)
: PduCoreHk(owner, static_cast<uint32_t>(::P60System::SetIds::PDU_2_CORE)) {} : PduCoreHk(owner, static_cast<uint32_t>(::P60System::SetIds::CORE)) {}
Pdu2CoreHk(object_id_t objectId) Pdu2CoreHk(object_id_t objectId)
: PduCoreHk(objectId, static_cast<uint32_t>(::P60System::SetIds::PDU_2_CORE)) {} : PduCoreHk(objectId, static_cast<uint32_t>(::P60System::SetIds::CORE)) {}
}; };
class Pdu2AuxHk : public ::PDU::PduAuxHk { class Pdu2AuxHk : public ::PDU::PduAuxHk {
public: public:
Pdu2AuxHk(HasLocalDataPoolIF* owner) Pdu2AuxHk(HasLocalDataPoolIF* owner)
: PduAuxHk(owner, static_cast<uint32_t>(::P60System::SetIds::PDU_2_AUX)) {} : PduAuxHk(owner, static_cast<uint32_t>(::P60System::SetIds::AUX)) {}
Pdu2AuxHk(object_id_t objectId) Pdu2AuxHk(object_id_t objectId)
: PduAuxHk(objectId, static_cast<uint32_t>(::P60System::SetIds::PDU_2_AUX)) {} : PduAuxHk(objectId, static_cast<uint32_t>(::P60System::SetIds::AUX)) {}
}; };
class Pdu2Config : public ::PDU::PduConfig { class Pdu2Config : public ::PDU::PduConfig {
public: public:
Pdu2Config(HasLocalDataPoolIF* owner) Pdu2Config(HasLocalDataPoolIF* owner)
: PduConfig(owner, static_cast<uint32_t>(::P60System::SetIds::PDU_2_CONFIG)) {} : PduConfig(owner, static_cast<uint32_t>(::P60System::SetIds::CONFIG)) {}
}; };
} // namespace PDU2 } // namespace PDU2
@ -661,10 +649,10 @@ static const size_t MAX_REPLY_SIZE = HK_TABLE_SIZE;
class CoreHk : public StaticLocalDataSet<14> { class CoreHk : public StaticLocalDataSet<14> {
public: public:
CoreHk(HasLocalDataPoolIF* owner) CoreHk(HasLocalDataPoolIF* owner)
: StaticLocalDataSet(owner, static_cast<uint32_t>(::P60System::SetIds::ACU_CORE)) {} : StaticLocalDataSet(owner, static_cast<uint32_t>(::P60System::SetIds::CORE)) {}
CoreHk(object_id_t objectId) CoreHk(object_id_t objectId)
: StaticLocalDataSet(sid_t(objectId, static_cast<uint32_t>(::P60System::SetIds::ACU_CORE))) {} : StaticLocalDataSet(sid_t(objectId, static_cast<uint32_t>(::P60System::SetIds::CORE))) {}
lp_var_t<uint8_t> mpptMode = lp_var_t<uint8_t>(sid.objectId, pool::ACU_MPPT_MODE, this); lp_var_t<uint8_t> mpptMode = lp_var_t<uint8_t>(sid.objectId, pool::ACU_MPPT_MODE, this);
@ -694,10 +682,10 @@ class CoreHk : public StaticLocalDataSet<14> {
class AuxHk : public StaticLocalDataSet<12> { class AuxHk : public StaticLocalDataSet<12> {
public: public:
AuxHk(HasLocalDataPoolIF* owner) AuxHk(HasLocalDataPoolIF* owner)
: StaticLocalDataSet(owner, static_cast<uint32_t>(::P60System::SetIds::ACU_AUX)) {} : StaticLocalDataSet(owner, static_cast<uint32_t>(::P60System::SetIds::AUX)) {}
AuxHk(object_id_t objectId) AuxHk(object_id_t objectId)
: StaticLocalDataSet(sid_t(objectId, static_cast<uint32_t>(::P60System::SetIds::ACU_AUX))) {} : StaticLocalDataSet(sid_t(objectId, static_cast<uint32_t>(::P60System::SetIds::AUX))) {}
lp_vec_t<uint8_t, 3> dacEnables = lp_vec_t<uint8_t, 3>(sid.objectId, pool::ACU_DAC_ENABLES, this); lp_vec_t<uint8_t, 3> dacEnables = lp_vec_t<uint8_t, 3>(sid.objectId, pool::ACU_DAC_ENABLES, this);

2
tmtc

@ -1 +1 @@
Subproject commit 7f56d1e726c0432e05713d07415886d43fd9d76c Subproject commit 90c9cf297bc7158893181dbe3694d7814fae7730