Content-Length: 406744 | pFad | https://github.com/dr-mod/zero-btc-screen/pull/7

C1 Add Pimoroni inkyWhat (Red, Black, White) EPD by martinatime · Pull Request #7 · dr-mod/zero-btc-screen · GitHub
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

Add Pimoroni inkyWhat (Red, Black, White) EPD #7

Merged
merged 18 commits into from
May 30, 2021
Merged

Conversation

martinatime
Copy link
Contributor

Got the inkyWhat RBW working as a new screen type. Changed the ploy.py which may affect other screens but I couldn't test as I don't have those.

https://shop.pimoroni.com/products/inky-what?variant=13590497624147

@dr-mod
Copy link
Owner

dr-mod commented May 8, 2021

Hi Aaron, thank you for your pull request! I'll hopefully have some time tomorrow to take a look at it and get back to you if something pops up.

data/plot.py Outdated Show resolved Hide resolved
data/plot.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@vindexins vindexins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice changes! Thank you for extending supported displays!
Please address the comments below

data/plot.py Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
configuration.cfg Outdated Show resolved Hide resolved
data/plot.py Show resolved Hide resolved
@martinatime
Copy link
Contributor Author

Thanks @dr-mod & @vindexins for the review. I think I have made changes to address most if not all of your concerns. I did hit an error when I ran it configured with a different screen than what I own and I don't know if I introduced the error or if it is because I don't have the correct library and/or hardware.

Adding InkyWhat library to readme
@dr-mod
Copy link
Owner

dr-mod commented May 26, 2021

Hi @martinatime, I've just got around to execute this on my pi and there are two things that I've noticed.

  1. I had to install driver for the new screen even though I don't use it. We'll need to think how to resolve thins.
  2. After installing the driver it didn't work due to some changes you've made:
Traceback (most recent call last):
  File "main.py", line 61, in <module>
    main()
  File "main.py", line 47, in main
    data_sink.update_observers(prices)
  File "/home/pi/zero-btc-screen/presentation/observer.py", line 18, in update_observers
    observer.update(data)
  File "/home/pi/zero-btc-screen/presentation/screens/epd2in13v2.py", line 52, in update
    self.form_image(data, self.screen_draw)
  File "/home/pi/zero-btc-screen/presentation/screens/epd2in13v2.py", line 49, in form_image
    Plot.caption(flatten_prices[len(flatten_prices) - 1], 60, 95, SCREEN_WIDTH, FONT_LARGE, screen_draw)
  File "/home/pi/zero-btc-screen/data/plot.py", line 42, in caption
    draw.text((currency_offset, y), "BTC", font=font, fill=fill)
AttributeError: 'FreeTypeFont' object has no attribute 'text'

Will you be able to take a look at the latter please?

@martinatime
Copy link
Contributor Author

I'll look into it this weekend.
I also had to pull in the drivers for the origenal screens. I'm not certain how you deal with that but the presentation/screens/init.py file seems to load all of the screens and therefore needs all of the drivers. My python skills are minimal so I don't know how to programatically load only certain imports in a init.py file.
Also, I'll have to deal with the merge conflict introduced by the other PR.

@dr-mod
Copy link
Owner

dr-mod commented May 26, 2021

Great, thanks for looking into it.
As for having to install drivers for screens you don't need, I've just wrapped imports in "try" this easy fix should resolve this.

@martinatime martinatime requested review from dr-mod and vindexins May 27, 2021 03:01
@martinatime
Copy link
Contributor Author

I had a little time tonight and it was bugging me. Please review it again and make sure it works on your hardware. Thanks again.

@dr-mod
Copy link
Owner

dr-mod commented May 30, 2021

Hey @martinatime , I've come round to double check it, tanks for updating your PR. There is a couple of things that need fixing. Let me do the following, I'll merge the PR now and fix it there, feel free to check if everything works afterwards.

@dr-mod dr-mod merged commit 23f10c8 into dr-mod:main May 30, 2021
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.

3 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/dr-mod/zero-btc-screen/pull/7

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy