Index: firmware/App/Controllers/Switches.c =================================================================== diff -u -r9fdd42e75e67270808116d7d89f099939c13add7 -red94e224d840fc75f9d287f4f307356421c944f3 --- firmware/App/Controllers/Switches.c (.../Switches.c) (revision 9fdd42e75e67270808116d7d89f099939c13add7) +++ firmware/App/Controllers/Switches.c (.../Switches.c) (revision ed94e224d840fc75f9d287f4f307356421c944f3) @@ -80,13 +80,20 @@ { U32 status; - if ( OVERRIDE_KEY == switchStatus[ switchId ].override ) + if ( switchId < NUM_OF_DOORS_AND_CAPS ) { - status = switchStatus[ switchId ].ovData; + if ( OVERRIDE_KEY == switchStatus[ switchId ].override ) + { + status = switchStatus[ switchId ].ovData; + } + else + { + status = switchStatus[ switchId ].data; + } } else { - status = switchStatus[ switchId ].data; + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, SW_FAULT_ID_HD_INVALID_SWITCH_ID, (U32)switchId ) } return (OPN_CLS_STATE_T)status; @@ -136,6 +143,7 @@ return result; } + /************************************************************************* * TEST SUPPORT FUNCTIONS *************************************************************************/