Index: firmware/App/Controllers/Switches.c =================================================================== diff -u -r19a8bf98a7154e24c35da25225d4b55bf70ddd09 -r28cd9da453de6282baea3113cf9f787810aae1e5 --- firmware/App/Controllers/Switches.c (.../Switches.c) (revision 19a8bf98a7154e24c35da25225d4b55bf70ddd09) +++ firmware/App/Controllers/Switches.c (.../Switches.c) (revision 28cd9da453de6282baea3113cf9f787810aae1e5) @@ -123,8 +123,18 @@ // If the debounce time has been elapsed, update the switch status to the new status else if ( TRUE == didTimeout( switchesStatus[ i ].debounceStartTime, SWITCHES_DEBOUNCE_TIME_MS ) ) { - switchesStatus[ i ].debounceStartTime = 0; + if ( FRONT_DOOR == i ) + { + // Log front door switch change + sendTreatmentLogEventData( FRONT_DOOR_SWITCH_CHANGED_EVENT, (F32)switchesStatus[ i ].status.data, (F32)currentSwitchStatus ); + } + else if ( PUMP_TRACK_SWITCH == i ) + { + // Log pump track switch change + sendTreatmentLogEventData( PUMP_TRACK_SWITCH_CHANGED_EVENT, (F32)switchesStatus[ i ].status.data, (F32)currentSwitchStatus ); + } // If the bit is 0, the door switch is open, because it is normally open switch + switchesStatus[ i ].debounceStartTime = 0; switchesStatus[ i ].status.data = currentSwitchStatus; } }