Index: firmware/App/Modes/StateTxPaused.c =================================================================== diff -u -r8345f0415ce34f2f47afcbf613a00216769f51c6 -rb55b4aad2941b470c5652aad5538a1bbb28a76ed --- firmware/App/Modes/StateTxPaused.c (.../StateTxPaused.c) (revision 8345f0415ce34f2f47afcbf613a00216769f51c6) +++ firmware/App/Modes/StateTxPaused.c (.../StateTxPaused.c) (revision b55b4aad2941b470c5652aad5538a1bbb28a76ed) @@ -106,15 +106,8 @@ setCurrent4thLevelState( NO_SUB_STATE ); // Set user alarm recovery actions allowed in this sub-mode setAlarmUserActionEnabled( ALARM_USER_ACTION_RESUME, TRUE ); - if ( FALSE ) // TODO ( TRUE == getRinsebackCompleted() ) - { - // block rinseback action if already done - setAlarmUserActionEnabled( ALARM_USER_ACTION_RINSEBACK, FALSE ); - } - else - { - setAlarmUserActionEnabled( ALARM_USER_ACTION_RINSEBACK, TRUE ); - } + setAlarmUserActionEnabled( ALARM_USER_ACTION_RINSEBACK, TRUE ); + setAlarmUserActionEnabled( ALARM_USER_ACTION_TEMPORARY_BREAK, TRUE ); setAlarmUserActionEnabled( ALARM_USER_ACTION_END_TREATMENT, TRUE ); transitionToTxPausedState( currentTxPausedState ); @@ -367,34 +360,27 @@ * The handleTreatmentPausedBloodSittingTimer function handles the no re-circ * blood timer. It should only be called when Blood is NOT circulating. * Increments and checks for warning and alarm timeouts. - * @details Inputs: bloodSittingTimerCtr - * @details Outputs: bloodSittingTimerCtr - * @return next treatment paused state + * @details \b Inputs: bloodSittingTimerCtr + * @details \b Outputs: bloodSittingTimerCtr + * @return none *************************************************************************/ static void handleTreatmentPausedBloodSittingTimer( void ) { // Ensure we do not sit in stopped state for too long (if blood in line) - //if ( getRinsebackCompleted() != TRUE ) // TODO rinseback - if ( TRUE ) + bloodSittingTimerCtr++; + + if ( FALSE == doesAlarmStatusIndicateEndTxOnly() ) // Alarms appropriate only if we are not already at an alarm stop, end Tx only { - bloodSittingTimerCtr++; - if ( FALSE == doesAlarmStatusIndicateEndTxOnly() ) // Alarms appropriate only if we are not already at an alarm stop, end Tx only + if ( bloodSittingTimerCtr > WARN_TIME_BLOOD_SITTING ) { - if ( bloodSittingTimerCtr > WARN_TIME_BLOOD_SITTING ) - { - activateAlarmNoData( ALARM_ID_TD_BLOOD_SITTING_WARNING ); - } - if ( bloodSittingTimerCtr > MAX_TIME_BLOOD_SITTING ) - { - // Activate the alarm - activateAlarmNoData( ALARM_ID_TD_BLOOD_SITTING_TOO_LONG ); - } + activateAlarmNoData( ALARM_ID_TD_BLOOD_SITTING_WARNING ); } + if ( bloodSittingTimerCtr > MAX_TIME_BLOOD_SITTING ) + { + // Activate the alarm + activateAlarmNoData( ALARM_ID_TD_BLOOD_SITTING_TOO_LONG ); + } } - else - { - bloodSittingTimerCtr = 0; - } } /*********************************************************************//**