Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -ra4669c80291e85fa5ce17d77ebcfd0c882831202 -r98a1a2a624373a1d140daed0136522ab6e635237 --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision a4669c80291e85fa5ce17d77ebcfd0c882831202) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 98a1a2a624373a1d140daed0136522ab6e635237) @@ -182,29 +182,35 @@ // if HD requests water sample, go to water sample state else if ( TRUE == flushFilterRequest ) { - flushFilterRequest = FALSE; + flushFilterRequest = FALSE; filterFlushStartTime = getMSTimerCount(); + setValveState( VPI, VALVE_STATE_OPEN ); + state = DG_STANDBY_MODE_STATE_FLUSH_FILTER; } else if ( TRUE == pendingStartDGRequest ) { pendingStartDGRequest = FALSE; + requestNewOperationMode( DG_MODE_GENE ); } else if ( TRUE == pendingStartDGFlushRequest ) { pendingStartDGFlushRequest = FALSE; + requestNewOperationMode( DG_MODE_FLUS ); } else if ( TRUE == pendingStartDGHeatDisinfectRequest ) { pendingStartDGHeatDisinfectRequest = FALSE; + requestNewOperationMode( DG_MODE_HEAT ); } else if ( TRUE == pendingStartDGChemicalDisinfectRequest ) { pendingStartDGChemicalDisinfectRequest = FALSE; + requestNewOperationMode( DG_MODE_CHEM ); } @@ -382,8 +388,11 @@ if ( DG_STANDBY_MODE_STATE_IDLE == standbyState ) { - result = TRUE; + result = TRUE; pendingStartDGRequest = TRUE; + + // Reset the volume accumulator for the next run + resetROGenerateVolumeL(); } return result; @@ -401,9 +410,10 @@ BOOL result = FALSE; // If DG is in standby mode or in the solo mode and the standby mode is in Idle state, request DG flush - if ( ( DG_MODE_STAN == getCurrentOperationMode() && DG_STANDBY_MODE_STATE_IDLE == standbyState ) || ( DG_MODE_SOLO == getCurrentOperationMode() ) ) + if ( ( DG_MODE_STAN == getCurrentOperationMode() ) && ( DG_STANDBY_MODE_STATE_IDLE == standbyState ) || ( DG_MODE_SOLO == getCurrentOperationMode() ) ) { DG_CMD_RESPONSE_T cmdResponse; + OPN_CLS_STATE_T concCap = getSwitchStatus( CONCENTRATE_CAP ); OPN_CLS_STATE_T diaCap = getSwitchStatus( DIALYSATE_CAP ); cmdResponse.commandID = DG_CMD_START_FLUSH;