Index: firmware/App/Modes/ModeFill.c =================================================================== diff -u -r2c237242d3dfc0d4e952f0cc2ebd8e6d6a826243 -rbcd5068a8afd80703b3dbeb450623641afe7fe7f --- firmware/App/Modes/ModeFill.c (.../ModeFill.c) (revision 2c237242d3dfc0d4e952f0cc2ebd8e6d6a826243) +++ firmware/App/Modes/ModeFill.c (.../ModeFill.c) (revision bcd5068a8afd80703b3dbeb450623641afe7fe7f) @@ -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,13 @@ * @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, didFMPCheckStart + * havePauseActuatorsBeenSet, flushBubblesStartTime, didFMPCheckStart, + * didFillRecoverFromPause * @param state mode fill state enum * @return none *************************************************************************/ @@ -1067,8 +1072,11 @@ case DG_FILL_MODE_STATE_DELIVER_DIALYSATE: setValveState( VPO, VALVE_STATE_FILL_C_TO_NC ); - didFMPCheckStart = FALSE; - dialysateFillStartTimeMS = getMSTimerCount(); + if ( didFillRecoverFromPause != TRUE ) + { + dialysateFillStartTimeMS = getMSTimerCount(); + } + didFillRecoverFromPause = FALSE; fillStatus.isThisFirstFill = FALSE; break;