From 89d92ca562bd11e284b740d8a227fe6240b772f6 Mon Sep 17 00:00:00 2001 From: Danzibob Date: Sun, 3 Jun 2018 19:18:25 +0100 Subject: [PATCH 1/2] Prevent interrupts while drink is being poured --- bartender.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bartender.py b/bartender.py index 56de81d..7d7f935 100644 --- a/bartender.py +++ b/bartender.py @@ -332,7 +332,9 @@ def left_btn(self, ctx): def right_btn(self, ctx): if not self.running: + self.stopInterrupts() self.menuContext.select() + self.startInterrupts() def updateProgressBar(self, percent, x=15, y=15): height = 10 From dad2d22e9c93371ac3a7f858d41e3936940722d3 Mon Sep 17 00:00:00 2001 From: Danny Roberts Date: Sun, 3 Jun 2018 19:25:28 +0100 Subject: [PATCH 2/2] Move all interrupt settings into if statement Because neater and I guess more efficient --- bartender.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bartender.py b/bartender.py index 7d7f935..52bc79e 100644 --- a/bartender.py +++ b/bartender.py @@ -334,7 +334,7 @@ def right_btn(self, ctx): if not self.running: self.stopInterrupts() self.menuContext.select() - self.startInterrupts() + self.startInterrupts() def updateProgressBar(self, percent, x=15, y=15): height = 10