Index: firmware/App/Modes/Prime.c =================================================================== diff -u -rf760ffc4b10556e5186e9ceb90294262063440ca -r2f4f66fcceb986cc592693b08f1b57767cb1c515 --- firmware/App/Modes/Prime.c (.../Prime.c) (revision f760ffc4b10556e5186e9ceb90294262063440ca) +++ firmware/App/Modes/Prime.c (.../Prime.c) (revision 2f4f66fcceb986cc592693b08f1b57767cb1c515) @@ -46,6 +46,7 @@ #define BLOOD_PUMP_FAST_FLOW_RATE_CIRC_BLOOD_CIRCUIT_ML_MIN 300 ///< Blood pump fast flow rate during prime recirculate blood circuit state. #define BLOOD_PUMP_FLOW_RATE_SALINE_DIALYZER_ML_MIN 300 ///< Blood pump flow rate during prime the saline dialyzer dialysate state. #define DIALYSATE_PUMP_PRIME_FLOW_RATE_ML_MIN 300 ///< Dialysate pump flow rate during priming fluid path. +#define DIALYSATE_PUMP_FAST_PRIME_FLOW_RATE_ML_MIN 600 ///< Dialysate pump flow rate during priming fluid path. #define DPO_PUMP_PRIME_FLOW_RATE_ML_MIN 225 ///< Dialysate outlet pump flow rate needed to match PWM with dialysate inlet pump @ 300 mL/min in open loop mode. #define DIALYSATE_DIALYZER_TUBE_VOLUME_ML 115 ///< This total tube volume is used to calculate the Dpi & Dpo time out in the dialysate dialyzer state. @@ -57,7 +58,7 @@ #define PURGE_AIR_TIME_OUT_COUNT ( 240 * MS_PER_SECOND ) ///< Time period count for purge air time out. #define PRIME_SALINE_DIALYZER_TIME_OUT_COUNT ( 60 * MS_PER_SECOND ) ///< Time period count for prime saline dialyzer time out. #define LOAD_CELL_STEADY_VOLUME_SAMPLING_TIME ( 1 * MS_PER_SECOND ) ///< Time load cell reading steady state detection sampling time in seconds. -#define PRIME_DIALYSATE_BYPASS_TIME_LIMIT ( 15 * MS_PER_SECOND ) ///< Time limit for priming dialysate bypass circuit. +#define PRIME_DIALYSATE_BYPASS_TIME_LIMIT ( 8 * MS_PER_SECOND ) ///< Time limit for priming dialysate bypass circuit. #define STEADY_VOLUME_COUNT_SEC ( 10000 / LOAD_CELL_STEADY_VOLUME_SAMPLING_TIME ) ///< Counter must be greater than 10 seconds before steady volume is true. #define STEADY_VOLUME_TIME_DEADLINE_MS ( 55 * MS_PER_SECOND ) ///< Time in msec for the steady volume deadline time out. @@ -695,7 +696,7 @@ if ( TRUE == getReservoirFillStatus( DG_RESERVOIR_1 ) ) { - if ( TRUE == hasDGCompletedReservoirSwitch() ) + if ( ( TRUE == hasDGCompletedReservoirSwitch() ) && ( DG_RESERVOIR_1 == getDGActiveReservoir() ) ) { U32 dialyzerDialysateVolume = getDialyzerDialysateVolume(); @@ -875,17 +876,10 @@ if ( TRUE == getReservoirFillStatus( DG_RESERVOIR_2 ) ) { - DG_SWITCH_RSRVRS_CMD_T rsrvrCmd; - - rsrvrCmd.reservoirID = (U32)DG_RESERVOIR_1; - rsrvrCmd.useLastTrimmerHeaterDC = FALSE; - - cmdSetDGActiveReservoir( &rsrvrCmd ); - - if ( TRUE == hasDGCompletedReservoirSwitch() ) + if ( ( TRUE == hasDGCompletedReservoirSwitch() ) && ( DG_RESERVOIR_2 == getDGActiveReservoir() ) ) { signalBloodPumpHardStop(); - setDialInPumpTargetFlowRate( DIALYSATE_PUMP_PRIME_FLOW_RATE_ML_MIN, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); + setDialInPumpTargetFlowRate( DIALYSATE_PUMP_FAST_PRIME_FLOW_RATE_ML_MIN, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); setValvePosition( VDI, VALVE_POSITION_C_CLOSE ); setValvePosition( VDO, VALVE_POSITION_C_CLOSE );