Index: firmware/App/Monitors/Switches.c =================================================================== diff -u -r036a75d76ab01912646a480b935d97187a231a19 -r395522dffef1348e176564925656012f529c1910 --- firmware/App/Monitors/Switches.c (.../Switches.c) (revision 036a75d76ab01912646a480b935d97187a231a19) +++ firmware/App/Monitors/Switches.c (.../Switches.c) (revision 395522dffef1348e176564925656012f529c1910) @@ -1,17 +1,17 @@ /************************************************************************** * -* Copyright (c) 2024-2024 Diality Inc. - All Rights Reserved. +* Copyright (c) 2024-2026 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * @file Switches.c * -* @author (last) Sean -* @date (last) 17-Sep-2024 +* @author (last) Sean Nash +* @date (last) 03-Jun-2025 * -* @author (original) Sean -* @date (original) 17-Sep-2024 +* @author (original) Sean Nash +* @date (original) 19-Sep-2024 * ***************************************************************************/ @@ -79,8 +79,9 @@ /*********************************************************************//** * @brief * The execSwitches function executes the switches monitor executive. - * @details \b Inputs: switchesStatus - * @details \b Outputs: switchesStatus + * Switch state changes are debounced for 250ms before formalizing them. + * @details \b Inputs: switchesStatus[], switchDebounceStartTimes[] + * @details \b Outputs: switchesStatus[], switchDebounceStartTimes[] * @return none *************************************************************************/ void execSwitches( void ) @@ -89,7 +90,7 @@ OPN_CLS_STATE_T currentSwitchStates[ NUM_OF_SWITCHES ]; // Get current state of each switch - currentSwitchStates[ H9_SWCH ] = ( FALSE == getFPGAFrontDoorClosedStatus() ? STATE_OPEN : STATE_CLOSED ); + currentSwitchStates[ H9_SWCH ] = ( FALSE == getH9FrontDoorClosedStatus() ? STATE_OPEN : STATE_CLOSED ); // Debounce each switch for ( i = 0; i < NUM_OF_SWITCHES; i++ ) @@ -209,7 +210,7 @@ * The publishSwitchesData function broadcasts the switches data at the * publication interval. * @details \b Message \b Sent: MSG_ID_TD_SWITCHES_DATA - * @details \b Inputs: switchesDataPublicationCounter + * @details \b Inputs: switchesDataPublicationCounter, switchesStatus[] * @details \b Outputs: switchesDataPublicationCounter * @return none *************************************************************************/