Index: firmware/App/Controllers/Switches.c =================================================================== diff -u -rce596a29a2bd6384d70b2fe7b9c332b0f1f37a84 -r4edd0b8371b43df9d54e47b3e1254606af3747bc --- firmware/App/Controllers/Switches.c (.../Switches.c) (revision ce596a29a2bd6384d70b2fe7b9c332b0f1f37a84) +++ firmware/App/Controllers/Switches.c (.../Switches.c) (revision 4edd0b8371b43df9d54e47b3e1254606af3747bc) @@ -125,18 +125,16 @@ *************************************************************************/ OPN_CLS_STATE_T getSwitchStatus( SWITCH_T switchId ) { - U32 status; + U32 status = 0; if ( switchId < NUM_OF_DOORS_AND_SWITCHES ) { + status = switchesStatus[ switchId ].status.data; + if ( OVERRIDE_KEY == switchesStatus[ switchId ].status.override ) { status = switchesStatus[ switchId ].status.ovData; } - else - { - status = switchesStatus[ switchId ].status.data; - } } else { @@ -210,7 +208,7 @@ { BOOL result = FALSE; - if ( isTestingActivated() ) + if ( TRUE == isTestingActivated() ) { U32 interval = value / TASK_GENERAL_INTERVAL; @@ -234,7 +232,7 @@ { BOOL result = FALSE; - if ( isTestingActivated() ) + if ( TRUE == isTestingActivated() ) { result = TRUE; switchesDataPublishInterval.override = OVERRIDE_RESET; @@ -260,7 +258,7 @@ if ( switchId < NUM_OF_DOORS_AND_SWITCHES ) { - if ( isTestingActivated() ) + if ( TRUE == isTestingActivated() ) { result = TRUE; switchesStatus[ switchId ].status.ovData = status;