Index: firmware/App/Controllers/Ultrafiltration.c =================================================================== diff -u -rd748813399d38ef5b71d760e327e368cc82d7a38 -rb689a4627e86e263cb69e83b91e80802bf411c92 --- firmware/App/Controllers/Ultrafiltration.c (.../Ultrafiltration.c) (revision d748813399d38ef5b71d760e327e368cc82d7a38) +++ firmware/App/Controllers/Ultrafiltration.c (.../Ultrafiltration.c) (revision b689a4627e86e263cb69e83b91e80802bf411c92) @@ -239,8 +239,8 @@ { if ( ( ++currentUFCompCounter >= UF_COMP_INTERVAL ) || ( TRUE == isUFRateUpdated ) ) { - F32 freshDensity = ( COMP_SLOPE * getD4AverageTemperature() ) + COMP_INTERCEPT; // Fresh side dialysate density - F32 spentDensity = ( COMP_SLOPE * getD50AverageTemperature() ) + COMP_INTERCEPT; // spent side dialysate density + F32 freshDensity = ( COMP_SLOPE * getFilteredTemperatureValue( D4_TEMP ) ) + COMP_INTERCEPT; // Fresh side dialysate density + F32 spentDensity = ( COMP_SLOPE * getFilteredTemperatureValue( D50_TEMP ) ) + COMP_INTERCEPT; // spent side dialysate density F32 compFreshFlowrate = getTDDialysateFlowrate() * freshDensity; // Qd * fresh density F32 compSpentFlowrate = getTDDialysateFlowrate() * spentDensity; // Qd * spent density F32 balancingError = compFreshFlowrate - compSpentFlowrate; // Error in g/min