Index: firmware/App/Monitors/Buttons.c =================================================================== diff -u -r036a75d76ab01912646a480b935d97187a231a19 -r395522dffef1348e176564925656012f529c1910 --- firmware/App/Monitors/Buttons.c (.../Buttons.c) (revision 036a75d76ab01912646a480b935d97187a231a19) +++ firmware/App/Monitors/Buttons.c (.../Buttons.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 Buttons.c * -* @author (last) Sean -* @date (last) 18-Sep-2024 +* @author (last) Sean Nash +* @date (last) 24-Jun-2025 * -* @author (original) Sean -* @date (original) 18-Sep-2024 +* @author (original) Sean Nash +* @date (original) 19-Sep-2024 * ***************************************************************************/ @@ -146,8 +146,13 @@ *************************************************************************/ void execButtons( void ) { +#ifndef TEST_USE_OFF_AS_STOP_BUTTON PIN_SIGNAL_STATE_T off = getCPLDOffButton(); PIN_SIGNAL_STATE_T stop = getCPLDStopButton(); +#else + PIN_SIGNAL_STATE_T off = PIN_SIGNAL_LOW; + PIN_SIGNAL_STATE_T stop = getCPLDOffButton(); +#endif // Set current button states read from CPLD dataOffButtonState.data = ( off == PIN_SIGNAL_HIGH ? BUTTON_STATE_PRESSED : BUTTON_STATE_RELEASED ); @@ -487,8 +492,10 @@ // If stop button not consumed within a reasonable time, s/w fault if ( TRUE == didTimeout( stopButtonPendingTimer, STOP_BUTTON_PENDING_TIMEOUT_MS ) ) { - stopButtonPressPending = FALSE; - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_TD_SOFTWARE_FAULT, SW_FAULT_ID_BUTTONS_STOP_BUTTON_NOT_CONSUMED ) + stopButtonPressPending = FALSE; +#ifndef TEST_NO_STOP_CONSUME_CHECK + SET_ALARM_WITH_1_U32_DATA( ALARM_ID_TD_SOFTWARE_FAULT, SW_FAULT_ID_BUTTONS_STOP_BUTTON_NOT_CONSUMED ) +#endif } } }