Index: firmware/App/Modes/ModePreTreat.c =================================================================== diff -u -r4068c609827d855903b352c399b204bbb17ae12f -reca2f2bf62570bb920d0890b7fc53e9d0ccfed9d --- firmware/App/Modes/ModePreTreat.c (.../ModePreTreat.c) (revision 4068c609827d855903b352c399b204bbb17ae12f) +++ firmware/App/Modes/ModePreTreat.c (.../ModePreTreat.c) (revision eca2f2bf62570bb920d0890b7fc53e9d0ccfed9d) @@ -1084,26 +1084,27 @@ DG_OP_MODE_T dgOpMode = getDGOpMode(); U32 dgSubMode = getDGSubMode(); U32 volume = 0; - DG_RESERVOIR_ID_T activeReservoir = getDGActiveReservoir(); + DG_RESERVOIR_ID_T inactiveReservoir = getDGInactiveReservoir(); if ( ( DG_MODE_GENE == dgOpMode ) && ( DG_GEN_IDLE_MODE_STATE_FLUSH_WATER == dgSubMode ) ) { // Drain both reservoirs and return to active res 2 before initial fills - if ( reservoirStatus[ activeReservoir ].initialDrain != TRUE ) + if ( reservoirStatus[ inactiveReservoir ].initialDrain != TRUE ) { - reservoirStatus[ activeReservoir ].initialDrain = TRUE; + reservoirStatus[ inactiveReservoir ].initialDrain = TRUE; state = PRE_TREATMENT_RESERVOIR_MGMT_REQUEST_RESERVOIR_SWITCH_STATE; } // Once both reservoirs drained and returned to active res 2, wait for pre-tx workflow // to get to point where fills are allowed, before starting fill // not flushed and need to fill -OR- // flushed and need to fill after entering dry self test state - else if ( ( TRUE == reservoirStatus[ activeReservoir ].startFlushFill ) || - ( ( TRUE == reservoirStatus[ activeReservoir ].startNormalFill ) && + else if ( ( TRUE == reservoirStatus[ inactiveReservoir ].startFlushFill ) || + ( ( TRUE == reservoirStatus[ inactiveReservoir ].startNormalFill ) && ( currentPreTreatmentState >= HD_PRE_TREATMENT_SELF_TEST_DRY_STATE ) ) ) { - volume = getPreTreatmentFillVolume( activeReservoir ); + volume = getPreTreatmentFillVolume( inactiveReservoir ); + cmdStartDGFill( volume, DEFAULT_TARGET_FILL_FLOW_RATE_LPM ); state = PRE_TREATMENT_RESERVOIR_MGMT_FILL_CMD_RESP_STATE; }