From 1722f14a60cb27cebd16ac485b331dd905e749c9 Mon Sep 17 00:00:00 2001 From: "Jakob.Meier" <–meierj@irs.uni-stuttgart.de> Date: Tue, 17 Aug 2021 11:59:32 +0200 Subject: [PATCH 1/2] added debug output for pcdu modules --- bsp_q7s/core/InitMission.cpp | 2 +- bsp_q7s/core/ObjectFactory.cpp | 13 +++---- linux/fsfwconfig/OBSWConfig.h.in | 6 ++-- mission/devices/P60DockHandler.cpp | 9 +++++ mission/devices/PDU1Handler.cpp | 58 +++++++++++++++++++++++++++--- tmtc | 2 +- 6 files changed, 72 insertions(+), 18 deletions(-) diff --git a/bsp_q7s/core/InitMission.cpp b/bsp_q7s/core/InitMission.cpp index f082d3d9..2ee4d374 100644 --- a/bsp_q7s/core/InitMission.cpp +++ b/bsp_q7s/core/InitMission.cpp @@ -203,7 +203,7 @@ void initmission::createPstTasks(TaskFactory& factory, if(result != HasReturnvaluesIF::RETURN_OK) { sif::error << "InitMission::initTasks: GomSpace PST initialization failed!" << std::endl; } - taskVec.push_back(i2cPst); + taskVec.push_back(gomSpacePstTask); #else /* BOARD_TE7020 == 0 */ FixedTimeslotTaskIF * pollingSequenceTaskTE0720 = factory->createFixedTimeslotTask( "PST_TASK_TE0720", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE * 8, 3.0, diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index a8b55646..4e836f2e 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -250,15 +250,10 @@ void ObjectFactory::createPcduComponents() { * Setting PCDU devices to mode normal immediately after start up because PCDU is always * running. */ - /** For now this needs to be commented out because there is no PCDU connected to the OBC */ -// p60dockhandler->setModeNormal(); -// pdu1handler->setModeNormal(); -// pdu2handler->setModeNormal(); -// acuhandler->setModeNormal(); - (void) p60dockhandler; - (void) pdu1handler; - (void) pdu2handler; - (void) acuhandler; + p60dockhandler->setModeNormal(); + pdu1handler->setModeNormal(); + pdu2handler->setModeNormal(); + acuhandler->setModeNormal(); } void ObjectFactory::createRadSensorComponent(LinuxLibgpioIF* gpioComIF) { diff --git a/linux/fsfwconfig/OBSWConfig.h.in b/linux/fsfwconfig/OBSWConfig.h.in index e2693430..d14aaa77 100644 --- a/linux/fsfwconfig/OBSWConfig.h.in +++ b/linux/fsfwconfig/OBSWConfig.h.in @@ -44,9 +44,9 @@ debugging. */ #define BOARD_TE0720 0 #define TE0720_HEATER_TEST 0 -#define P60DOCK_DEBUG 0 -#define PDU1_DEBUG 0 -#define PDU2_DEBUG 0 +#define P60DOCK_DEBUG 1 +#define PDU1_DEBUG 1 +#define PDU2_DEBUG 1 #define ACU_DEBUG 0 #define SYRLINKS_DEBUG 0 #define IMQT_DEBUG 0 diff --git a/mission/devices/P60DockHandler.cpp b/mission/devices/P60DockHandler.cpp index e34f96c2..305606d9 100644 --- a/mission/devices/P60DockHandler.cpp +++ b/mission/devices/P60DockHandler.cpp @@ -27,6 +27,15 @@ void P60DockHandler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t * #if OBSW_VERBOSE_LEVEL >= 1 && P60DOCK_DEBUG == 1 p60dockHkTableDataset.read(); + sif::info << "P60 Dock: ACU VCC switch: " << static_cast(p60dockHkTableDataset.outputEnableStateAcuVcc.value) << std::endl; + sif::info << "P60 Dock: PDU1 VCC switch: " << static_cast(p60dockHkTableDataset.outputEnableStatePdu1Vcc.value) << std::endl; + sif::info << "P60 Dock: PDU2 VCC switch: " << static_cast(p60dockHkTableDataset.outputEnableStatePdu2Vcc.value) << std::endl; + sif::info << "P60 Dock: ACU VBAT switch: " << static_cast(p60dockHkTableDataset.outputEnableStateAcuVbat.value) << std::endl; + sif::info << "P60 Dock: PDU1 VBAT switch: " << static_cast(p60dockHkTableDataset.outputEnableStatePdu1Vbat.value) << std::endl; + sif::info << "P60 Dock: PDU2 VBAT switch: " << static_cast(p60dockHkTableDataset.outputEnableStatePdu2Vbat.value) << std::endl; + sif::info << "P60 Dock: Stack VBAT switch: " << static_cast(p60dockHkTableDataset.outputEnableStateStackVbat.value) << std::endl; + sif::info << "P60 Dock: Stack 3V3 switch: " << static_cast(p60dockHkTableDataset.outputEnableStateStack3V3.value) << std::endl; + sif::info << "P60 Dock: Stack 5V switch: " << static_cast(p60dockHkTableDataset.outputEnableStateStack5V.value) << std::endl; float temperatureC = p60dockHkTableDataset.temperature1.value * 0.1; sif::info << "P60 Dock: Temperature 1: " << temperatureC << " °C" << std::endl; diff --git a/mission/devices/PDU1Handler.cpp b/mission/devices/PDU1Handler.cpp index 5a6d62cb..b18e0f79 100644 --- a/mission/devices/PDU1Handler.cpp +++ b/mission/devices/PDU1Handler.cpp @@ -24,15 +24,65 @@ void PDU1Handler::letChildHandleHkReply(DeviceCommandId_t id, const uint8_t *pac #if OBSW_VERBOSE_LEVEL >= 1 && PDU1_DEBUG == 1 pdu1HkTableDataset.read(); + sif::info << "PDU1 TCS Board voltage: " << pdu1HkTableDataset.voltageOutTCSBoard3V3 + << std::endl; + sif::info << "PDU1 Syrlinks voltage: " << pdu1HkTableDataset.voltageOutSyrlinks << std::endl; + sif::info << "PDU1 star tracker voltage: " << pdu1HkTableDataset.voltageOutStarTracker + << std::endl; + sif::info << "PDU1 MGT voltage: " << pdu1HkTableDataset.voltageOutMGT << std::endl; + sif::info << "PDU1 SUS nominal voltage: " << pdu1HkTableDataset.voltageOutSUSNominal + << std::endl; + sif::info << "PDU1 solar cell experiment voltage: " << pdu1HkTableDataset.voltageOutSolarCellExp + << std::endl; + sif::info << "PDU1 PLOC voltage: " << pdu1HkTableDataset.voltageOutPLOC << std::endl; + sif::info << "PDU1 ACS Side A voltage: " << pdu1HkTableDataset.voltageOutACSBoardSideA + << std::endl; + sif::info << "PDU1 channel 8 voltage: " << pdu1HkTableDataset.voltageOutACSBoardSideA + << std::endl; + + sif::info << "PDU1 TCS Board current: " << pdu1HkTableDataset.currentOutTCSBoard3V3 + << std::endl; + sif::info << "PDU1 Syrlinks current: " << pdu1HkTableDataset.currentOutSyrlinks << std::endl; + sif::info << "PDU1 star tracker current: " << pdu1HkTableDataset.currentOutStarTracker + << std::endl; + sif::info << "PDU1 MGT current: " << pdu1HkTableDataset.currentOutMGT << std::endl; + sif::info << "PDU1 SUS nominal current: " << pdu1HkTableDataset.currentOutSUSNominal + << std::endl; + sif::info << "PDU1 solar cell experiment current: " << pdu1HkTableDataset.currentOutSolarCellExp + << std::endl; + sif::info << "PDU1 PLOC current: " << pdu1HkTableDataset.currentOutPLOC << std::endl; + sif::info << "PDU1 ACS Side A current: " << pdu1HkTableDataset.currentOutACSBoardSideA + << std::endl; + sif::info << "PDU1 channel 8 current: " << pdu1HkTableDataset.currentOutChannel8 + << std::endl; + sif::info << "PDU1 TCS Board switch: " + << static_cast(pdu1HkTableDataset.outEnabledTCSBoard3V3.value) << std::endl; + sif::info << "PDU1 Syrlinks switch: " + << static_cast(pdu1HkTableDataset.outEnabledSyrlinks.value) << std::endl; + sif::info << "PDU1 star tracker switch: " + << static_cast(pdu1HkTableDataset.outEnabledStarTracker.value) << std::endl; + sif::info << "PDU1 MGT switch: " + << static_cast(pdu1HkTableDataset.outEnabledMGT.value) << std::endl; + sif::info << "PDU1 SUS nominal switch: " + << static_cast(pdu1HkTableDataset.outEnabledSUSNominal.value) << std::endl; + sif::info << "PDU1 solar cell experiment switch: " + << static_cast(pdu1HkTableDataset.outEnabledSolarCellExp.value) << std::endl; + sif::info << "PDU1 PLOC switch: " + << static_cast(pdu1HkTableDataset.outEnabledPLOC.value) << std::endl; + sif::info << "PDU1 ACS Side A switch: " + << static_cast(pdu1HkTableDataset.outEnabledAcsBoardSideA.value) << std::endl; + sif::info << "PDU1 channel 8 switch: " + << static_cast(pdu1HkTableDataset.outEnabledChannel8.value) << std::endl; + sif::info << "PDU1 battery mode: " << static_cast(pdu1HkTableDataset.battMode.value) << std::endl; sif::info << "PDU1 VCC: " << pdu1HkTableDataset.vcc << " mV" << std::endl; - float vbat = pdu1HkTableDataset.vbat.value * 0.1; - sif::info << "PDU1 VBAT: " << vbat << std::endl; + float vbat = pdu1HkTableDataset.vbat.value * 0.001; + sif::info << "PDU1 VBAT: " << vbat << "V" << std::endl; float temperatureC = pdu1HkTableDataset.temperature.value * 0.1; sif::info << "PDU1 Temperature: " << temperatureC << " °C" << std::endl; sif::info << "PDU1 csp1 watchdog pings before reboot: " - << unsigned(pdu1HkTableDataset.csp1WatchdogPingsLeft.value) << std::endl; + << static_cast(pdu1HkTableDataset.csp1WatchdogPingsLeft.value) << std::endl; sif::info << "PDU1 csp2 watchdog pings before reboot: " - << unsigned(pdu1HkTableDataset.csp2WatchdogPingsLeft.value) << std::endl; + << static_cast(pdu1HkTableDataset.csp2WatchdogPingsLeft.value) << std::endl; pdu1HkTableDataset.commit(); #endif } diff --git a/tmtc b/tmtc index 387a076a..5b2ff495 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 387a076a2180c14da8de086d690a2ebb5ad63649 +Subproject commit 5b2ff49555f0cfee51cd53c7772a147575a825a3 -- 2.43.0 From 5204afca9e2f23e6b9270f968ec0bd6e276d4718 Mon Sep 17 00:00:00 2001 From: "Jakob.Meier" <–meierj@irs.uni-stuttgart.de> Date: Tue, 17 Aug 2021 12:00:58 +0200 Subject: [PATCH 2/2] pcdu debug output disabled now --- linux/fsfwconfig/OBSWConfig.h.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux/fsfwconfig/OBSWConfig.h.in b/linux/fsfwconfig/OBSWConfig.h.in index d14aaa77..e2693430 100644 --- a/linux/fsfwconfig/OBSWConfig.h.in +++ b/linux/fsfwconfig/OBSWConfig.h.in @@ -44,9 +44,9 @@ debugging. */ #define BOARD_TE0720 0 #define TE0720_HEATER_TEST 0 -#define P60DOCK_DEBUG 1 -#define PDU1_DEBUG 1 -#define PDU2_DEBUG 1 +#define P60DOCK_DEBUG 0 +#define PDU1_DEBUG 0 +#define PDU2_DEBUG 0 #define ACU_DEBUG 0 #define SYRLINKS_DEBUG 0 #define IMQT_DEBUG 0 -- 2.43.0