diff --git a/NanoJ-Fluidics.jar b/NanoJ-Fluidics.jar index 491ed37..e6a8665 100644 Binary files a/NanoJ-Fluidics.jar and b/NanoJ-Fluidics.jar differ diff --git a/NanoJ-Fluidics_IJ.jar b/NanoJ-Fluidics_IJ.jar index 3d6abfc..de6cd4b 100644 Binary files a/NanoJ-Fluidics_IJ.jar and b/NanoJ-Fluidics_IJ.jar differ diff --git a/NanoJ-Fluidics_MM.jar b/NanoJ-Fluidics_MM.jar index 7a25d58..b2f3b76 100644 Binary files a/NanoJ-Fluidics_MM.jar and b/NanoJ-Fluidics_MM.jar differ diff --git a/PackagedBinaries/NanoJ-Fluidics.zip b/PackagedBinaries/NanoJ-Fluidics.zip index 0740f78..589d282 100644 Binary files a/PackagedBinaries/NanoJ-Fluidics.zip and b/PackagedBinaries/NanoJ-Fluidics.zip differ diff --git a/PackagedBinaries/NanoJ-Fluidics_IJ.zip b/PackagedBinaries/NanoJ-Fluidics_IJ.zip index edc8b51..30817d3 100644 Binary files a/PackagedBinaries/NanoJ-Fluidics_IJ.zip and b/PackagedBinaries/NanoJ-Fluidics_IJ.zip differ diff --git a/PackagedBinaries/NanoJ-Fluidics_MM.zip b/PackagedBinaries/NanoJ-Fluidics_MM.zip index 6140970..faf2a1a 100644 Binary files a/PackagedBinaries/NanoJ-Fluidics_MM.zip and b/PackagedBinaries/NanoJ-Fluidics_MM.zip differ diff --git a/src/nanoj/pumpControl/java/sequentialProtocol/SequenceManager.java b/src/nanoj/pumpControl/java/sequentialProtocol/SequenceManager.java index 19e3630..8be9af1 100644 --- a/src/nanoj/pumpControl/java/sequentialProtocol/SequenceManager.java +++ b/src/nanoj/pumpControl/java/sequentialProtocol/SequenceManager.java @@ -40,7 +40,7 @@ private SequenceManager() { } public void run(){ while (alive) { if (started) { - for (currentStep = startStep; currentStep < endStep+1; currentStep++) { + for (currentStep = startStep; currentStep < endStep; currentStep++) { if (!started) break; Step step = sequence.get(currentStep); @@ -105,14 +105,16 @@ else if (timeToGo >= 60) setWaitingMessage("Withdrawal step. Waiting for: " // If this isn't the last step, then set the "syringe ready" status to false. This makes // the sequence wait until the user has confirmed the syringe exchange. - if (currentStep != endStep) setMonkeyReady(false); + if (currentStep < endStep) setMonkeyReady(false); // If it IS the last step, then we can stop now. else { stop(); + setWaitingMessage("Sequence finished."); break; } - syringeExchangeNeeded = sequence.get(currentStep+1).isSyringeExchangeRequired(); + if (currentStep < endStep-1) + syringeExchangeNeeded = sequence.get(currentStep+1).isSyringeExchangeRequired(); setChanged(); notifyObservers(SYRINGE_STATUS_CHANGED); @@ -146,6 +148,8 @@ else if (timeToGo >= 60) setWaitingMessage("Step: " + step.getNumber() + ", " } } currentStep = -1; + endStep = 0; + started = false; setChanged(); notifyObservers(SEQUENCE_FINISHED); }