Skip to content

Commit

Permalink
Fixed a bug where valves couldn't be interrupted while producing a co…
Browse files Browse the repository at this point in the history
…cktail
  • Loading branch information
alex9849 committed Jan 11, 2025
1 parent 8b741f9 commit 90d3b63
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ public synchronized void start() {
driver.setOpen(true);
while (currentGrams < initialReadGrams + goalGrams) {
currentGrams = hx711.read_once();
if(Thread.interrupted()) {
throw new InterruptedException();
}
}
valveEndTime = System.currentTimeMillis();
driver.setOpen(false);
Expand Down

0 comments on commit 90d3b63

Please sign in to comment.