Index: firmware/App/Modes/Rinseback.c =================================================================== diff -u -r9bf209fc5813b7e806f51f408ece77174a336c9b -rcbaa57803fa8359407a799fca0cde6ae2c486bd7 --- firmware/App/Modes/Rinseback.c (.../Rinseback.c) (revision 9bf209fc5813b7e806f51f408ece77174a336c9b) +++ firmware/App/Modes/Rinseback.c (.../Rinseback.c) (revision cbaa57803fa8359407a799fca0cde6ae2c486bd7) @@ -7,8 +7,8 @@ * * @file Rinseback.c * -* @author (last) Sean Nash -* @date (last) 09-May-2022 +* @author (last) Dara Navaei +* @date (last) 13-Jul-2022 * * @author (original) Sean Nash * @date (original) 20-Jan-2021 @@ -493,14 +493,8 @@ { RINSEBACK_STATE_T result = RINSEBACK_STOP_STATE; - // Have we been in this stopped state for too long w/o having delivered full blood volume back to patient? - if ( ( rinsebackTimerCtr > MAX_RINSEBACK_TIME ) && ( getRinsebackVolume() < rinsebackTargetVolume_mL ) ) - { - signalGoToTreatmentStopped(); - activateAlarmNoData( ALARM_ID_TREATMENT_RINSEBACK_TIMEOUT_ALARM ); - } // Have we been in this stopped state for too long despite having delivered full blood volume back to patient? - else if ( ( rinsebackTimerCtr > MAX_RINSEBACK_DONE_TIME ) && ( getRinsebackVolume() >= rinsebackTargetVolume_mL ) ) + if ( ( rinsebackTimerCtr > MAX_RINSEBACK_DONE_TIME ) && ( getRinsebackVolume() >= rinsebackTargetVolume_mL ) ) { signalGoToTreatmentStopped(); activateAlarmNoData( ALARM_ID_TREATMENT_RINSEBACK_TIMEOUT_ALARM ); @@ -511,6 +505,12 @@ { activateAlarmNoData( ALARM_ID_HD_TREATMENT_RINSEBACK_TIMEOUT_WARNING ); } + // Have we been in this stopped state for too long w/o having delivered full blood volume back to patient? + else if ( ( rinsebackTimerCtr > MAX_RINSEBACK_TIME ) && ( getRinsebackVolume() < rinsebackTargetVolume_mL ) ) + { + signalGoToTreatmentStopped(); + activateAlarmNoData( ALARM_ID_TREATMENT_RINSEBACK_TIMEOUT_ALARM ); + } else if ( TRUE == recircRequested ) { signalRinsebackToRecirc();