-
Notifications
You must be signed in to change notification settings - Fork 85
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
Makes the camera function optional #66
Makes the camera function optional #66
Conversation
Its better to have nothing there. So there comes the message "No display configuration matched. Exiting..." after first call of app.py. Its better then to have a fault message like "OSError: [Errno 121] Remote I/O error"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good for me. Tested it several times.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for this PR!
Boolean true or false is more common for switch on or off a var (camera).
app.py
Outdated
# 2. Offer to cancel and switch to normal scan | ||
# 3. Process payment | ||
if activewallet == "lntxbot": | ||
if activewallet == "lntxbot" and camera == "yes": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boolean true or false is more common
I've just made a small change for the boolean flag camera. |
This PR expands the config.ini by asking whether a camera is available and by asking which language you want to use. Only the part with the camera is active here. The language part follows in a subsequent PR.
The function is that you can specify whether a camera is available or not. It is disabled by default as most will have the pocket version. Now that we know that there is no camera, we can also skip or disable functions that only make sense when the camera is active. For example, the page with the query whether LNURL is possible. If not, then the camera has been activated. This site is useless for people without a camera and without a button. So we can skip the function right now and people don't have to laboriously edit this page call in the app.py code anymore.
The next point is the function that is called when the button is pressed 5 times. All wallet data is currently being deleted and there is the option of rescanning the data. But if I don't have a camera, only my data is erased and I have to laboriously re-enter it by hand. That's why we can block this function in the future if you don't have a camera.