Index: firmware/App/Services/CpldInterface.c =================================================================== diff -u -r3518e8a088c32e75c0c8960d5e629a7401095feb -r395522dffef1348e176564925656012f529c1910 --- firmware/App/Services/CpldInterface.c (.../CpldInterface.c) (revision 3518e8a088c32e75c0c8960d5e629a7401095feb) +++ firmware/App/Services/CpldInterface.c (.../CpldInterface.c) (revision 395522dffef1348e176564925656012f529c1910) @@ -1,16 +1,16 @@ /************************************************************************** * -* 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 CPLD.c +* @file CpldInterface.c * -* @author (last) Sean -* @date (last) 07-Aug-2024 +* @author (last) Sean Nash +* @date (last) 24-Oct-2024 * -* @author (original) Sean +* @author (original) Sean Nash * @date (original) 07-Aug-2024 * ***************************************************************************/ @@ -35,6 +35,7 @@ #define MAX_24V_LEVEL_ON_SAFETY_SHUTDOWN 5.0F ///< Maximum voltage on 24V line when safety shutdown asserted. #define MIN_24V_LEVEL_ON_SAFETY_RECOVER 22.6F ///< Minimum voltage on 24V line when safety shutdown is recovered. + #define MIN_BACKUP_ALARM_CURRENT_MA 200.0F ///< Minimum backup alarm audio current (in mA) detected when safety shutdown asserted. #define MAX_BACKUP_ALARM_CURRENT_MA 10.0F ///< Maximum backup alarm audio current (in mA) detected when safety shutdown is recovered. @@ -377,19 +378,24 @@ /*********************************************************************//** * @brief - * The testSetSafetyShutdownOverride function overrides the safety + * The testSafetyShutdownOverride function overrides the safety * shutdown. * @details \b Inputs: none * @details \b Outputs: HD safety shutdown overridden * @param value TRUE to activate safety shutdown, FALSE to de-activate it. * @return TRUE if override successful, FALSE if not *************************************************************************/ -BOOL testSetSafetyShutdownOverride( U32 value ) +BOOL testSafetyShutdownOverride( MESSAGE_T *message ) { - BOOL result = FALSE; + BOOL result = FALSE; + TEST_OVERRIDE_PAYLOAD_T payload; + OVERRIDE_TYPE_T ovType = getOverridePayloadFromMessage( message, &payload ); - if ( TRUE == isTestingActivated() ) + // Verify tester has logged in with f/w and override type is valid + if ( ( TRUE == isTestingActivated() ) && ( ovType != OVERRIDE_INVALID ) && ( ovType < NUM_OF_OVERRIDE_TYPES ) ) { + BOOL value = (BOOL)payload.state.u32; + // Remember natural state before override so we can reset safetyShutdownOverrideResetState = safetyShutdownActivated; // Override safety shutdown signal