some more bugfixes
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
@ -41,6 +41,8 @@ ReturnValue_t PCDUHandler::performOperation(uint8_t counter) {
|
||||
if (pg.getReadResult() == returnvalue::OK) {
|
||||
if (switcherSet.p60Dock5VStack.value != switchState) {
|
||||
triggerEvent(power::SWITCH_HAS_CHANGED, switchState, pcdu::Switches::P60_DOCK_5V_STACK);
|
||||
MutexGuard mg(pwrMutex);
|
||||
switchStates[pcdu::P60_DOCK_5V_STACK] = switchState;
|
||||
}
|
||||
switcherSet.p60Dock5VStack.setValid(true);
|
||||
switcherSet.p60Dock5VStack.value = switchState;
|
||||
@ -178,23 +180,23 @@ void PCDUHandler::updatePdu2SwitchStates() {
|
||||
}
|
||||
switcherSet.pdu2Switches.setValid(true);
|
||||
MutexGuard mg(pwrMutex);
|
||||
checkAndUpdateSwitch(pdu, Switches::PDU2_CH0_Q7S, pdu2CoreHk.outputEnables[Channels::Q7S]);
|
||||
checkAndUpdatePduSwitch(pdu, Switches::PDU2_CH0_Q7S, pdu2CoreHk.outputEnables[Channels::Q7S]);
|
||||
|
||||
checkAndUpdateSwitch(pdu, Switches::PDU2_CH1_PL_PCDU_BATT_0_14V8,
|
||||
pdu2CoreHk.outputEnables[Channels::PAYLOAD_PCDU_CH1]);
|
||||
checkAndUpdateSwitch(pdu, Switches::PDU2_CH2_RW_5V, pdu2CoreHk.outputEnables[Channels::RW]);
|
||||
checkAndUpdateSwitch(pdu, Switches::PDU2_CH3_TCS_BOARD_HEATER_IN_8V,
|
||||
pdu2CoreHk.outputEnables[Channels::TCS_HEATER_IN]);
|
||||
checkAndUpdateSwitch(pdu, Switches::PDU2_CH4_SUS_REDUNDANT_3V3,
|
||||
pdu2CoreHk.outputEnables[Channels::SUS_REDUNDANT]);
|
||||
checkAndUpdateSwitch(pdu, Switches::PDU2_CH5_DEPLOYMENT_MECHANISM_8V,
|
||||
pdu2CoreHk.outputEnables[Channels::DEPY_MECHANISM]);
|
||||
checkAndUpdateSwitch(pdu, Switches::PDU2_CH6_PL_PCDU_BATT_1_14V8,
|
||||
pdu2CoreHk.outputEnables[Channels::PAYLOAD_PCDU_CH6]);
|
||||
checkAndUpdateSwitch(pdu, Switches::PDU2_CH7_ACS_BOARD_SIDE_B_3V3,
|
||||
pdu2CoreHk.outputEnables[Channels::ACS_B_SIDE]);
|
||||
checkAndUpdateSwitch(pdu, Switches::PDU2_CH8_PAYLOAD_CAMERA,
|
||||
pdu2CoreHk.outputEnables[Channels::PAYLOAD_CAMERA]);
|
||||
checkAndUpdatePduSwitch(pdu, Switches::PDU2_CH1_PL_PCDU_BATT_0_14V8,
|
||||
pdu2CoreHk.outputEnables[Channels::PAYLOAD_PCDU_CH1]);
|
||||
checkAndUpdatePduSwitch(pdu, Switches::PDU2_CH2_RW_5V, pdu2CoreHk.outputEnables[Channels::RW]);
|
||||
checkAndUpdatePduSwitch(pdu, Switches::PDU2_CH3_TCS_BOARD_HEATER_IN_8V,
|
||||
pdu2CoreHk.outputEnables[Channels::TCS_HEATER_IN]);
|
||||
checkAndUpdatePduSwitch(pdu, Switches::PDU2_CH4_SUS_REDUNDANT_3V3,
|
||||
pdu2CoreHk.outputEnables[Channels::SUS_REDUNDANT]);
|
||||
checkAndUpdatePduSwitch(pdu, Switches::PDU2_CH5_DEPLOYMENT_MECHANISM_8V,
|
||||
pdu2CoreHk.outputEnables[Channels::DEPY_MECHANISM]);
|
||||
checkAndUpdatePduSwitch(pdu, Switches::PDU2_CH6_PL_PCDU_BATT_1_14V8,
|
||||
pdu2CoreHk.outputEnables[Channels::PAYLOAD_PCDU_CH6]);
|
||||
checkAndUpdatePduSwitch(pdu, Switches::PDU2_CH7_ACS_BOARD_SIDE_B_3V3,
|
||||
pdu2CoreHk.outputEnables[Channels::ACS_B_SIDE]);
|
||||
checkAndUpdatePduSwitch(pdu, Switches::PDU2_CH8_PAYLOAD_CAMERA,
|
||||
pdu2CoreHk.outputEnables[Channels::PAYLOAD_CAMERA]);
|
||||
if (firstSwitchInfoPdu2) {
|
||||
firstSwitchInfoPdu2 = false;
|
||||
}
|
||||
@ -215,23 +217,24 @@ void PCDUHandler::updatePdu1SwitchStates() {
|
||||
}
|
||||
switcherSet.pdu1Switches.setValid(true);
|
||||
MutexGuard mg(pwrMutex);
|
||||
checkAndUpdateSwitch(pdu, Switches::PDU1_CH0_TCS_BOARD_3V3,
|
||||
pdu1CoreHk.outputEnables[Channels::TCS_BOARD_3V3]);
|
||||
checkAndUpdateSwitch(pdu, Switches::PDU1_CH1_SYRLINKS_12V,
|
||||
pdu1CoreHk.outputEnables[Channels::SYRLINKS]);
|
||||
checkAndUpdateSwitch(pdu, Switches::PDU1_CH2_STAR_TRACKER_5V,
|
||||
pdu1CoreHk.outputEnables[Channels::STR]);
|
||||
checkAndUpdateSwitch(pdu, Switches::PDU1_CH3_MGT_5V, pdu1CoreHk.outputEnables[Channels::MGT]);
|
||||
checkAndUpdateSwitch(pdu, Switches::PDU1_CH4_SUS_NOMINAL_3V3,
|
||||
pdu1CoreHk.outputEnables[Channels::SUS_NOMINAL]);
|
||||
checkAndUpdateSwitch(pdu, Switches::PDU1_CH5_SOLAR_CELL_EXP_5V,
|
||||
pdu1CoreHk.outputEnables[Channels::SOL_CELL_EXPERIMENT]);
|
||||
checkAndUpdateSwitch(pdu, Switches::PDU1_CH6_PLOC_12V,
|
||||
pdu1CoreHk.outputEnables[Channels::PLOC]);
|
||||
checkAndUpdateSwitch(pdu, Switches::PDU1_CH7_ACS_A_SIDE_3V3,
|
||||
pdu1CoreHk.outputEnables[Channels::ACS_A_SIDE]);
|
||||
checkAndUpdateSwitch(pdu, Switches::PDU1_CH8_UNOCCUPIED,
|
||||
pdu1CoreHk.outputEnables[Channels::UNUSED]);
|
||||
checkAndUpdatePduSwitch(pdu, Switches::PDU1_CH0_TCS_BOARD_3V3,
|
||||
pdu1CoreHk.outputEnables[Channels::TCS_BOARD_3V3]);
|
||||
checkAndUpdatePduSwitch(pdu, Switches::PDU1_CH1_SYRLINKS_12V,
|
||||
pdu1CoreHk.outputEnables[Channels::SYRLINKS]);
|
||||
checkAndUpdatePduSwitch(pdu, Switches::PDU1_CH2_STAR_TRACKER_5V,
|
||||
pdu1CoreHk.outputEnables[Channels::STR]);
|
||||
checkAndUpdatePduSwitch(pdu, Switches::PDU1_CH3_MGT_5V,
|
||||
pdu1CoreHk.outputEnables[Channels::MGT]);
|
||||
checkAndUpdatePduSwitch(pdu, Switches::PDU1_CH4_SUS_NOMINAL_3V3,
|
||||
pdu1CoreHk.outputEnables[Channels::SUS_NOMINAL]);
|
||||
checkAndUpdatePduSwitch(pdu, Switches::PDU1_CH5_SOLAR_CELL_EXP_5V,
|
||||
pdu1CoreHk.outputEnables[Channels::SOL_CELL_EXPERIMENT]);
|
||||
checkAndUpdatePduSwitch(pdu, Switches::PDU1_CH6_PLOC_12V,
|
||||
pdu1CoreHk.outputEnables[Channels::PLOC]);
|
||||
checkAndUpdatePduSwitch(pdu, Switches::PDU1_CH7_ACS_A_SIDE_3V3,
|
||||
pdu1CoreHk.outputEnables[Channels::ACS_A_SIDE]);
|
||||
checkAndUpdatePduSwitch(pdu, Switches::PDU1_CH8_UNOCCUPIED,
|
||||
pdu1CoreHk.outputEnables[Channels::UNUSED]);
|
||||
if (firstSwitchInfoPdu1) {
|
||||
firstSwitchInfoPdu1 = false;
|
||||
}
|
||||
@ -450,8 +453,8 @@ LocalPoolDataSetBase* PCDUHandler::getDataSetHandle(sid_t sid) {
|
||||
}
|
||||
}
|
||||
|
||||
void PCDUHandler::checkAndUpdateSwitch(GOMSPACE::Pdu pdu, pcdu::Switches switchIdx,
|
||||
uint8_t setValue) {
|
||||
void PCDUHandler::checkAndUpdatePduSwitch(GOMSPACE::Pdu pdu, pcdu::Switches switchIdx,
|
||||
uint8_t setValue) {
|
||||
using namespace pcdu;
|
||||
if (switchStates[switchIdx] != setValue) {
|
||||
#if OBSW_INITIALIZE_SWITCHES == 1
|
||||
|
Reference in New Issue
Block a user