more useful PCDU printout
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2022-03-14 17:41:06 +01:00
parent 1a0f9164ef
commit a362e71388
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
8 changed files with 42 additions and 12 deletions

View File

@ -217,9 +217,10 @@ void P60DockHandler::parseHkTableReply(const uint8_t *packet) {
p60dockHkTableDataset.latchupsGS3V3 = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
p60dockHkTableDataset.vbatVoltageValue = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
p60dockHkTableDataset.dockVbatVoltageValue =
*(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
p60dockHkTableDataset.vccCurrent = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
p60dockHkTableDataset.dockVccCurrent = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
p60dockHkTableDataset.batteryCurrent = *(packet + dataOffset) << 8 | *(packet + dataOffset + 1);
dataOffset += 4;
@ -473,8 +474,20 @@ ReturnValue_t P60DockHandler::printStatus(DeviceCommandId_t cmd) {
}
void P60DockHandler::printHkTableSwitchIV() {
sif::info << "P60 Dock Info: SwitchState, Currents [mA], Voltages [mV]" << std::endl;
sif::info << "P60 Dock Info:" << std::endl;
sif::info << "Boot Cause: " << p60dockHkTableDataset.bootcause
<< " | Boot Count: " << std::setw(4) << std::right << p60dockHkTableDataset.bootCount
<< std::endl;
sif::info << "Reset Cause: " << p60dockHkTableDataset.resetcause
<< " | Battery Mode: " << static_cast<int>(p60dockHkTableDataset.battMode.value)
<< std::endl;
sif::info << "SwitchState, Currents [mA], Voltages [mV]:" << std::endl;
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "Dock VBAT VCC" << std::dec
<< "| -, " << std::setw(4) << std::right << p60dockHkTableDataset.dockVccCurrent << ", "
<< std::setw(5) << p60dockHkTableDataset.dockVbatVoltageValue << std::endl;
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "BATT" << std::dec << "| -, "
<< std::setw(4) << std::right << p60dockHkTableDataset.batteryCurrent.value << ", "
<< std::setw(5) << p60dockHkTableDataset.batteryVoltage.value << std::endl;
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "ACU VCC" << std::dec << "| "
<< unsigned(p60dockHkTableDataset.outputEnableStateAcuVcc.value) << ", " << std::setw(4)
<< std::right << p60dockHkTableDataset.currentAcuVcc.value << ", " << std::setw(5)
@ -497,11 +510,10 @@ void P60DockHandler::printHkTableSwitchIV() {
<< unsigned(p60dockHkTableDataset.outputEnableStatePdu2Vcc.value) << ", "
<< std::setw(4) << std::right << p60dockHkTableDataset.currentPdu2Vcc.value << ", "
<< std::setw(5) << p60dockHkTableDataset.voltagePdu2Vcc.value << std::endl;
sif::info << std::setw(30) << std::left << "PDU2 VBAT" << std::dec << "| "
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "PDU2 VBAT" << std::dec << "| "
<< unsigned(p60dockHkTableDataset.outputEnableStatePdu2Vbat.value) << ", "
<< std::setw(4) << std::right << p60dockHkTableDataset.currentPdu2Vbat.value << ", "
<< std::setw(5) << p60dockHkTableDataset.voltagePdu2Vbat.value << std::endl;
sif::info << std::setw(MAX_CHANNEL_STR_WIDTH) << std::left << "Stack VBAT" << std::dec << "| "
<< unsigned(p60dockHkTableDataset.outputEnableStateStackVbat.value) << ", "
<< std::setw(4) << std::right << p60dockHkTableDataset.currentStackVbat.value << ", "

View File

@ -450,7 +450,13 @@ ReturnValue_t PDU1Handler::printStatus(DeviceCommandId_t cmd) {
}
void PDU1Handler::printHkTableSwitchVI() {
sif::info << "PDU1 Info: SwitchState, Currents [mA], Voltages [mV]" << std::endl;
sif::info << "PDU1 Info: " << std::endl;
sif::info << "Boot Cause: " << pdu1HkTableDataset.bootcause << " | Boot Count: " << std::setw(4)
<< std::right << pdu1HkTableDataset.bootcount << std::endl;
sif::info << "Reset Cause: " << pdu1HkTableDataset.resetcause
<< " | Battery Mode: " << static_cast<int>(pdu1HkTableDataset.battMode.value)
<< std::endl;
sif::info << "SwitchState, Currents [mA], Voltages [mV]:" << std::endl;
sif::info << std::setw(30) << std::left << "TCS Board" << std::dec << "| "
<< unsigned(pdu1HkTableDataset.outEnabledTCSBoard3V3.value) << ", " << std::setw(4)
<< std::right << pdu1HkTableDataset.currentOutTCSBoard3V3.value << ", " << std::setw(4)

View File

@ -40,7 +40,7 @@ class PDU1Handler : public GomspaceDeviceHandler {
ReturnValue_t setParamCallback(SetParamMessageUnpacker& unpacker, bool afterExectuion) override;
private:
static constexpr uint8_t MAX_CHANNEL_STR_WIDTH = 16;
static constexpr uint8_t MAX_CHANNEL_STR_WIDTH = 24;
/** Dataset for the housekeeping table of the PDU1 */
PDU1::PDU1HkTableDataset pdu1HkTableDataset;

View File

@ -402,7 +402,13 @@ ReturnValue_t PDU2Handler::printStatus(DeviceCommandId_t cmd) {
}
void PDU2Handler::printHkTableSwitchVI() {
sif::info << "PDU2 Info: SwitchState, Currents [mA], Voltages [mV]" << std::endl;
sif::info << "PDU2 Info:" << std::endl;
sif::info << "Boot Cause: " << pdu2HkTableDataset.bootcause << " | Boot Count: " << std::setw(4)
<< std::right << pdu2HkTableDataset.bootcount << std::endl;
sif::info << "Reset Cause: " << pdu2HkTableDataset.resetcause
<< " | Battery Mode: " << static_cast<int>(pdu2HkTableDataset.battMode.value)
<< std::endl;
sif::info << "SwitchState, Currents [mA], Voltages [mV]: " << std::endl;
sif::info << std::setw(30) << std::left << "Q7S" << std::dec << "| "
<< unsigned(pdu2HkTableDataset.outEnabledQ7S.value) << ", " << std::setw(4)
<< std::right << pdu2HkTableDataset.currentOutQ7S.value << ", " << std::setw(4)

View File

@ -537,10 +537,11 @@ class HkTableDataset : public StaticLocalDataSet<HK_TABLE_ENTRIES> {
lp_var_t<uint16_t> latchupsGS5V =
lp_var_t<uint16_t>(sid.objectId, P60System::P60DOCK_LATCHUP_GS5V, this);
lp_var_t<uint16_t> vbatVoltageValue =
lp_var_t<uint16_t> dockVbatVoltageValue =
lp_var_t<uint16_t>(sid.objectId, P60System::P60DOCK_VBAT_VALUE, this);
lp_var_t<int16_t> vccCurrent =
lp_var_t<int16_t> dockVccCurrent =
lp_var_t<int16_t>(sid.objectId, P60System::P60DOCK_VCC_CURRENT_VALUE, this);
// Difference between charge and discharge current
lp_var_t<int16_t> batteryCurrent =
lp_var_t<int16_t>(sid.objectId, P60System::P60DOCK_BATTERY_CURRENT, this);
lp_var_t<uint16_t> batteryVoltage =

View File

@ -0,0 +1 @@
#include "PlPcduAssembly.h"

View File

@ -0,0 +1,4 @@
#ifndef MISSION_SYSTEM_PLPCDUASSEMBLY_H_
#define MISSION_SYSTEM_PLPCDUASSEMBLY_H_
#endif /* MISSION_SYSTEM_PLPCDUASSEMBLY_H_ */

2
tmtc

@ -1 +1 @@
Subproject commit 2251c8cbf441e31e35c1ae6703d47ef2046f9b17
Subproject commit d188b10f6409fe7a957d6ed2c5769fc7cb32578e