Index: firmware/App/Modes/Dialysis.c =================================================================== diff -u -r572184131cb35ff2aef895797e9f88336225ec6a -r425d3c149af076abde57f7da165df15e304b767b --- firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision 572184131cb35ff2aef895797e9f88336225ec6a) +++ firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision 425d3c149af076abde57f7da165df15e304b767b) @@ -116,7 +116,7 @@ static U32 dialyzerReprimeIntervalTimerCtr; ///< Timer counter to determine when the dialyzer reprime should be done. static BOOL dialyzerReprimeInProgress; ///< Flag indicates whether the dialyzer reprime has been interrupted. static BOOL dialyzerReprimeFinalReprimeFinished; ///< Flag indicates whether the final dialyzer reprime has completed. -static U32 dialyzerReprimeStateTimer; ///< General state timer for delays in dialyzer reprime functions. +static U32 dialyzerReprimeStateTimer; ///< General state timer for tracking duration of dialyzer reprime states. #endif // ********** private function prototypes ********** @@ -127,7 +127,6 @@ static DIALYSIS_STATE_T handleDialysisDialyzerReprimeState( void ); #endif -static UF_STATE_T handleUFStartState( DIALYSIS_STATE_T *dialysisState ); static UF_STATE_T handleUFPausedState( DIALYSIS_STATE_T *dialysisState ); static UF_STATE_T handleUFRunningState( DIALYSIS_STATE_T *dialysisState ); Index: firmware/App/Services/Reservoirs.c =================================================================== diff -u -r0035cfb9a3fa89a8f9c3e0b589a327ed9c1d9470 -r425d3c149af076abde57f7da165df15e304b767b --- firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 0035cfb9a3fa89a8f9c3e0b589a327ed9c1d9470) +++ firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 425d3c149af076abde57f7da165df15e304b767b) @@ -181,12 +181,15 @@ // Calculate volume used from active reservoir - do not accumulate if not performing dialysis or saline bolus is in progress if ( ( TREATMENT_DIALYSIS_STATE == getTreatmentState() ) && ( getDialysisState() != DIALYSIS_SALINE_BOLUS_STATE ) ) { - volSpentML += ( flowRateMLPerMS * msSinceLastVolumeCalc ); - - if ( TREATMENT_DIALYSIS_STATE == getTreatmentState()) +#ifdef DIALYZER_REPRIME_ENABLED + if ( getDialysaisState() != DIALYSIS_DIALYZER_REPRIME_STATE ) { - ++timeReservoirInUse; +#endif + volSpentML += ( flowRateMLPerMS * msSinceLastVolumeCalc ); + timeReservoirInUse++; +#ifdef DIALYZER_REPRIME_ENABLED } +#endif } // Update the reservoir start time