Index: firmware/App/Modes/TreatmentEnd.c =================================================================== diff -u -r44a100f8e5210a02c23b8fcc4527d8e96d577381 -r844f98879b7425c207b58562e623ab960adbc357 --- firmware/App/Modes/TreatmentEnd.c (.../TreatmentEnd.c) (revision 44a100f8e5210a02c23b8fcc4527d8e96d577381) +++ firmware/App/Modes/TreatmentEnd.c (.../TreatmentEnd.c) (revision 844f98879b7425c207b58562e623ab960adbc357) @@ -39,8 +39,10 @@ /// Max time to wait for user to initiate final rinseback. static const U32 TX_END_TIMEOUT_MS = ( ( 15 * 60 * MS_PER_SECOND ) / TASK_GENERAL_INTERVAL ); // TODO - get time from Systems -/// Maximum time in this mode before blood sitting warning given (in general task intervals). +/// Maximum time in this mode before blood sitting alarm given (in general task intervals). static const U32 MAX_TIME_BLOOD_SITTING = ( ( 5 * SEC_PER_MIN * MS_PER_SECOND ) / TASK_GENERAL_INTERVAL ); +/// Maximum time in this mode before blood sitting warning given (in general task intervals). +static const U32 WARN_TIME_BLOOD_SITTING = ( ( 4 * SEC_PER_MIN * MS_PER_SECOND ) / TASK_GENERAL_INTERVAL ); // ********** private data ********** @@ -275,8 +277,13 @@ else { // Ensure we do not sit in stopped state for too long + if ( bloodSittingTimerCtr > WARN_TIME_BLOOD_SITTING ) + { + activateAlarmNoData( ALARM_ID_BLOOD_SITTING_WARNING ); + } if ( bloodSittingTimerCtr > MAX_TIME_BLOOD_SITTING ) { + // Raise the alarm activateAlarmNoData( ALARM_ID_TREATMENT_STOPPED_NO_RINSEBACK ); } }