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

Update of the button functionality and extended by an LED button documentation #61

Merged
merged 16 commits into from
Mar 14, 2022
Merged

Update of the button functionality and extended by an LED button documentation #61

merged 16 commits into from
Mar 14, 2022

Conversation

AxelHamburch
Copy link
Contributor

The following changes are made in this pull request:

  1. Bug Fix 1: The "No coins added! Please add coins first" was invoked on a key press and then invoked alternately with the start screen without stopping. With this fix, the page is only called once.
  2. Bug Fix 2: The "GPIO.add_event_detect" function is used for the GPIO.BCM input 5 and 6. These processes then run in the background parallel to the main program. These processes must also be stopped again if the program is ended with "except KeyboardInterrupt" , otherwise there will be overlaps and the bouncing phenomenon during a soft start.
  3. Changed the order of button actions so that the severity of the action is increasing. The "wallet reset" is fatal and comes at the very end.
  4. A few "print" and "logger.info" optimized.
  5. If FIAT was paid in, the button may only have one function => "Start withdrawal". It doesn't matter how many times the key was pressed in a row.
  6. Added documentation for the LED button
  7. Added test routine for button and LED

Bug Fix 1: The "No coins added! Please add coins first" was invoked on a key press and then invoked alternately with the start screen without stopping. With this fix, the page is only called once.
Bug Fix 2: The "GPIO.add_event_detect" function is used for the GPIO.BCM input 5 and 6. These processes then run in the background parallel to the main program. These processes must also be stopped again if the program is ended with "except KeyboardInterrupt" , otherwise there will be overlaps and the bouncing phenomenon during a soft start.
Changed the order of button actions so that the severity of the action is increasing. The "wallet reset" is fatal and comes at the very end.

1 : Shows screen: "No coins added! Please add coins first"
3 : Simulates adding a coin (2 coin pulses, only for testing)
5 : Shutdown the host machine
7 : Reset Wallet (!!!) an scan new wallet credentials with camera
If FIAT was paid in, the button may only have one function => "Start withdrawal prozess". It doesn't matter how many times the key was pressed in a row.
Update logger.info("Restriction for the button => Set pulses = 1")
Documentation for the button
@lightisfaster lightisfaster merged commit 21401ea into 21isenough:master Mar 14, 2022
@AxelHamburch AxelHamburch deleted the update_button_functions branch March 15, 2022 15:00
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.

2 participants