Index: firmware/App/Services/Reservoirs.c =================================================================== diff -u -r24e3289cc7a1ed28ec73a1ecb78c8ce7901a3abc -r5013db4cabc632d52a308455396c6cd4017c885a --- firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 24e3289cc7a1ed28ec73a1ecb78c8ce7901a3abc) +++ firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 5013db4cabc632d52a308455396c6cd4017c885a) @@ -511,7 +511,7 @@ // If the wait time has elapsed, trigger a fill command // TODO uncomment - //if ( timeWaitToFillMS <= 0 ) + if ( timeWaitToFillMS <= 0 ) // TODO uncomment { cmdStartDGFill( FILL_RESERVOIR_TO_VOLUME_ML, targetFillFlowRateLPM ); @@ -582,12 +582,12 @@ TREATMENT_RESERVOIR_MGMT_STATE_T state = TREATMENT_RESERVOIR_MGMT_WAIT_FOR_FILL_SETTLE_STATE; // Wait for the reservoir to settle and then send the commands to switch the active reservoir - if ( ( TRUE == didTimeout( reservoirSwitchStartTimeMS, RESERVOIR_SETTLE_TIME_MS ) ) /*&& ( volSpentML >= (F32)FILL_RESERVOIR_TO_VOLUME_ML )*/ ) + if ( ( TRUE == didTimeout( reservoirSwitchStartTimeMS, RESERVOIR_SETTLE_TIME_MS ) ) && ( volSpentML >= (F32)FILL_RESERVOIR_TO_VOLUME_ML ) ) { DG_RESERVOIR_ID_T inactiveRes = getDGInactiveReservoir(); // TODO test code remove - if ( TRUE == test ) + //if ( TRUE == test ) { // Signal dialysis sub-mode to capture baseline volume for next reservoir. setStartReservoirVolume( inactiveRes ); @@ -609,9 +609,9 @@ reservoirSwitchStartTimeMS = getMSTimerCount(); // TODO test code - //state = TREATMENT_RESERVOIR_MGMT_WAIT_FOR_SWITCH_SETTLE_STATE; + state = TREATMENT_RESERVOIR_MGMT_WAIT_FOR_SWITCH_SETTLE_STATE; // For reservoir test, it should go back to start state - state = TREATMENT_RESERVOIR_MGMT_START_STATE; + //state = TREATMENT_RESERVOIR_MGMT_START_STATE; // TODO test code }