Update display_ssd1309_oled_128x64_i2c.py - #1538
Conversation
Making this function usable on trixie and the screen more readable: Updated dependencies, removed some hardcoded versions that are no longer available Added DejaVu as a font and set it to be displayed.
Removed EOL symbol causing static to fail
|
Thanks for the PR. Did you verify this still works if the font doesn't exist at the specified location? |
No, it will fail. I added the font to the list of dependencies; dpkg -L specifies that path as a standard. If they change something in the upcoming releases, it will break. I can add some error handling around it, like: LMK if this is acceptable, and I'll update the PR. Also, libfreetype and libtiff6 are statically linked in Pillow and probably not required here so can be dropped. |
|
I think having either a try/except or os.path.isfile() check would be good, as we can't expect every system to function as we expect, so should have a safe fallback. As for the dependencies, I can't recall why they were included, but often they're added because at some time in the past when the module was made, they may have been required to be installed. |
|
I also forgot to mention, the Pillow dependency should be pegged to a version, specifically the version all the other modules use. Otherwise, the version will be changed whenever someone installs another module with the other version of Pillow specified. This goes for any pip package that is used by more than one module. |
|
Does an upgrade break functionality for current users? If so, then it would be more appropriate as a separate module. |


Made this function usable on Trixie and the screen more readable: