Index: firmware/App/Modes/ModeFill.c =================================================================== diff -u -rac029c36127b916d68c0039a470c3e4c68879adf -rdc0a9dbc2ffb049f4d38ffece9df909e2cf2511a --- firmware/App/Modes/ModeFill.c (.../ModeFill.c) (revision ac029c36127b916d68c0039a470c3e4c68879adf) +++ firmware/App/Modes/ModeFill.c (.../ModeFill.c) (revision dc0a9dbc2ffb049f4d38ffece9df909e2cf2511a) @@ -617,42 +617,44 @@ { DG_FILL_MODE_STATE_T result = DG_FILL_MODE_STATE_TEST_INLET_WATER; - // If this is the first fill of a treatment, prime acid and bicarb lines, otherwise transition - // to dialysate production directly - if ( TRUE == isThisTheFirstFill() ) + if ( ( TRUE == getConcPumpIsParked( CONCENTRATEPUMPS_CP1_ACID ) ) && ( TRUE == getConcPumpIsParked( CONCENTRATEPUMPS_CP2_BICARB ) ) ) { - resetChemicalUsedVolumeML( BICARB ); - resetChemicalUsedVolumeML( ACID ); - result = DG_FILL_MODE_STATE_PRIME_CONCENTRATE_LINES; - } - else - { - result = DG_FILL_MODE_STATE_PRODUCE_DIALYSATE; - } + // If this is the first fill of a treatment, prime acid and bicarb lines, otherwise transition + // to dialysate production directly + if ( TRUE == isThisTheFirstFill() ) + { + resetChemicalUsedVolumeML( BICARB ); + resetChemicalUsedVolumeML( ACID ); + result = DG_FILL_MODE_STATE_PRIME_CONCENTRATE_LINES; + } + else + { + result = DG_FILL_MODE_STATE_PRODUCE_DIALYSATE; + } - if ( TRUE == isTestingActivated() ) - { - switch ( dialinFillForCalCheck ) + if ( TRUE == isTestingActivated() ) { - case DIALIN_FILL_FOR_CAL_PRIME: - result = DG_FILL_MODE_STATE_PRIME_CONCENTRATE_LINES; - break; + switch ( dialinFillForCalCheck ) + { + case DIALIN_FILL_FOR_CAL_PRIME: + result = DG_FILL_MODE_STATE_PRIME_CONCENTRATE_LINES; + break; - case DIALIN_FILL_FOR_CAL_BICARB_CHECK: - result = DG_FILL_MODE_STATE_TEST_BICARB_CONDUCTIVITY; - break; + case DIALIN_FILL_FOR_CAL_BICARB_CHECK: + result = DG_FILL_MODE_STATE_TEST_BICARB_CONDUCTIVITY; + break; - case DIALIN_FILL_FOR_CAL_ACID_CHECK: - result = DG_FILL_MODE_STATE_TEST_ACID_CONDUCTIVITY; - break; + case DIALIN_FILL_FOR_CAL_ACID_CHECK: + result = DG_FILL_MODE_STATE_TEST_ACID_CONDUCTIVITY; + break; - default: - // Do nothing. This means there is not a request for the fill calibration check so proceed with the normal operations. - break; + default: + // Do nothing. This means there is not a request for the fill calibration check so proceed with the normal operations. + break; + } } + setModeFillStateTransition( result ); } - setModeFillStateTransition( result ); - return result; }