Index: firmware/App/Controllers/Switches.c =================================================================== diff -u -re3705410a6e4df70c2a4f2d590e977326e11d7b3 -r516badc80a232dc4a1b9a35f843fab91202f53c9 --- firmware/App/Controllers/Switches.c (.../Switches.c) (revision e3705410a6e4df70c2a4f2d590e977326e11d7b3) +++ firmware/App/Controllers/Switches.c (.../Switches.c) (revision 516badc80a232dc4a1b9a35f843fab91202f53c9) @@ -128,18 +128,17 @@ *************************************************************************/ OPN_CLS_STATE_T getSwitchStatus( SWITCH_T switchId ) { - U32 status; + U32 status = 0; if ( switchId < NUM_OF_DOORS_AND_CAPS ) { + // Assume there is no override + status = switchesStatus[ switchId ].status.data; + if ( OVERRIDE_KEY == switchesStatus[ switchId ].status.override ) { status = switchesStatus[ switchId ].status.ovData; } - else - { - status = switchesStatus[ switchId ].status.data; - } } else { @@ -214,7 +213,7 @@ { BOOL result = FALSE; - if ( isTestingActivated() ) + if ( TRUE == isTestingActivated() ) { U32 interval = value / TASK_GENERAL_INTERVAL; @@ -238,7 +237,7 @@ { BOOL result = FALSE; - if ( isTestingActivated() ) + if ( TRUE == isTestingActivated() ) { result = TRUE; switchesDataPublishInterval.override = OVERRIDE_RESET; @@ -290,7 +289,7 @@ if ( switchId < NUM_OF_DOORS_AND_CAPS ) { - if ( isTestingActivated() ) + if ( TRUE == isTestingActivated() ) { result = TRUE; switchesStatus[ switchId ].status.override = OVERRIDE_RESET;