Index: firmware/App/Controllers/BalancingChamber.c =================================================================== diff -u -r1535047d4952ab49b1ed7abb7a8b5831e59850f7 -r88ca2dc610e3a7a5bbf2239e01ae1c6ea6686bfc --- firmware/App/Controllers/BalancingChamber.c (.../BalancingChamber.c) (revision 1535047d4952ab49b1ed7abb7a8b5831e59850f7) +++ firmware/App/Controllers/BalancingChamber.c (.../BalancingChamber.c) (revision 88ca2dc610e3a7a5bbf2239e01ae1c6ea6686bfc) @@ -950,21 +950,14 @@ spentDialPressure = getFilteredPressure( D51_PRES ); // Check fresh dialysate pressure back in range to indicate fresh fill complete. - if ( getTestConfigStatus( TEST_CONFIG_DD_DISABLE_BC_PRESSURE_ALARMS ) != TRUE ) + if ( ( freshDialPressure >= FRESH_DIAL_PRESSURE_MIN_PSIG ) && ( freshDialPressure <= FRESH_DIAL_PRESSURE_MAX_PSIG ) ) { - if ( ( freshDialPressure >= FRESH_DIAL_PRESSURE_MIN_PSIG ) && ( freshDialPressure <= FRESH_DIAL_PRESSURE_MAX_PSIG ) ) + if ( ++balChamberFillCompleteStablePressureCounter >= BAL_CHAMBER_FILL_COMPLETE_MS ) { - if ( ++balChamberFillCompleteStablePressureCounter >= BAL_CHAMBER_FILL_COMPLETE_MS ) - { - // stabilized pressure indicating fresh side fill is complete - isPressureStabilizedDuringFill = TRUE; - } + // stabilized pressure indicating fresh side fill is complete + isPressureStabilizedDuringFill = TRUE; } } - else - { - isPressureStabilizedDuringFill = FALSE; - } // Spent side of balancing chamber fill is complete or not checkSpentFillComplete( spentDialPressure ); @@ -1119,21 +1112,14 @@ spentDialPressure = getFilteredPressure( D51_PRES ); // Check fresh and spent dialysate pressure back in range to indicate fill complete. - if ( getTestConfigStatus( TEST_CONFIG_DD_DISABLE_BC_PRESSURE_ALARMS ) != TRUE ) + if ( ( freshDialPressure >= FRESH_DIAL_PRESSURE_MIN_PSIG ) && ( freshDialPressure <= FRESH_DIAL_PRESSURE_MAX_PSIG ) ) { - if ( ( freshDialPressure >= FRESH_DIAL_PRESSURE_MIN_PSIG ) && ( freshDialPressure <= FRESH_DIAL_PRESSURE_MAX_PSIG ) ) + if ( ++balChamberFillCompleteStablePressureCounter >= BAL_CHAMBER_FILL_COMPLETE_MS ) { - if ( ++balChamberFillCompleteStablePressureCounter >= BAL_CHAMBER_FILL_COMPLETE_MS ) - { - // stabilized pressure indicating fresh side fill is complete - isPressureStabilizedDuringFill = TRUE; - } + // stabilized pressure indicating fresh side fill is complete + isPressureStabilizedDuringFill = TRUE; } } - else - { - isPressureStabilizedDuringFill = FALSE; - } // Spent side of balancing chamber fill is complete or not checkSpentFillComplete( spentDialPressure ); @@ -1194,24 +1180,25 @@ { // Move to next state when pressure is in range. state = BAL_CHAMBER_STATE1_FILL_START; - - // Trigger pressure drop alarm after first cycle of balancing chamber switching complete - if ( FALSE == isFirstCycleBCSwitchingCompleted ) - { - isFirstCycleBCSwitchingCompleted = TRUE; - } } } else { // Allow to proceed next state even though pressure is not stabilized. state = BAL_CHAMBER_STATE1_FILL_START; + } } else { state = BAL_CHAMBER_STATE1_FILL_START; } + + // Trigger pressure drop alarm after first cycle of balancing chamber switching complete + if ( FALSE == isFirstCycleBCSwitchingCompleted ) + { + isFirstCycleBCSwitchingCompleted = TRUE; + } } return state;