Index: firmware/App/Modes/TreatmentStop.c =================================================================== diff -u -r76350fb0af4be9ae98e9f8af825734363f60f4e6 -rc021768acf8408116a87585e21c2237713d6c825 --- firmware/App/Modes/TreatmentStop.c (.../TreatmentStop.c) (revision 76350fb0af4be9ae98e9f8af825734363f60f4e6) +++ firmware/App/Modes/TreatmentStop.c (.../TreatmentStop.c) (revision c021768acf8408116a87585e21c2237713d6c825) @@ -34,8 +34,10 @@ // ********** private definitions ********** -/// 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 ); /// Treatment stop status broadcast interval. #define TREATMENT_STOP_DATA_PUBLISH_INTERVAL ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) @@ -139,8 +141,12 @@ void execTreatmentStop( void ) { // Ensure we do not sit in stopped state for too long - if ( ++bloodSittingTimerCtr > MAX_TIME_BLOOD_SITTING ) + if ( ++bloodSittingTimerCtr > WARN_TIME_BLOOD_SITTING ) { + activateAlarmNoData( ALARM_ID_BLOOD_SITTING_WARNING ); + } + if ( bloodSittingTimerCtr > MAX_TIME_BLOOD_SITTING ) + { activateAlarmNoData( ALARM_ID_TREATMENT_STOPPED_NO_RINSEBACK ); }