Index: firmware/App/Modes/ModeChemicalDisinfect.c =================================================================== diff -u -r8483d8dd3ceccefc737eac09f1e2bef772f22a06 -r9226e7b5b52c30057e93453ced523f563fbd89fe --- firmware/App/Modes/ModeChemicalDisinfect.c (.../ModeChemicalDisinfect.c) (revision 8483d8dd3ceccefc737eac09f1e2bef772f22a06) +++ firmware/App/Modes/ModeChemicalDisinfect.c (.../ModeChemicalDisinfect.c) (revision 9226e7b5b52c30057e93453ced523f563fbd89fe) @@ -1326,14 +1326,17 @@ *************************************************************************/ static void failChemicalDisinfect( void ) { + // If a fault alarm is active go to mode fault otherwise for cleaning mode alarms, transition to standby + DG_OP_MODE_T nextOpMode = ( FALSE == isDGFaultAlarmActive() ? DG_MODE_STAN : DG_MODE_FAUL ); + // In the cleaning modes the alarms are triggered but the mode is not transitioned to fault automatically // so transition to fault mode is done here if ( alarmDetectedPendingTrigger != ALARM_ID_NO_ALARM ) { SET_ALARM_WITH_1_U32_DATA( alarmDetectedPendingTrigger, prevChemDisinfectState ) } - requestNewOperationMode( DG_MODE_STAN ); + requestNewOperationMode( nextOpMode ); } /*********************************************************************//** Index: firmware/App/Modes/ModeChemicalDisinfectFlush.c =================================================================== diff -u -r9b8889b096ae02246e939468fc843f467de8c6bb -r9226e7b5b52c30057e93453ced523f563fbd89fe --- firmware/App/Modes/ModeChemicalDisinfectFlush.c (.../ModeChemicalDisinfectFlush.c) (revision 9b8889b096ae02246e939468fc843f467de8c6bb) +++ firmware/App/Modes/ModeChemicalDisinfectFlush.c (.../ModeChemicalDisinfectFlush.c) (revision 9226e7b5b52c30057e93453ced523f563fbd89fe) @@ -917,13 +917,16 @@ *************************************************************************/ static void failChemicalDisinfectFlush( void ) { + // If a fault alarm is active go to mode fault otherwise for cleaning mode alarms, transition to standby + DG_OP_MODE_T nextOpMode = ( FALSE == isDGFaultAlarmActive() ? DG_MODE_STAN : DG_MODE_FAUL ); + // In the cleaning modes the alarms are triggered but the mode is not transitioned to fault automatically // so transition to fault mode is done here if ( alarmDetectedPendingTrigger != ALARM_ID_NO_ALARM ) { SET_ALARM_WITH_1_U32_DATA( alarmDetectedPendingTrigger, prevChemDisinfectFlushState ) } - requestNewOperationMode( DG_MODE_STAN ); + requestNewOperationMode( nextOpMode ); } /*********************************************************************//** Index: firmware/App/Modes/ModeFlush.c =================================================================== diff -u -r9b8889b096ae02246e939468fc843f467de8c6bb -r9226e7b5b52c30057e93453ced523f563fbd89fe --- firmware/App/Modes/ModeFlush.c (.../ModeFlush.c) (revision 9b8889b096ae02246e939468fc843f467de8c6bb) +++ firmware/App/Modes/ModeFlush.c (.../ModeFlush.c) (revision 9226e7b5b52c30057e93453ced523f563fbd89fe) @@ -953,11 +953,14 @@ *************************************************************************/ static void failFlushMode( void ) { + // If a fault alarm is active go to mode fault otherwise for cleaning mode alarms, transition to standby + DG_OP_MODE_T nextOpMode = ( FALSE == isDGFaultAlarmActive() ? DG_MODE_STAN : DG_MODE_FAUL ); + if ( alarmDetectedPendingTrigger != ALARM_ID_NO_ALARM ) { SET_ALARM_WITH_1_U32_DATA( alarmDetectedPendingTrigger, prevFlushState ) } - requestNewOperationMode( DG_MODE_STAN ); + requestNewOperationMode( nextOpMode ); } /*********************************************************************//** Index: firmware/App/Modes/ModeHeatDisinfect.c =================================================================== diff -u -r8483d8dd3ceccefc737eac09f1e2bef772f22a06 -r9226e7b5b52c30057e93453ced523f563fbd89fe --- firmware/App/Modes/ModeHeatDisinfect.c (.../ModeHeatDisinfect.c) (revision 8483d8dd3ceccefc737eac09f1e2bef772f22a06) +++ firmware/App/Modes/ModeHeatDisinfect.c (.../ModeHeatDisinfect.c) (revision 9226e7b5b52c30057e93453ced523f563fbd89fe) @@ -1602,14 +1602,17 @@ *************************************************************************/ static void failHeatDisinfect( void ) { + // If a fault alarm is active go to mode fault otherwise for cleaning mode alarms, transition to standby + DG_OP_MODE_T nextOpMode = ( FALSE == isDGFaultAlarmActive() ? DG_MODE_STAN : DG_MODE_FAUL ); + // In the cleaning modes the alarms are triggered but the mode is not transitioned to fault automatically // so transition to fault mode is done here if ( alarmDetectedPendingTrigger != ALARM_ID_NO_ALARM ) { SET_ALARM_WITH_1_U32_DATA( alarmDetectedPendingTrigger, prevHeatDisinfectState ) } - requestNewOperationMode( DG_MODE_STAN ); + requestNewOperationMode( nextOpMode ); } /*********************************************************************//** Index: firmware/App/Modes/ModeHeatDisinfectActiveCool.c =================================================================== diff -u -r8483d8dd3ceccefc737eac09f1e2bef772f22a06 -r9226e7b5b52c30057e93453ced523f563fbd89fe --- firmware/App/Modes/ModeHeatDisinfectActiveCool.c (.../ModeHeatDisinfectActiveCool.c) (revision 8483d8dd3ceccefc737eac09f1e2bef772f22a06) +++ firmware/App/Modes/ModeHeatDisinfectActiveCool.c (.../ModeHeatDisinfectActiveCool.c) (revision 9226e7b5b52c30057e93453ced523f563fbd89fe) @@ -715,13 +715,16 @@ *************************************************************************/ static void failHeatDisinfectActiveCool( void ) { + // If a fault alarm is active go to mode fault otherwise for cleaning mode alarms, transition to standby + DG_OP_MODE_T nextOpMode = ( FALSE == isDGFaultAlarmActive() ? DG_MODE_STAN : DG_MODE_FAUL ); + // In the cleaning modes the alarms are triggered but the mode is not transitioned to fault automatically // so transition to fault mode is done here if ( alarmDetectedPendingTrigger != ALARM_ID_NO_ALARM ) { SET_ALARM_WITH_1_U32_DATA( alarmDetectedPendingTrigger, heatDisinfectActiceCoolPrevState ) } - requestNewOperationMode( DG_MODE_STAN ); + requestNewOperationMode( nextOpMode ); } /*********************************************************************//** Index: firmware/App/Modes/ModeROPermeateSample.c =================================================================== diff -u -r9b8889b096ae02246e939468fc843f467de8c6bb -r9226e7b5b52c30057e93453ced523f563fbd89fe --- firmware/App/Modes/ModeROPermeateSample.c (.../ModeROPermeateSample.c) (revision 9b8889b096ae02246e939468fc843f467de8c6bb) +++ firmware/App/Modes/ModeROPermeateSample.c (.../ModeROPermeateSample.c) (revision 9226e7b5b52c30057e93453ced523f563fbd89fe) @@ -620,13 +620,16 @@ *************************************************************************/ static void failROPermeateSample( void ) { + // If a fault alarm is active go to mode fault otherwise for cleaning mode alarms, transition to standby + DG_OP_MODE_T nextOpMode = ( FALSE == isDGFaultAlarmActive() ? DG_MODE_STAN : DG_MODE_FAUL ); + // In the cleaning modes the alarms are triggered but the mode is not transitioned to fault automatically // so transition to fault mode is done here if ( alarmDetectedPendingTrigger != ALARM_ID_NO_ALARM ) { SET_ALARM_WITH_1_U32_DATA( alarmDetectedPendingTrigger, roPermeateSamplePrevState ) } - requestNewOperationMode( DG_MODE_STAN ); + requestNewOperationMode( nextOpMode ); } /*********************************************************************//** Index: firmware/App/Services/AlarmMgmt.c =================================================================== diff -u -rd325999b7b3ea03b7e294cb8a0b97df93812fbe9 -r9226e7b5b52c30057e93453ced523f563fbd89fe --- firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision d325999b7b3ea03b7e294cb8a0b97df93812fbe9) +++ firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision 9226e7b5b52c30057e93453ced523f563fbd89fe) @@ -57,7 +57,7 @@ static BOOL alarmIsActive[ NUM_OF_ALARM_IDS ]; ///< Array of current state of each alarm static BOOL alarmConditionIsActive[ NUM_OF_ALARM_IDS ]; ///< Array of flag indicates if an alarm condition is active static U32 alarmInfoPublicationTimerCounter; ///< Used to schedule alarm information publication to CAN bus. -static BOOL isAFlaultAlarmActive; ///< Boolean flag to indicate whether a DG fault alarm is active. +static BOOL isAFaultAlarmActive; ///< Boolean flag to indicate whether a DG fault alarm is active. /// Interval (in task intervals) at which to publish alarm information to CAN bus. static OVERRIDE_U32_T alarmInfoPublishInterval = { ALARM_INFO_PUB_INTERVAL, ALARM_INFO_PUB_INTERVAL, ALARM_INFO_PUB_INTERVAL, 0 }; @@ -73,7 +73,7 @@ * The initAlarmMgmt function initializes the AlarmMgmt module. * @details Inputs: none * @details Outputs: alarmInfoPublicationTimerCounter, alarmLEDTimer, - * isAFlaultAlarmActive, alarmIsActive, alarmConditionIsActive + * isAFaultAlarmActive, alarmIsActive, alarmConditionIsActive * @return none *************************************************************************/ void initAlarmMgmt( void ) @@ -82,7 +82,7 @@ alarmInfoPublicationTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; alarmLEDTimer = 0; - isAFlaultAlarmActive = FALSE; + isAFaultAlarmActive = FALSE; // initialize alarm states and start time stamps for ( alrm = ALARM_ID_NO_ALARM; alrm < NUM_OF_ALARM_IDS; alrm++ ) @@ -112,7 +112,7 @@ * @brief * The activateAlarm function activates a given alarm. * @details Inputs: none - * @details Outputs: alarmIsActive[] + * @details Outputs: alarmIsActive[], isAFaultAlarmActive * @param alarm ID of alarm to activate * @return none *************************************************************************/ @@ -131,7 +131,7 @@ if ( TRUE == ALARM_TABLE[ alarm ].alarmIsDGFault ) { // There is a DG fault alarm. - isAFlaultAlarmActive = TRUE; + isAFaultAlarmActive = TRUE; if ( TRUE == isTransitionToFaultRequired() ) { @@ -288,7 +288,7 @@ *************************************************************************/ BOOL isDGFaultAlarmActive( void ) { - return isAFlaultAlarmActive; + return isAFaultAlarmActive; } /*********************************************************************//**