Index: firmware/App/HDCommon.h =================================================================== diff -u -re8077ba40df2e54d7d24e88337d48a3e31831b84 -r3fc7bce6763882c932a7da457fff2d9747b38be2 --- firmware/App/HDCommon.h (.../HDCommon.h) (revision e8077ba40df2e54d7d24e88337d48a3e31831b84) +++ firmware/App/HDCommon.h (.../HDCommon.h) (revision 3fc7bce6763882c932a7da457fff2d9747b38be2) @@ -10,8 +10,8 @@ * @author (last) Sean Nash * @date (last) 24-Aug-2023 * -* @author (original) Sean -* @date (original) 27-Feb-2020 +* @author (original) Sean +* @date (original) 27-Feb-2020 * ***************************************************************************/ @@ -25,7 +25,7 @@ #define HD_VERSION_MAJOR 0 #define HD_VERSION_MINOR 9 #define HD_VERSION_MICRO 0 -#define HD_VERSION_BUILD 295 +#define HD_VERSION_BUILD 798 // ********** development build switches ********** Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -r28e7d73ed933961eaa28f901199e34f7cca232ac -r3fc7bce6763882c932a7da457fff2d9747b38be2 --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 28e7d73ed933961eaa28f901199e34f7cca232ac) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 3fc7bce6763882c932a7da457fff2d9747b38be2) @@ -76,6 +76,9 @@ /// Interval (in task intervals) at which to publish standby mode data to CAN bus. static OVERRIDE_U32_T standbyModePublishInterval = { DISINFECTS_DATA_PUB_INTERVAL, DISINFECTS_DATA_PUB_INTERVAL, DISINFECTS_DATA_PUB_INTERVAL, 0 }; +static const U32 SERVICE_TIME_INTERVAL_S = (U32)( 365 * 0.5 * SECONDS_IN_A_DAY ); ///< HD/DG 6-month service interval in seconds. +static BOOL homingInitiated; ///< Flag indicates actuator homing has been initiated from standby mode. + // ********** private function prototypes ********** static HD_STANDBY_STATE_T handleStandbyModeStartState( void ); Index: firmware/App/Services/AlarmMgmt.c =================================================================== diff -u -rf7bddc13e4e585c784b156fa84a2b86398962f07 -r3fc7bce6763882c932a7da457fff2d9747b38be2 --- firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision f7bddc13e4e585c784b156fa84a2b86398962f07) +++ firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision 3fc7bce6763882c932a7da457fff2d9747b38be2) @@ -260,6 +260,33 @@ /*********************************************************************//** * @brief + * The isACPowerLost function determines whether A/C power loss has + * been detected. This function sets the alarms blocked condition to + * allow smooth alarm recovery. + * + * @details Inputs: alarmStatus + * @details Outputs: alarmsBlockedTimer + * @return TRUE if A/C power loss alarm is in effect, FALSE if not + *************************************************************************/ +BOOL isACPowerLost( void ) +{ + BOOL result = TRUE; + + // Continue to block new alarms until the alarms are cleared. + if ( ( FALSE == isAlarmConditionDetected( ALARM_ID_HD_AC_POWER_LOST ) ) && + ( FALSE == isAlarmConditionDetected( ALARM_ID_HD_AC_POWER_LOST_IN_TREATMENT ) ) ) + { + result = FALSE; + } + else + { + alarmsBlockedTimer = ALARM_BLOCKED_COUNT_AFTER_AC_RETURN; + } + return result; +} + +/*********************************************************************//** + * @brief * The activateAlarm function activates a given alarm. * @details Inputs: none * @details Outputs: alarmIsActive[], alarmStartedAt[], alarmStatus is updated @@ -268,6 +295,11 @@ *************************************************************************/ static void activateAlarm( ALARM_ID_T alarm ) { + // Block new alarms, occuring during loss of AC power + if ( ( TRUE == getCPLDACPowerLossDetected() ) ) + { + alarmsBlockedTimer = ALARM_BLOCKED_COUNT_AFTER_AC_RETURN; + } // Verify valid alarm index if ( ( alarm > ALARM_ID_NO_ALARM ) && ( alarm < NUM_OF_ALARM_IDS ) ) {