Index: firmware/App/Modes/TreatmentEnd.c =================================================================== diff -u -re14917fa5809c4cce03aca876649904c82feb79c -rcb3879590049547062bc0f63c79cabb6698673da --- firmware/App/Modes/TreatmentEnd.c (.../TreatmentEnd.c) (revision e14917fa5809c4cce03aca876649904c82feb79c) +++ firmware/App/Modes/TreatmentEnd.c (.../TreatmentEnd.c) (revision cb3879590049547062bc0f63c79cabb6698673da) @@ -7,8 +7,8 @@ * * @file TreatmentEnd.c * -* @author (last) Sean Nash -* @date (last) 23-Jun-2023 +* @author (last) James Walter Taylor +* @date (last) 25-Jul-2023 * * @author (original) Sean Nash * @date (original) 05-Feb-2021 @@ -195,12 +195,6 @@ txEndTimerCtr++; - // Check for user confirmation of end treatment - if ( CONFIRMATION_REQUEST_STATUS_ACCEPTED == getConfirmationRequestStatus( GENERIC_CONFIRM_ID_TREATMENT_END ) ) - { - txEndAlarmEndTreatmentRequested = TRUE; - } - switch ( treatmentEndState ) { case TREATMENT_END_WAIT_FOR_RINSEBACK_STATE: @@ -319,16 +313,19 @@ } else { - // Ensure we do not sit in stopped state for too long - if ( bloodSittingTimerCtr > WARN_TIME_BLOOD_SITTING ) + if ( FALSE == doesAlarmStatusIndicateEndTxOnly() ) // Alarms appropriate only if we are not already at an alarm stop, end Tx only { - activateAlarmNoData( ALARM_ID_HD_END_OF_TREATMENT_ALARM ); + // Ensure we do not sit in stopped state for too long + if ( bloodSittingTimerCtr > WARN_TIME_BLOOD_SITTING ) + { + activateAlarmNoData( ALARM_ID_HD_END_OF_TREATMENT_ALARM ); + } + if ( bloodSittingTimerCtr > MAX_TIME_BLOOD_SITTING ) + { + // Raise the alarm + activateAlarmNoData( ALARM_ID_HD_END_OF_TREATMENT_HIGH ); + } } - if ( bloodSittingTimerCtr > MAX_TIME_BLOOD_SITTING ) - { - // Raise the alarm - activateAlarmNoData( ALARM_ID_HD_END_OF_TREATMENT_HIGH ); - } } return result; @@ -370,8 +367,7 @@ *************************************************************************/ void signalTreatmentEndAlarmEndTxUserAction( void ) { - // Send message to UI to get user confirmation to end treatment - action initiated only upon receipt of user confirmation from UI - addConfirmationRequest( GENERIC_CONFIRM_ID_TREATMENT_END, GENERIC_CONFIRM_CMD_REQUEST_OPEN, 0 ); + txEndAlarmEndTreatmentRequested = TRUE; } /*********************************************************************//**