diff --git a/mission/devices/PCDUHandler.cpp b/mission/devices/PCDUHandler.cpp index 1b47c7f1..2a8607bf 100644 --- a/mission/devices/PCDUHandler.cpp +++ b/mission/devices/PCDUHandler.cpp @@ -175,6 +175,7 @@ void PCDUHandler::updatePdu2SwitchStates() { for (uint8_t idx = 0; idx < PDU::CHANNELS_LEN; idx++) { switcherSet.pdu2Switches[idx] = pdu2CoreHk.outputEnables[idx]; } + switcherSet.pdu2Switches.setValid(true); MutexGuard mg(pwrMutex); checkAndUpdateSwitch(pdu, Switches::PDU2_CH0_Q7S, pdu2CoreHk.outputEnables[Channels::Q7S]); @@ -196,7 +197,6 @@ void PCDUHandler::updatePdu2SwitchStates() { if (firstSwitchInfoPdu2) { firstSwitchInfoPdu2 = false; } - switcherSet.pduSwitches.setValid(true); } else { sif::debug << "PCDUHandler::updatePdu2SwitchStates: Failed to read PDU2 Hk Dataset" << std::endl; @@ -212,6 +212,7 @@ void PCDUHandler::updatePdu1SwitchStates() { for (uint8_t idx = 0; idx < PDU::CHANNELS_LEN; idx++) { switcherSet.pdu1Switches[idx] = pdu1CoreHk.outputEnables[idx]; } + switcherSet.pdu1Switches.setValid(true); MutexGuard mg(pwrMutex); checkAndUpdateSwitch(pdu, Switches::PDU1_CH0_TCS_BOARD_3V3, pdu1CoreHk.outputEnables[Channels::TCS_BOARD_3V3]); @@ -233,7 +234,6 @@ void PCDUHandler::updatePdu1SwitchStates() { if (firstSwitchInfoPdu1) { firstSwitchInfoPdu1 = false; } - switcherSet.pdu2Switches.setValid(true); } else { sif::debug << "PCDUHandler::updatePdu1SwitchStates: Failed to read dataset" << std::endl; }