completed switcher switch case
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
Robin Müller 2022-03-03 15:43:21 +01:00
parent ff0da65662
commit 261b4a808d
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
3 changed files with 63 additions and 2 deletions

View File

@ -234,16 +234,77 @@ void PCDUHandler::sendSwitchCommand(uint8_t switchNr, ReturnValue_t onOff) const
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
break;
}
case pcduSwitches::PDU1_CH4_SUS_NOMINAL_3V3: {
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_SUS_NOMINAL;
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
break;
}
case pcduSwitches::PDU1_CH5_SOLAR_CELL_EXP_5V: {
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_SOLAR_CELL_EXP;
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
break;
}
case pcduSwitches::PDU1_CH6_PLOC_12V: {
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_PLOC;
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
break;
}
case pcduSwitches::PDU1_CH7_ACS_A_SIDE_3V3: {
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_ACS_BOARD_SIDE_A;
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
break;
}
case pcduSwitches::PDU1_CH8_UNOCCUPIED: {
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_CHANNEL8;
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
break;
}
// That does not really make sense but let's keep it here for completeness reasons..
case pcduSwitches::PDU2_CH0_Q7S: {
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_Q7S;
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
break;
}
case pcduSwitches::PDU2_CH1_PL_PCDU_BATT_0_14V8: {
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_PAYLOAD_PCDU_CH1;
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
break;
}
case pcduSwitches::PDU2_CH2_RW_5V: {
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_RW;
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
break;
}
case pcduSwitches::PDU2_CH3_TCS_BOARD_HEATER_IN_8V: {
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_TCS_BOARD_HEATER_IN;
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
break;
}
case pcduSwitches::PDU2_CH4_SUS_REDUNDANT_3V3: {
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_SUS_REDUNDANT;
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
break;
}
case pcduSwitches::PDU2_CH5_DEPLOYMENT_MECHANISM_8V: {
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_DEPLOYMENT_MECHANISM;
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
break;
}
case pcduSwitches::PDU2_CH6_PL_PCDU_BATT_1_14V8: {
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_PAYLOAD_PCDU_CH6;
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
break;
}
case pcduSwitches::PDU2_CH7_ACS_BOARD_SIDE_B_3V3: {
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_ACS_BOARD_SIDE_B;
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
break;
}
case pcduSwitches::PDU2_CH8_PAYLOAD_CAMERA: {
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_PAYLOAD_CAMERA;
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
break;
}
default: {
sif::error << "PCDUHandler::sendSwitchCommand: Invalid switch number " << std::endl;

View File

@ -460,7 +460,7 @@ ReturnValue_t PDU2Handler::setParamCallback(SetParamMessageUnpacker &unpacker,
channelSwitchHook(pdu, 5, unpacker.getParameter()[0], hookArgs);
break;
}
case (CONFIG_ADDRESS_OUT_EN_PAYLOAD_PCDU_CH6PLOC): {
case (CONFIG_ADDRESS_OUT_EN_PAYLOAD_PCDU_CH6): {
channelSwitchHook(pdu, 6, unpacker.getParameter()[0], hookArgs);
break;
}

View File

@ -848,7 +848,7 @@ static const uint16_t CONFIG_ADDRESS_OUT_EN_RW = 0x4A;
static const uint16_t CONFIG_ADDRESS_OUT_EN_TCS_BOARD_HEATER_IN = 0x4B;
static const uint16_t CONFIG_ADDRESS_OUT_EN_SUS_REDUNDANT = 0x4C;
static const uint16_t CONFIG_ADDRESS_OUT_EN_DEPLOYMENT_MECHANISM = 0x4D;
static const uint16_t CONFIG_ADDRESS_OUT_EN_PAYLOAD_PCDU_CH6PLOC = 0x4E;
static const uint16_t CONFIG_ADDRESS_OUT_EN_PAYLOAD_PCDU_CH6 = 0x4E;
static const uint16_t CONFIG_ADDRESS_OUT_EN_ACS_BOARD_SIDE_B = 0x4F;
static const uint16_t CONFIG_ADDRESS_OUT_EN_PAYLOAD_CAMERA = 0x50;