Index: firmware/App/Modes/TreatmentEnd.c =================================================================== diff -u -r44a100f8e5210a02c23b8fcc4527d8e96d577381 -rc021768acf8408116a87585e21c2237713d6c825 --- firmware/App/Modes/TreatmentEnd.c (.../TreatmentEnd.c) (revision 44a100f8e5210a02c23b8fcc4527d8e96d577381) +++ firmware/App/Modes/TreatmentEnd.c (.../TreatmentEnd.c) (revision c021768acf8408116a87585e21c2237713d6c825) @@ -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,6 +277,10 @@ 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 ) { activateAlarmNoData( ALARM_ID_TREATMENT_STOPPED_NO_RINSEBACK ); Index: firmware/App/Modes/TreatmentRecirc.c =================================================================== diff -u -rac6532c81f2a6d4ad1c67420c22d59f6aeeaae13 -rc021768acf8408116a87585e21c2237713d6c825 --- firmware/App/Modes/TreatmentRecirc.c (.../TreatmentRecirc.c) (revision ac6532c81f2a6d4ad1c67420c22d59f6aeeaae13) +++ firmware/App/Modes/TreatmentRecirc.c (.../TreatmentRecirc.c) (revision c021768acf8408116a87585e21c2237713d6c825) @@ -326,7 +326,7 @@ } // Respond to user action request - sendRinsebackCmdResponse( accepted, (U32)rejReason ); + sendTreatmentRecircCmdResponse( accepted, (U32)rejReason ); } /*********************************************************************//** 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 ); }