Index: firmware/App/Controllers/BalancingChamber.c =================================================================== diff -u -rebc66999208b337d8cdef22c07f73d47bb0720a4 -r50aa4c2d630370fa62f871b82db3afc70d763dcb --- firmware/App/Controllers/BalancingChamber.c (.../BalancingChamber.c) (revision ebc66999208b337d8cdef22c07f73d47bb0720a4) +++ firmware/App/Controllers/BalancingChamber.c (.../BalancingChamber.c) (revision 50aa4c2d630370fa62f871b82db3afc70d763dcb) @@ -851,6 +851,7 @@ state = BAL_CHAMBER_STATE_IDLE; } +#ifdef __D65_OPENING_DISABLED__ // 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 ) ) { @@ -860,6 +861,22 @@ isPressureStabilizedDuringFill = TRUE; } } +#else + // If the dry bicarbonate is enabled then we ignore looking at d18 pressure to be in range. + if ( ( FALSE == getTestConfigStatus( TEST_CONFIG_DD_DISABLE_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 + isPressureStabilizedDuringFill = TRUE; + } + } +#endif // Close fresh side valves only upon fresh fill completion by detecting pressure rise. closeFreshSideValvesWhenFillComplete(); @@ -1101,6 +1118,7 @@ freshDialPressure = getFilteredPressure( D18_PRES ); spentDialPressure = getFilteredPressure( D51_PRES ); +#ifdef __D65_OPENING_DISABLED__ // 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 ) ) { @@ -1110,6 +1128,22 @@ isPressureStabilizedDuringFill = TRUE; } } +#else + // If the dry bicarbonate is enabled then we ignore looking at d18 pressure to be in range. + if ( ( FALSE == getTestConfigStatus( TEST_CONFIG_DD_DISABLE_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 + isPressureStabilizedDuringFill = TRUE; + } + } +#endif // After the first BC cycle, fault if fill never completes at the Qd-based timeout. if ( ( currentBalChamberFillCounter > balChamberFillTimeoutCount ) && ( TRUE != getTestConfigStatus( TEST_CONFIG_DD_DISABLE_BC_PRESSURE_ALARMS ) ) ) Index: firmware/App/Controllers/DryBiCart.c =================================================================== diff -u -r9416033250bf0e1a8c48d6a37322f2c4c59e6f0c -r50aa4c2d630370fa62f871b82db3afc70d763dcb --- firmware/App/Controllers/DryBiCart.c (.../DryBiCart.c) (revision 9416033250bf0e1a8c48d6a37322f2c4c59e6f0c) +++ firmware/App/Controllers/DryBiCart.c (.../DryBiCart.c) (revision 50aa4c2d630370fa62f871b82db3afc70d763dcb) @@ -1214,9 +1214,10 @@ BICARB_CHAMBER_FILL_EXEC_STATE_T state = BICARB_CHAMBER_PRESSURE_CHECK_STATE; F32 d66Pressure = getFilteredPressure( D66_PRES ); LVL_STATE_T bicarbChamberLevel = getBicarbChamberLevelStatus(); - +#ifdef __D65_OPENING_DISABLED__ // Close D65 irrespective of pressure for balancing chamber fresh side fill to complete. closeD65IfBalChamberSwitchImminent(); +#endif // Once upper level reached high , close the valve, timeout is for safety in case level sensor didn't work(10 sec), or else its a time based filling (3 sec) if ( ( LVL_STATE_HIGH == bicarbChamberLevel ) ||