diff --git a/mission/devices/ACUHandler.cpp b/mission/devices/ACUHandler.cpp index a52e48ff..043942fe 100644 --- a/mission/devices/ACUHandler.cpp +++ b/mission/devices/ACUHandler.cpp @@ -16,6 +16,11 @@ ReturnValue_t ACUHandler::buildNormalDeviceCommand( return buildCommandFromCommand(*id, NULL, 0); } +void ACUHandler::fillCommandAndReplyMap() { + GomspaceDeviceHandler::fillCommandAndReplyMap(); + this->insertInCommandMap(PRINT_CHANNEL_STATS); +} + void ACUHandler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *packet) { parseHkTableReply(packet); @@ -281,29 +286,23 @@ ReturnValue_t ACUHandler::deviceSpecificCommand(DeviceCommandId_t cmd) { void ACUHandler::printChannelStats() { PoolReadGuard pg(&acuHkTableDataset); - sif::info << "ACU Info: Stats, Current [mA], Voltage [mV]" << std::endl; - sif::info << std::setw(30) << std::left << "Ch0" << std::dec << "| " << + sif::info << "ACU Info: Current [mA], Voltage [mV]" << std::endl; + sif::info << std::setw(8) << std::left << "Ch0" << std::dec << "| " << static_cast(acuHkTableDataset.currentInChannel0.value) << ", " << - std::setw(4) << std::right << acuHkTableDataset.voltageInChannel0.value << ", " - << std::setw(4) << std::endl; - sif::info << std::setw(30) << std::left << "Ch1" << std::dec << "| " << + std::setw(13) << std::right << acuHkTableDataset.voltageInChannel0.value << std::endl; + sif::info << std::setw(8) << std::left << "Ch1" << std::dec << "| " << static_cast(acuHkTableDataset.currentInChannel1.value) << ", " << - std::setw(4) << std::right << acuHkTableDataset.voltageInChannel1.value << ", " - << std::setw(4) << std::endl; - sif::info << std::setw(30) << std::left << "Ch2" << std::dec << "| " << + std::setw(13) << std::right << acuHkTableDataset.voltageInChannel1.value << std::endl; + sif::info << std::setw(8) << std::left << "Ch2" << std::dec << "| " << static_cast(acuHkTableDataset.currentInChannel2.value) << ", " << - std::setw(4) << std::right << acuHkTableDataset.voltageInChannel2.value << ", " - << std::setw(4) << std::endl; - sif::info << std::setw(30) << std::left << "Ch3" << std::dec << "| " << + std::setw(13) << std::right << acuHkTableDataset.voltageInChannel2.value << std::endl; + sif::info << std::setw(8) << std::left << "Ch3" << std::dec << "| " << static_cast(acuHkTableDataset.currentInChannel3.value) << ", " << - std::setw(4) << std::right << acuHkTableDataset.voltageInChannel3.value << ", " - << std::setw(4) << std::endl; - sif::info << std::setw(30) << std::left << "Ch4" << std::dec << "| " << + std::setw(13) << std::right << acuHkTableDataset.voltageInChannel3.value << std::endl; + sif::info << std::setw(8) << std::left << "Ch4" << std::dec << "| " << static_cast(acuHkTableDataset.currentInChannel4.value) << ", " << - std::setw(4) << std::right << acuHkTableDataset.voltageInChannel4.value << ", " - << std::setw(4) << std::endl; - sif::info << std::setw(30) << std::left << "Ch5" << std::dec << "| " << + std::setw(13) << std::right << acuHkTableDataset.voltageInChannel4.value << std::endl; + sif::info << std::setw(8) << std::left << "Ch5" << std::dec << "| " << static_cast(acuHkTableDataset.currentInChannel5.value) << ", " << - std::setw(4) << std::right << acuHkTableDataset.voltageInChannel5.value << ", " - << std::setw(4) << std::endl; + std::setw(13) << std::right << acuHkTableDataset.voltageInChannel5.value << std::endl; } diff --git a/mission/devices/ACUHandler.h b/mission/devices/ACUHandler.h index 886faba7..2bb688e7 100644 --- a/mission/devices/ACUHandler.h +++ b/mission/devices/ACUHandler.h @@ -26,6 +26,8 @@ protected: */ virtual ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t * id) override; + virtual void fillCommandAndReplyMap() override; + virtual ReturnValue_t deviceSpecificCommand(DeviceCommandId_t cmd) override; private: diff --git a/mission/devices/GomspaceDeviceHandler.h b/mission/devices/GomspaceDeviceHandler.h index bb11ba0e..29156fce 100644 --- a/mission/devices/GomspaceDeviceHandler.h +++ b/mission/devices/GomspaceDeviceHandler.h @@ -73,7 +73,7 @@ protected: virtual ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t * id) override; ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t * id) override; - void fillCommandAndReplyMap() override; + virtual void fillCommandAndReplyMap() override; ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t * commandData,size_t commandDataLen) override; ReturnValue_t scanForReply(const uint8_t *start, size_t remainingSize,