This commit is contained in:
parent
557162fe8c
commit
635473b687
@ -251,52 +251,52 @@ ReturnValue_t PCDUHandler::sendSwitchCommand(uint8_t switchNr, ReturnValue_t onO
|
|||||||
uint16_t memoryAddress = 0;
|
uint16_t memoryAddress = 0;
|
||||||
size_t parameterValueSize = sizeof(uint8_t);
|
size_t parameterValueSize = sizeof(uint8_t);
|
||||||
uint8_t parameterValue = 0;
|
uint8_t parameterValue = 0;
|
||||||
GomspaceDeviceHandler* pdu = nullptr;
|
GomspaceDeviceHandler* module = nullptr;
|
||||||
|
|
||||||
switch (switchNr) {
|
switch (switchNr) {
|
||||||
case pcdu::PDU1_CH0_TCS_BOARD_3V3: {
|
case pcdu::PDU1_CH0_TCS_BOARD_3V3: {
|
||||||
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_TCS_BOARD_3V3;
|
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_TCS_BOARD_3V3;
|
||||||
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
|
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case pcdu::PDU1_CH1_SYRLINKS_12V: {
|
case pcdu::PDU1_CH1_SYRLINKS_12V: {
|
||||||
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_SYRLINKS;
|
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_SYRLINKS;
|
||||||
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
|
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case pcdu::PDU1_CH2_STAR_TRACKER_5V: {
|
case pcdu::PDU1_CH2_STAR_TRACKER_5V: {
|
||||||
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_STAR_TRACKER;
|
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_STAR_TRACKER;
|
||||||
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
|
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case pcdu::PDU1_CH3_MGT_5V: {
|
case pcdu::PDU1_CH3_MGT_5V: {
|
||||||
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_MGT;
|
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_MGT;
|
||||||
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
|
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case pcdu::PDU1_CH4_SUS_NOMINAL_3V3: {
|
case pcdu::PDU1_CH4_SUS_NOMINAL_3V3: {
|
||||||
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_SUS_NOMINAL;
|
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_SUS_NOMINAL;
|
||||||
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
|
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case pcdu::PDU1_CH5_SOLAR_CELL_EXP_5V: {
|
case pcdu::PDU1_CH5_SOLAR_CELL_EXP_5V: {
|
||||||
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_SOLAR_CELL_EXP;
|
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_SOLAR_CELL_EXP;
|
||||||
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
|
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case pcdu::PDU1_CH6_PLOC_12V: {
|
case pcdu::PDU1_CH6_PLOC_12V: {
|
||||||
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_PLOC;
|
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_PLOC;
|
||||||
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
|
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case pcdu::PDU1_CH7_ACS_A_SIDE_3V3: {
|
case pcdu::PDU1_CH7_ACS_A_SIDE_3V3: {
|
||||||
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_ACS_BOARD_SIDE_A;
|
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_ACS_BOARD_SIDE_A;
|
||||||
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
|
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case pcdu::PDU1_CH8_UNOCCUPIED: {
|
case pcdu::PDU1_CH8_UNOCCUPIED: {
|
||||||
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_CHANNEL8;
|
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_CHANNEL8;
|
||||||
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
|
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// This is a dangerous command. Reject/Igore it for now
|
// This is a dangerous command. Reject/Igore it for now
|
||||||
@ -308,47 +308,47 @@ ReturnValue_t PCDUHandler::sendSwitchCommand(uint8_t switchNr, ReturnValue_t onO
|
|||||||
}
|
}
|
||||||
case pcdu::PDU2_CH1_PL_PCDU_BATT_0_14V8: {
|
case pcdu::PDU2_CH1_PL_PCDU_BATT_0_14V8: {
|
||||||
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_PAYLOAD_PCDU_CH1;
|
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_PAYLOAD_PCDU_CH1;
|
||||||
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
|
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case pcdu::PDU2_CH2_RW_5V: {
|
case pcdu::PDU2_CH2_RW_5V: {
|
||||||
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_RW;
|
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_RW;
|
||||||
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
|
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case pcdu::PDU2_CH3_TCS_BOARD_HEATER_IN_8V: {
|
case pcdu::PDU2_CH3_TCS_BOARD_HEATER_IN_8V: {
|
||||||
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_TCS_BOARD_HEATER_IN;
|
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_TCS_BOARD_HEATER_IN;
|
||||||
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
|
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case pcdu::PDU2_CH4_SUS_REDUNDANT_3V3: {
|
case pcdu::PDU2_CH4_SUS_REDUNDANT_3V3: {
|
||||||
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_SUS_REDUNDANT;
|
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_SUS_REDUNDANT;
|
||||||
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
|
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case pcdu::PDU2_CH5_DEPLOYMENT_MECHANISM_8V: {
|
case pcdu::PDU2_CH5_DEPLOYMENT_MECHANISM_8V: {
|
||||||
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_DEPLOYMENT_MECHANISM;
|
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_DEPLOYMENT_MECHANISM;
|
||||||
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
|
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case pcdu::PDU2_CH6_PL_PCDU_BATT_1_14V8: {
|
case pcdu::PDU2_CH6_PL_PCDU_BATT_1_14V8: {
|
||||||
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_PAYLOAD_PCDU_CH6;
|
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_PAYLOAD_PCDU_CH6;
|
||||||
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
|
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case pcdu::PDU2_CH7_ACS_BOARD_SIDE_B_3V3: {
|
case pcdu::PDU2_CH7_ACS_BOARD_SIDE_B_3V3: {
|
||||||
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_ACS_BOARD_SIDE_B;
|
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_ACS_BOARD_SIDE_B;
|
||||||
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
|
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case pcdu::PDU2_CH8_PAYLOAD_CAMERA: {
|
case pcdu::PDU2_CH8_PAYLOAD_CAMERA: {
|
||||||
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_PAYLOAD_CAMERA;
|
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_PAYLOAD_CAMERA;
|
||||||
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
|
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case pcdu::P60_DOCK_5V_STACK: {
|
case pcdu::P60_DOCK_5V_STACK: {
|
||||||
memoryAddress = P60Dock::CONFIG_ADDRESS_OUT_EN_5V_STACK;
|
memoryAddress = P60Dock::CONFIG_ADDRESS_OUT_EN_5V_STACK;
|
||||||
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::P60DOCK_HANDLER);
|
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::P60DOCK_HANDLER);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -384,7 +384,7 @@ ReturnValue_t PCDUHandler::sendSwitchCommand(uint8_t switchNr, ReturnValue_t onO
|
|||||||
CommandMessage message;
|
CommandMessage message;
|
||||||
ActionMessage::setCommand(&message, GOMSPACE::PARAM_SET, storeAddress);
|
ActionMessage::setCommand(&message, GOMSPACE::PARAM_SET, storeAddress);
|
||||||
|
|
||||||
result = commandQueue->sendMessage(pdu->getCommandQueue(), &message, 0);
|
result = commandQueue->sendMessage(module->getCommandQueue(), &message, 0);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::debug << "PCDUHandler::sendSwitchCommand: Failed to send message to PDU Handler"
|
sif::debug << "PCDUHandler::sendSwitchCommand: Failed to send message to PDU Handler"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user