Open reticulatingsplines opened 11 months ago
Changing _INIT_SEQUENCE
to an empty string (""
) instead of None
gets past the exception, but the PyGame window never shows up so something else still seems to be broken. When running the example in the README with this change applied, it exits immediately without ever creating the PyGame window.
@ry755 and @reticulatingsplines This library is incompatible with the newest versions of Blinka_DisplayIO.
For now, in order to use it you'll need to use version 0.11.1
or prior of Blinka_DisplayIO.
I created and merged #19 to add a warning to the readme about this, as well as update the requirements.txt file to indicate the compatible version.
Has this already been uploaded to pypi? When I try a clean install, it still pulls in 1.1.0 of Blinka_DisplayIO.
@bablokb No, sorry. It appears I forgot to make the release when I merged that PR to pin the version.
I've made it just now: https://github.com/FoamyGuy/Blinka_Displayio_PyGameDisplay/releases/tag/2.4.0 I believe that should result in the new one being used by default on a pip install. You may need to explicitly uninstall the newer version of Blinka_DisplayIO that it would have installed before this change, I'm not certain.
Let me know if you have further issues.
I'm hoping to swing back around and take another crack at getting this working with the newer Blinka_DisplayIO soon as well but can't promise any solid timeline ATM.
If anyone reading this is interested in helping out It'd be much appreciated, knowledge of pygame and/or color profile manipulation like RGB565 are the most relevant skill sets but I'm happy to get help from anyone really.
This fixes it. I now have issues with importing terminalio, but this might be related to PIL. Too late to investigate today.
Pillow 10.1 is the culprit, 9.4 works (there were some changes to ImageFont.load_default()
). The current version of Blinka_DisplayIO has a fix for that (in fontio.py
, loading a specific font), but the old version uses load_default()
and fails. The old version would need a change to the requirements-file I suppose, but there isn't even a branch for the old version so I am not sure if this is feasible.
Would it be possible that this package already pulls in the correct PIL-version before Blinka_DisplayIO just takes the newest one?
Hey, new to pillow and PIL and PyGame, and wondered about the missing terminalio, but also vectorio
and bitmaptools
. Should I file a separate issue?
@tyeth Yes you can open an issue if you'd like. I believe Blinka_DisplayIO does not currently have implementations for vectorio
or bitmaptools
if that is the case I think they would need to be implemented in there and then could be used by this library.
I always use this project here to prototype my UIs and I also miss vectorio (which is far more efficient than adafruit_display_shapes). But vectorio is implemented in C, while Blinka_DisplayIO is pure Python.
My "solution" was to clone adafruit_display_shapes.rect.Rect
to vectorio.Rectangle
and just change the interface to match the orginal. I never created a pull-request for Blinka, because I did not bother to port Circle and I was not sure if a PR would be accepted anyhow (it does add dependencies to Blinka that are not currently there).
Thanks for your inspiration @bablokb , I had a quick play and got my circle displayio_shapes working, although my old (archaic?) colour changing code (setting circle.color_index = 6
) no longer worked and I'm new to using fill / getting my weird palette working with the correct background colour, but was a pleasant relief to see the thing running the same code and outputting similar output visually to my real sensor devices.
Need to resolve my fonts, palettes n pixel_shaders, and the margins/spacing (seemed weird when running the percentage bar demo with adjusted sizes, in addition to running my other code but mine may be fonts and lack of terminal which usually occupies 50% of screen).
@bablokb and @tyeth https://github.com/adafruit/Adafruit_Blinka_Displayio/pull/122 is open in Blinka DisplayIO repo now that adds vectorio implementation for it which I've tested successfully with this library.
Hey there,
I have to be missing something painfully obvious, because I've spent a few hours now meticulously crawling through this library and its dependencies with no answer to my own problem nor any idea how any of the examples would ever work.
Essentially, the first thing that the PyGameDisplay code does is set
_INIT_SEQUENCE
toNone
......but when a PyGameDisplay instance is created, it initiates its parent class from the Blinka displayio library using this value,
None
, for_INIT_SEQUENCE
......and then its parent class's init tries to evaluate the length of init_sequence, which is defined as our provided _INIT_SEQUENCE, i.e. None...
...and you immediately get an exception. Am I not clued in to some need to edit a seemingly private variable, _INIT_SEQUENCE, in the PyGameDisplay library? I doubt it, so if this is really meant to be None, how has this code ever worked?