From 536c0cb0feb9035c4da08d97b12dcc86d61deed4 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 16 Sep 2021 15:00:31 +0200 Subject: [PATCH] new commands now working --- mission/devices/GomspaceDeviceHandler.cpp | 12 +++++-- mission/devices/PDU2Handler.cpp | 38 ++++++++++++----------- tmtc | 2 +- 3 files changed, 30 insertions(+), 22 deletions(-) diff --git a/mission/devices/GomspaceDeviceHandler.cpp b/mission/devices/GomspaceDeviceHandler.cpp index c7de02bb..72c2766e 100644 --- a/mission/devices/GomspaceDeviceHandler.cpp +++ b/mission/devices/GomspaceDeviceHandler.cpp @@ -7,11 +7,11 @@ GomspaceDeviceHandler::GomspaceDeviceHandler(object_id_t objectId, object_id_t c DeviceHandlerBase(objectId, comIF, comCookie), maxConfigTableAddress(maxConfigTableAddress), maxHkTableAddress(maxHkTableAddress), hkTableReplySize(hkTableReplySize), hkTableDataset(hkTableDataset) { - if (comCookie == NULL) { + if (comCookie == nullptr) { sif::error << "GomspaceDeviceHandler::GomspaceDeviceHandler: Invalid com cookie" << std::endl; } - if (hkTableDataset == NULL) { + if (hkTableDataset == nullptr) { sif::error << "GomspaceDeviceHandler::GomspaceDeviceHandler: Invalid hk table data set" << std::endl; } @@ -75,7 +75,10 @@ ReturnValue_t GomspaceDeviceHandler::buildCommandFromCommand( } break; } - case(GOMSPACE::PRINT_OUT_ENB_STATUS): { + case(GOMSPACE::PRINT_OUT_ENB_STATUS): + case(GOMSPACE::PRINT_ALL): + case(GOMSPACE::PRINT_OUT_CURRENTS): + case(GOMSPACE::PRINT_OUT_VOLTAGES): { result = printStatus(deviceCommand); break; } @@ -99,7 +102,10 @@ void GomspaceDeviceHandler::fillCommandAndReplyMap(){ this->insertInCommandAndReplyMap(GOMSPACE::PARAM_GET, 3); this->insertInCommandAndReplyMap(GOMSPACE::REQUEST_HK_TABLE, 3); this->insertInCommandMap(GOMSPACE::GNDWDT_RESET); + this->insertInCommandMap(GOMSPACE::PRINT_ALL); this->insertInCommandMap(GOMSPACE::PRINT_OUT_ENB_STATUS); + this->insertInCommandMap(GOMSPACE::PRINT_OUT_VOLTAGES); + this->insertInCommandMap(GOMSPACE::PRINT_OUT_CURRENTS); } ReturnValue_t GomspaceDeviceHandler::scanForReply(const uint8_t *start, diff --git a/mission/devices/PDU2Handler.cpp b/mission/devices/PDU2Handler.cpp index bd760d77..06e60002 100644 --- a/mission/devices/PDU2Handler.cpp +++ b/mission/devices/PDU2Handler.cpp @@ -382,43 +382,45 @@ void PDU2Handler::printOutputSwitchStates() { } void PDU2Handler::printOutputCurrents() { - sif::info << "PDU2 Q7S current: " << + sif::info << "Printing PDU2 currents [mA]: " << std::endl; + sif::info << "PDU2 Q7S:" << pdu2HkTableDataset.currentOutQ7S.value << std::endl; - sif::info << "PDU2 Payload PCDU current: " << + sif::info << "PDU2 Payload PCDU:" << pdu2HkTableDataset.currentOutPayloadPCDUCh1.value << std::endl; - sif::info << "PDU2 RW currents: " << + sif::info << "PDU2 RW:" << pdu2HkTableDataset.currentOutReactionWheels.value << std::endl; - sif::info << "PDU2 TCS Board Heater In Current: " << + sif::info << "PDU2 TCS Board Heater In:" << pdu2HkTableDataset.currentOutTCSBoardHeaterIn.value << std::endl; - sif::info << "PDU2 SuS Redundant current: " << + sif::info << "PDU2 SuS Redundant:" << pdu2HkTableDataset.currentOutSUSRedundant.value << std::endl; - sif::info << "PDU2 Depl-Mechanism current: " << + sif::info << "PDU2 Depl-Mechanism:" << pdu2HkTableDataset.currentOutDeplMechanism.value << std::endl; - sif::info << "PDU2 Payload PCDU current: " << + sif::info << "PDU2 Payload PCDU:" << pdu2HkTableDataset.currentOutPayloadPCDUCh6.value << std::endl; - sif::info << "PDU2 ACS Board current: " << + sif::info << "PDU2 ACS Board:" << pdu2HkTableDataset.currentOutACSBoardSideB.value << std::endl; - sif::info << "PDU2 Payload Camera current: " << + sif::info << "PDU2 Payload Camera:" << pdu2HkTableDataset.currentOutPayloadCamera.value << std::endl; } void PDU2Handler::printOutputVoltages() { - sif::info << "PDU2 Q7S voltage: " << + sif::info << "Printing PDU2 voltages [mV]: " << std::endl; + sif::info << "PDU2 Q7S:" << pdu2HkTableDataset.voltageOutQ7S.value << std::endl; - sif::info << "PDU2 Payload PCDU voltage: " << + sif::info << "PDU2 Payload PCDU:" << pdu2HkTableDataset.voltageOutPayloadPCDUCh1.value << std::endl; - sif::info << "PDU2 RW voltage: " << + sif::info << "PDU2 RW:" << pdu2HkTableDataset.voltageOutReactionWheels.value << std::endl; - sif::info << "PDU2 TCS Board Heater In voltage: " << + sif::info << "PDU2 TCS Board Heater In:" << pdu2HkTableDataset.voltageOutTCSBoardHeaterIn.value << std::endl; - sif::info << "PDU2 SuS Redundant voltage: " << + sif::info << "PDU2 SuS Redundant:" << pdu2HkTableDataset.voltageOutSUSRedundant.value << std::endl; - sif::info << "PDU2 Depl-Mechanism voltage: " << + sif::info << "PDU2 Depl-Mechanism:" << pdu2HkTableDataset.voltageOutDeplMechanism.value << std::endl; - sif::info << "PDU2 Payload PCDU voltage: " << + sif::info << "PDU2 Payload PCDU:" << pdu2HkTableDataset.voltageOutPayloadPCDUCh6.value << std::endl; - sif::info << "PDU2 ACS Board voltage: " << + sif::info << "PDU2 ACS Board voltage:" << pdu2HkTableDataset.voltageOutACSBoardSideB.value << std::endl; - sif::info << "PDU2 Payload Camera voltage: " << + sif::info << "PDU2 Payload Camera voltage:" << pdu2HkTableDataset.voltageOutPayloadCamera.value << std::endl; } diff --git a/tmtc b/tmtc index 6da94c73..5c65390a 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 6da94c73d0568c64e41d6c4b803539e09409c942 +Subproject commit 5c65390a8b0344c41728d276729cae0a2cc1d9d1