Index: firmware/App/Modes/ModeFill.c =================================================================== diff -u -r17866369994bf90a993d850c951cfc4a05235b94 -r6f62e99f0beb50422927a666ce79ef517dc19e7e --- firmware/App/Modes/ModeFill.c (.../ModeFill.c) (revision 17866369994bf90a993d850c951cfc4a05235b94) +++ firmware/App/Modes/ModeFill.c (.../ModeFill.c) (revision 6f62e99f0beb50422927a666ce79ef517dc19e7e) @@ -624,7 +624,7 @@ #endif // Do the necessary setup here before transition to Produce Dialysate State fillStatus.isThisFirstFill = FALSE; - requestConcentratePumpOff( CONCENTRATEPUMPS_CP1_ACID ); + //requestConcentratePumpOff( CONCENTRATEPUMPS_CP1_ACID ); // TODO why do we turn this off if we need this immediately? setROPumpTargetFlowRateLPM( getTargetFillFlowRateLPM(), TARGET_RO_PRESSURE_PSI ); result = DG_FILL_MODE_STATE_PRODUCE_DIALYSATE; @@ -658,6 +658,7 @@ // Prime mixing before deliver result to reservoir handleDialysateMixing( measuredROFlowRateMLPM ); #ifndef DISABLE_MIXING + // TODO do we need these here? requestConcentratePumpOn( CONCENTRATEPUMPS_CP1_ACID ); requestConcentratePumpOn( CONCENTRATEPUMPS_CP2_BICARB ); @@ -669,11 +670,6 @@ result = DG_FILL_MODE_STATE_DELIVER_DIALYSATE; } - /*else - { - concentratePumpPrimeCount = 0; - }*/ // TODO what should we do with this else? Maybe it is not needed - return result; } @@ -695,7 +691,7 @@ F32 bicarbConductivity = getConductivityValue( CONDUCTIVITYSENSORS_CD2_SENSOR ); // Set concentrate pumps speed based on the RO pump flow rate - handleDialysateMixing( getMeasuredROFlowRateLPM() ); + handleDialysateMixing( getMeasuredROFlowRateLPM() * ML_PER_LITER ); totalROFlowRateMLPM += getMeasuredROFlowRateWithConcPumpsLPM() * ML_PER_LITER; integratedVolumeML = totalROFlowRateMLPM * FLOW_INTEGRATOR; @@ -720,7 +716,6 @@ F32 integratedVolumeToLoadCellReadingPercent = fabs( 1.0F - ( filledVolumeML / integratedVolumeML ) ); F32 avgAcidConductivity = acidConductivityTotal / conductivitySampleCount; F32 avgBicarbConductivity = bicarbConductivityTotal / conductivitySampleCount; - integratedVolumeML = 0.0; #ifndef DISABLE_FLOW_CHECK_IN_FILL if ( integratedVolumeToLoadCellReadingPercent > FLOW_INTEGRATED_VOLUME_CHECK_TOLERANCE ) // SRSDG 439