Index: firmware/App/Controllers/DialOutFlow.c =================================================================== diff -u -r97e1c0abbbf667f834d284eb6fc14999f073b020 -re283a8f2f25dea73d84f87ac346c23e7b3059531 --- firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision 97e1c0abbbf667f834d284eb6fc14999f073b020) +++ firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision e283a8f2f25dea73d84f87ac346c23e7b3059531) @@ -288,8 +288,10 @@ else { // if rate correction offset not yet set, set it based on target dialysate flow rate if ( fabs( dopRateCorrectionOffset ) < NEARLY_ZERO ) - { + { // set initial estimate for rate correction offset dopRateCorrectionOffset = (F32)getTargetDialInFlowRate() * DOP_RATE_CORRECTION_SCALAR + DOP_RATE_CORRECTION_OFFSET; + // adjust initial pwm duty cycle % per rate correction offset + pwmDC -= ( ( dopRateCorrectionOffset / RPM_2_ML_MIN_CONVERSION ) / DOP_100_PCT_PWM_RPM_RANGE ); } } // Don't interrupt pump control unless rate or mode is changing