Index: firmware/App/Modes/StateTxPaused.c =================================================================== diff -u -r0eb08506bbe69f0cfc272e0a329591ffdeb3fc95 -r7166df604166f74ff5eb8667e07947d52ac39cf2 --- firmware/App/Modes/StateTxPaused.c (.../StateTxPaused.c) (revision 0eb08506bbe69f0cfc272e0a329591ffdeb3fc95) +++ firmware/App/Modes/StateTxPaused.c (.../StateTxPaused.c) (revision 7166df604166f74ff5eb8667e07947d52ac39cf2) @@ -8,7 +8,7 @@ * @file StateTxPaused.c * * @author (last) Praneeth Bunne -* @date (last) 26-Jun-2026 +* @date (last) 07-Aug-2026 * * @author (original) Sean Nash * @date (original) 21-Apr-2025 @@ -105,15 +105,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 ); @@ -366,34 +359,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; - } } /*********************************************************************//**