Index: firmware/App/Modes/ModeGenIdle.c =================================================================== diff -u -r7d0fd5ed6b9db0479af90477e5108f6d3fa8df17 -r75c1e08603496809a6554b7540c9b78a66cb3733 --- firmware/App/Modes/ModeGenIdle.c (.../ModeGenIdle.c) (revision 7d0fd5ed6b9db0479af90477e5108f6d3fa8df17) +++ firmware/App/Modes/ModeGenIdle.c (.../ModeGenIdle.c) (revision 75c1e08603496809a6554b7540c9b78a66cb3733) @@ -59,9 +59,6 @@ // NOTE: the bad fill state must be initialized here and not in the transition function since in case of a bad fill, the transition function is called // several times to drain and fill and handle a bad fill. static DG_GEN_IDLE_MODE_BAD_FILL_STATE_T badFillState = DG_HANDLE_BAD_FILL_STATE_START; ///< Initialize bad fill sub-state. -// NOTE: the empty bottle flag must be initialized here and not in transition function since this flag must be set to false once the empty bottle -// fill is finished. -static BOOL handleEmptyBottleFlag = FALSE; ///< Internal siganl flag to handle empty bottle flag. static U32 hdLostCommStartTime_ms; ///< Lost communication with HD start time in ms. static BOOL handleBadFillFlag; ///< Internal signal flag to handle bad fill. static OVERRIDE_U32_T genIdleDataPublicationInterval = { BAD_FILL_SUBSTATES_PUB_INTERVAL, @@ -267,8 +264,8 @@ * @brief * The handleIdleStartState function executes the start state of the * generation idle mode state machine. - * @details Inputs: handleEmptyBottleFlag - * @details Outputs: handleEmptyBottleFlag, handleBadFillFlag, badFillState + * @details Inputs: handleBadFillFlag + * @details Outputs: badFillState * @return the next state *************************************************************************/ static DG_GEN_IDLE_MODE_STATE_T handleIdleStartState( void ) @@ -283,14 +280,6 @@ { badFillState = DG_HANDLE_BAD_FILL_STATE_START; result = DG_GEN_IDLE_MODE_STATE_FLUSH_WATER; - - if ( ( TRUE == handleEmptyBottleFlag ) && ( DG_MODE_FILL == getPreviousOperationMode() ) ) - { - // If the previous mode was fill and the empty bottle flag was TRUE, set it to FALSE and clear the informative alarm - // Done with the empty bottle handling - handleEmptyBottleFlag = FALSE; - clearAlarmCondition( ALARM_ID_DG_CREATING_DIALYSATE_PLEASE_WAIT ); - } } return result; @@ -300,28 +289,14 @@ * @brief * The handleFlushWaterState function executes the flush water state * generation idle mode state machine. - * @details Inputs: handleEmptyBottleFlag - * @details Outputs: handleEmptyBottleFlag + * @details Inputs: none + * @details Outputs: none * @return the next state *************************************************************************/ static DG_GEN_IDLE_MODE_STATE_T handleFlushWaterState( void ) { DG_GEN_IDLE_MODE_STATE_T result = DG_GEN_IDLE_MODE_STATE_FLUSH_WATER; - if ( ( TRUE == isAlarmActive( ALARM_ID_DG_ACID_BOTTLE_LOW_VOLUME ) ) || ( TRUE == isAlarmActive( ALARM_ID_DG_BICARB_BOTTLE_LOW_VOLUME ) ) ) - { - // The empty bottle alarms are active set the empty bottle alarm to TRUE. - handleEmptyBottleFlag = TRUE; - } - - if ( ( TRUE == handleEmptyBottleFlag ) && - ( isAlarmActive( ALARM_ID_DG_ACID_BOTTLE_LOW_VOLUME ) != TRUE ) && - ( isAlarmActive( ALARM_ID_DG_BICARB_BOTTLE_LOW_VOLUME ) != TRUE ) ) - { - // User acknowledged empty conc bottle alarm(s) and so time to start a fill - startFillCmd( getTargetFillVolumeML(), getTargetFillFlowRateLPM() ); - } - return result; }