Index: firmware/App/Modes/ModeFill.c =================================================================== diff -u -r7f64bdbf118609be8afc6fc7a3bd0ffe0cc2791a -r5bf4b576af4ba9df3acc48c06a1169bc63a3577e --- firmware/App/Modes/ModeFill.c (.../ModeFill.c) (revision 7f64bdbf118609be8afc6fc7a3bd0ffe0cc2791a) +++ firmware/App/Modes/ModeFill.c (.../ModeFill.c) (revision 5bf4b576af4ba9df3acc48c06a1169bc63a3577e) @@ -146,6 +146,7 @@ static U32 pumpSpeedIndex; ///< Index used to access the desired pump speed in roPumpFlushBubblesSpeed table. static BOOL havePauseActuatorsBeenSet; ///< Flag to indicate the actuators have been set to pause for the first time. +static BOOL didFillRecoverFromPause; ///< Flag to indicate whether the previous state was pause or not. static FILL_ACID_BICARB_TYPES_T chemicalsTypes; ///< Chemicals Types (acid and bicarb). static DG_CHEMICALS_FILL_COND_CAL_RECORD_T chemicalsCond; ///< Chemicals fill conductivity records. static F32 acidMixRatio; ///< Acid conductivity mix ratio. @@ -218,6 +219,7 @@ sumFillCPoConductivity = 0.0F; sumFillRejRatio = 0.0F; fillCPoConductivitySampleCnt = 0; + didFillRecoverFromPause = FALSE; } /*********************************************************************//** @@ -967,7 +969,7 @@ * The handlePausedState function executes the paused state of the fill * mode state machine. * @details Inputs: havePauseActuatorsBeenSet - * @details Outputs: havePauseActuatorsBeenSet + * @details Outputs: havePauseActuatorsBeenSet, didFillRecoverFromPause * @return the next state *************************************************************************/ static DG_FILL_MODE_STATE_T handlePausedState( void ) @@ -978,6 +980,7 @@ if ( ( FALSE == areInletWaterConditionsAlarmsActive() ) && ( FALSE == areConductivityAlarmsActive() ) ) { + didFillRecoverFromPause = TRUE; havePauseActuatorsBeenSet = FALSE; result = DG_FILL_MODE_STATE_TEST_INLET_WATER; } @@ -989,11 +992,12 @@ * @brief * The setModeFillStateTransition function sets the actuators and variables * for the state transition in mode fill. - * @details Inputs: pumpSpeedIndex, havePauseActuatorsBeenSet + * @details Inputs: pumpSpeedIndex, havePauseActuatorsBeenSet, + * didFillRecoverFromPause * @details Outputs: concPumpPrimeStartTimeMS, fillStatus, pumpSpeedIndex, * concentratePrimingStartTime, totalBicarbConductivity, averageBicarbConductivity, * bicarbConductivitySampleCount, concentrateTestStartTime, fillStatus, - * havePauseActuatorsBeenSet, flushBubblesStartTime + * havePauseActuatorsBeenSet, flushBubblesStartTime, didFillRecoverFromPause * @param state mode fill state enum * @return none *************************************************************************/ @@ -1067,7 +1071,11 @@ case DG_FILL_MODE_STATE_DELIVER_DIALYSATE: setValveState( VPO, VALVE_STATE_FILL_C_TO_NC ); - dialysateFillStartTimeMS = getMSTimerCount(); + if ( didFillRecoverFromPause != TRUE ) + { + dialysateFillStartTimeMS = getMSTimerCount(); + } + didFillRecoverFromPause = FALSE; fillStatus.isThisFirstFill = FALSE; break;