Index: firmware/App/Services/Reservoirs.c =================================================================== diff -u -r154ef0b4be3ccb88a3780d5ded9befc87fb44367 -r11c4c22fd07359724a2b2e5633e9d795b913c0b0 --- firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 154ef0b4be3ccb88a3780d5ded9befc87fb44367) +++ firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 11c4c22fd07359724a2b2e5633e9d795b913c0b0) @@ -193,6 +193,9 @@ { volSpentML += ( flowRateMLPerMS * msSinceLastVolumeCalc ); + // Check the recirculation level + recirculationLevelPct = volSpentML / (F32)FILL_RESERVOIR_TO_VOLUME_ML; + if ( TREATMENT_DIALYSIS_STATE == getTreatmentState()) { ++timeReservoirInUse; @@ -460,7 +463,7 @@ data.recircLevelPct = recirculationLevelPct * 100; data.timeDepletionMS = timeDepleteMS; data.timeWaitFillMS = timeWaitToFillMS; - data.tempRemoveTragetFillFlow = targetFillFlowLPM; + data.tempRemoveTargetFillFlow = targetFillFlowLPM; broadcastData( MSG_ID_HD_RESERVOIRS_DATA, COMM_BUFFER_OUT_CAN_HD_BROADCAST, (U08*)&data, sizeof( RESERVOIRS_MANAGEMENT_DATA_T ) ); @@ -616,9 +619,6 @@ { TREATMENT_RESERVOIR_MGMT_STATE_T state = TREATMENT_RESERVOIR_MGMT_FILL_RESERVOIR_STATE; - // Check the recirculation level - recirculationLevelPct = volSpentML / (F32)FILL_RESERVOIR_TO_VOLUME_ML; - // If the recirculation level has exceeded the max allowed, raise the alarm to stop using the active reservoir as it has been // diluted to much if ( recirculationLevelPct >= getReservoirRecirculationMaxPercent() )