-
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
New option for Waveshare 2.13 (D) display #44
Conversation
What's missing here for this to get merged? |
BUG: Replace displayPartial call, because it doesn't work. BUG: Replace displayPartBaseImage call, because it crashes, it doesn't exist in the driver
Some texts on the screens were not finally positioned. This is done, now. |
@@ -135,6 +134,15 @@ def create_config(config_file=None): | |||
logger.warning("Waveshare display library not installed.") | |||
sys.exit("Exiting...") | |||
|
|||
# Display - Waveshare 2.13 (D) is 212 * 104 pixels | |||
if "waveshare2in13d" in conf["atm"]["display"]: |
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.
These options are mutually exclusive. I'm not sure how to install the library (maybe i did that wrong) but why not using elif
constructs? This fixed my issue.
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.
That's correct. I took the normal if so as not to touch the papirus block. If the correct display is choose in the config.ini, there are no problems either.
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.
We can make the change with a separate PR
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.
I'm not sure i understand the approach. Why don't you want to touch the papirus block? This is a configuration procedure and there is some kind of fallback-mode via "waveshare" (as it's not 100% specified). However, that works with elif as well and these values are mutually exclusive. Using "if", not elif, makes it error-prone: I had issues with the normal if-block. Maybe i missed the point somewhere: Where is the description of the installation of the waveshare-library? Maybe i did that wrong.
But that should not prevent doing elifs?!
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.
If you look at the existing PRs, you will see the touch of the papirus block will results in additional merge conflicts. I would therefore prefer to have a new PR with the elif. Then we can choose the time when we approve the adjustment. I have no problems using the normal if.
Ok, so yesterday i could prove that it's working in "hat-mode". When i started the After solving the elif-issue, i think this is ready to merge, but what do i know. |
It's really strange. |
Based on the implementation of waveshare2in13, the unsupported commands FULL_UPDATE and PART_UPDATE have been eliminated. Furthermore, the alignment of the messages has been adjusted.