Index: firmware/App/Modes/StateTxPaused.c =================================================================== diff -u -rbbd48b033ef7307a30815e490eb28825c7afcc2b -ra89b071a59a5575e9bcd1b04d133ec318e24a411 --- firmware/App/Modes/StateTxPaused.c (.../StateTxPaused.c) (revision bbd48b033ef7307a30815e490eb28825c7afcc2b) +++ firmware/App/Modes/StateTxPaused.c (.../StateTxPaused.c) (revision a89b071a59a5575e9bcd1b04d133ec318e24a411) @@ -7,8 +7,8 @@ * * @file StateTxPaused.c * -* @author (last) Praneeth Bunne -* @date (last) 26-Jun-2026 +* @author (last) Varshini Nagabooshanam +* @date (last) 11-Aug-2026 * * @author (original) Sean Nash * @date (original) 21-Apr-2025 @@ -27,7 +27,7 @@ #include "ModeTreatment.h" //#include "NVDataMgmt.h" #include "OperationModes.h" -#include "RotaryValve.h" +#include "Pressures.h" #include "StateTxPaused.h" #include "Switches.h" #include "TaskGeneral.h" @@ -107,21 +107,14 @@ 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 ); // TODO figure out the code -// signalInitiatePressureStabilization( USE_NORMAL_STABILIZATION_PERIOD ); + signalInitiatePressureStabilization( USE_NORMAL_STABILIZATION_PERIOD ); // Reset blood leak zeroing params // resetBloodLeakZeroingVariables(); @@ -368,34 +361,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; - } } /*********************************************************************//**