Skip to content

Commit

Permalink
Fixing serious bug from previous commits
Browse files Browse the repository at this point in the history
  • Loading branch information
palmada committed Oct 9, 2018
1 parent 9497f5d commit f5c6fbc
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 3 deletions.
Binary file modified NanoJ-Fluidics.jar
Binary file not shown.
Binary file modified NanoJ-Fluidics_IJ.jar
Binary file not shown.
Binary file modified NanoJ-Fluidics_MM.jar
Binary file not shown.
Binary file modified PackagedBinaries/NanoJ-Fluidics.zip
Binary file not shown.
Binary file modified PackagedBinaries/NanoJ-Fluidics_IJ.zip
Binary file not shown.
Binary file modified PackagedBinaries/NanoJ-Fluidics_MM.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -146,6 +148,8 @@ else if (timeToGo >= 60) setWaitingMessage("Step: " + step.getNumber() + ", "
}
}
currentStep = -1;
endStep = 0;
started = false;
setChanged();
notifyObservers(SEQUENCE_FINISHED);
}
Expand Down

0 comments on commit f5c6fbc

Please sign in to comment.