Index: firmware/App/Controllers/BalancingChamber.c =================================================================== diff -u -ra2ea8edd918761b403cbe2c00e1bfe2fc69be5ea -rfc3ad8a7cdeed09ed70feaeb3517c885e313dfcc --- firmware/App/Controllers/BalancingChamber.c (.../BalancingChamber.c) (revision a2ea8edd918761b403cbe2c00e1bfe2fc69be5ea) +++ firmware/App/Controllers/BalancingChamber.c (.../BalancingChamber.c) (revision fc3ad8a7cdeed09ed70feaeb3517c885e313dfcc) @@ -762,8 +762,13 @@ state = BAL_CHAMBER_STATE_IDLE; } + // If the dry bicarbonate is enabled then we ignore looking at d18 pressure to be in range. + if ( ( TRUE == getTestConfigStatus( TEST_CONFIG_DD_ENABLE_DRY_BICARB ) ) && ( TRUE == getBicarbChamberFillRequested() ) ) + { + isPressureStabilizedDuringFill = TRUE; + } // Check fresh dialysate pressure back in range to indicate fresh fill complete. - if ( ( freshDialPressure >= FRESH_DIAL_PRESSURE_MIN_PSIG ) && ( freshDialPressure <= FRESH_DIAL_PRESSURE_MAX_PSIG ) ) + else if ( ( freshDialPressure >= FRESH_DIAL_PRESSURE_MIN_PSIG ) && ( freshDialPressure <= FRESH_DIAL_PRESSURE_MAX_PSIG ) ) { if ( ++balChamberFillCompleteStablePressureCounter >= BAL_CHAMBER_FILL_COMPLETE_MS ) { @@ -1019,9 +1024,14 @@ freshDialPressure = getFilteredPressure( D18_PRES ); spentDialPressure = getFilteredPressure( D51_PRES ); - // Check fresh dialysate pressure back in range to indicate fill complete. - if ( ( freshDialPressure >= FRESH_DIAL_PRESSURE_MIN_PSIG ) && ( freshDialPressure <= FRESH_DIAL_PRESSURE_MAX_PSIG ) ) + // If the dry bicarbonate is enabled then we ignore looking at d18 pressure to be in range. + if ( ( TRUE == getTestConfigStatus( TEST_CONFIG_DD_ENABLE_DRY_BICARB ) ) && ( TRUE == getBicarbChamberFillRequested() ) ) { + isPressureStabilizedDuringFill = TRUE; + } + // Check fresh dialysate pressure back in range to indicate fresh fill complete. + else if ( ( freshDialPressure >= FRESH_DIAL_PRESSURE_MIN_PSIG ) && ( freshDialPressure <= FRESH_DIAL_PRESSURE_MAX_PSIG ) ) + { if ( ++balChamberFillCompleteStablePressureCounter >= BAL_CHAMBER_FILL_COMPLETE_MS ) { // stabilized pressure indicating fresh side fill is complete