diff --git a/fsfw b/fsfw index 7571987a..a7cb2d43 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 7571987a1d90528d067e2ab86d1b589bc0e89b42 +Subproject commit a7cb2d435456235c28a5041ae783eeee6426ee6d diff --git a/linux/fsfwconfig/OBSWConfig.h.in b/linux/fsfwconfig/OBSWConfig.h.in index e8c2dff6..36802829 100644 --- a/linux/fsfwconfig/OBSWConfig.h.in +++ b/linux/fsfwconfig/OBSWConfig.h.in @@ -41,6 +41,7 @@ debugging. */ #define OBSW_TC_FROM_PDEC 0 #define OBSW_ENABLE_TIMERS 1 +#define OBSW_INITIALIZE_SWITCHES 1 #define OBSW_ADD_MGT 1 #define OBSW_ADD_BPX_BATTERY_HANDLER 1 #define OBSW_ADD_STAR_TRACKER 0 diff --git a/mission/devices/PCDUHandler.cpp b/mission/devices/PCDUHandler.cpp index 11c84118..2960a6f5 100644 --- a/mission/devices/PCDUHandler.cpp +++ b/mission/devices/PCDUHandler.cpp @@ -621,6 +621,7 @@ void PCDUHandler::checkAndUpdateSwitch(GOMSPACE::Pdu pdu, pcduSwitches::Switches uint8_t setValue) { using namespace pcduSwitches; if (switchStates[switchIdx] != setValue) { +#if OBSW_INITIALIZE_SWITCHES == 1 // This code initializes the switches to the default init switch states on every reboot. // This is not done by the PCDU unless it is power-cycled. if (((pdu == GOMSPACE::Pdu::PDU1) and firstSwitchInfoPdu1) or @@ -633,6 +634,9 @@ void PCDUHandler::checkAndUpdateSwitch(GOMSPACE::Pdu pdu, pcduSwitches::Switches } else { triggerEvent(power::SWITCH_HAS_CHANGED, setValue, switchIdx); } +#else + triggerEvent(power::SWITCH_HAS_CHANGED, setValue, switchIdx); +#endif } switchStates[switchIdx] = setValue; }