System and Subsystem Init #166

Merged
meierj merged 73 commits from mueller/system-subsystems into develop 2022-03-22 17:41:20 +01:00
89 changed files with 1412 additions and 813 deletions
Showing only changes of commit e678b53452 - Show all commits

2
fsfw

Submodule fsfw updated: 7571987a1d...a7cb2d4354

View File

@@ -41,6 +41,7 @@ debugging. */
#define OBSW_TC_FROM_PDEC 0 #define OBSW_TC_FROM_PDEC 0
#define OBSW_ENABLE_TIMERS 1 #define OBSW_ENABLE_TIMERS 1
#define OBSW_INITIALIZE_SWITCHES 1
#define OBSW_ADD_MGT 1 #define OBSW_ADD_MGT 1
#define OBSW_ADD_BPX_BATTERY_HANDLER 1 #define OBSW_ADD_BPX_BATTERY_HANDLER 1
#define OBSW_ADD_STAR_TRACKER 0 #define OBSW_ADD_STAR_TRACKER 0

View File

@@ -621,6 +621,7 @@ void PCDUHandler::checkAndUpdateSwitch(GOMSPACE::Pdu pdu, pcduSwitches::Switches
uint8_t setValue) { uint8_t setValue) {
using namespace pcduSwitches; using namespace pcduSwitches;
if (switchStates[switchIdx] != setValue) { if (switchStates[switchIdx] != setValue) {
#if OBSW_INITIALIZE_SWITCHES == 1
// This code initializes the switches to the default init switch states on every reboot. // 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. // This is not done by the PCDU unless it is power-cycled.
if (((pdu == GOMSPACE::Pdu::PDU1) and firstSwitchInfoPdu1) or if (((pdu == GOMSPACE::Pdu::PDU1) and firstSwitchInfoPdu1) or
@@ -633,6 +634,9 @@ void PCDUHandler::checkAndUpdateSwitch(GOMSPACE::Pdu pdu, pcduSwitches::Switches
} else { } else {
triggerEvent(power::SWITCH_HAS_CHANGED, setValue, switchIdx); triggerEvent(power::SWITCH_HAS_CHANGED, setValue, switchIdx);
} }
#else
triggerEvent(power::SWITCH_HAS_CHANGED, setValue, switchIdx);
#endif
} }
switchStates[switchIdx] = setValue; switchStates[switchIdx] = setValue;
} }