Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent drinks pouring a second time #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Danzibob
Copy link

@Danzibob Danzibob commented Jun 3, 2018

Fixes #1
In our (slightly modified) version of this code, we found that disabling interrupts as soon as the button was pressed would prevent the bartender pouring 2 drinks consecutively without being prompted. Tested fairly thoroughly with both physical and remote (SSH) triggers.

@Danzibob Danzibob mentioned this pull request Jun 3, 2018
@bjensen
Copy link

bjensen commented Jul 25, 2018

@Danzibob This PR (if its the same found in your DoubleDrinkFix branch), prevents the user from pouring three drinks in a row.

@atainter
Copy link
Contributor

You've verified that this works? I had a weird issue where the program would crash when I retried to re-enable interrupts. I didn't get around to debugging it.

@syntos
Copy link

syntos commented Aug 6, 2020

Hello,

I've modified my code:
def right_btn(self, ctx):
if not self.running:
self.stopInterrupts()
self.menuContext.select()
self.startInterrupts()

Now, drinks are not made twice and selecting drinks is working fine.
However, when I enter the configuration and select a pump with the select button the script crashes and I get this message returned:

Backend terminated or disconnected. Fatal Python error: Segmantation fault

Any idea what's happening here?
If I comment the stop and start interrupts I do not get these error but then my selected drink is made twice.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pours drinks 2 times
4 participants