Index: firmware/App/Controllers/DialysateFlow.c =================================================================== diff -u -rbc723b0888b4efa79a0615fe31a62adf00a00ff1 -rfea68bfb5166d12aa6e2b229872d01fbad5a8eae --- firmware/App/Controllers/DialysateFlow.c (.../DialysateFlow.c) (revision bc723b0888b4efa79a0615fe31a62adf00a00ff1) +++ firmware/App/Controllers/DialysateFlow.c (.../DialysateFlow.c) (revision fea68bfb5166d12aa6e2b229872d01fbad5a8eae) @@ -117,6 +117,8 @@ void execDialysateFlowMeterMonitor( void ) { U16 dialysateFlowReading = getFPGADialysateFlowRate(); + F32 currentFlow; + BOOL isFlowOutOfUpperRange; // Update sum for flow average calculation measuredFlowReadingsSum += (S32)dialysateFlowReading; @@ -150,8 +152,8 @@ flowFilterCounter = 0; } - F32 const currentFlow = getMeasuredDialysateFlowRate(); - BOOL const isFlowOutOfUpperRange = currentFlow > MAX_DIALYSATE_FLOWRATE_LPM; + currentFlow = getMeasuredDialysateFlowRate(); + isFlowOutOfUpperRange = currentFlow > MAX_DIALYSATE_FLOWRATE_LPM; checkPersistentAlarm( ALARM_ID_DIALYSATE_FLOW_RATE_OUT_OF_RANGE, isFlowOutOfUpperRange, currentFlow, MAX_DIALYSATE_FLOWRATE_LPM ); // Publish dialysate flow meter data on the CAN bus according to the specified interval