Comments (15)
since we have 'tons of memory' - you can keep 2 framebuffers of the current state, one for what is on the screen right now, and one of what you want to draw on the screen next, and then we can do a numpy-powered comparison to find the dirty rectangle changes.
from adafruit_blinka.
I'm trying to figure out how this would work since it would be implemented in Python. What advantage this would provide over using Adafruit_CircuitPython_RGB_Display? The only thing I'm coming up with is maybe it provides a unified interface for the displays and works with some of the examples. Are you thinking about having it display the Python terminal as well? Also should we wait until displayio development in CP slows down?
from adafruit_blinka.
All good questions. I have no easy answers. Is it expected that CP code that uses displayio will run without modification via blinka magic?
from adafruit_blinka.
I would imagine. Another question though is what if they have a PiTFT with something like FBCP already running on it. Should it try and "take over" the display? Maybe only work if they don't have the PiTFT running? What if they are running it on a Raspberry Pi with an HDMI monitor? Perhaps a virtual LCD? I guess there's lots of design questions. Perhaps this would be a good discussion for "In the weeds" during a CircuitPython meeting.
from adafruit_blinka.
After using PIL on the Raspberry Pi a bunch last week, I think building a displayio module for Blinka that uses PIL under the hood would work awesome. This way we wouldn't need to maintain two different versions of examples and guide pages this way and it would probably cut down on a lot of work. Just a thought. :)
from adafruit_blinka.
yep, we'll get to that - all good.
its a different way of managing screens than pygame/pillow, and there's situations where people want the extra font/image/animation/graphics handling that pillow can provide. architecting it is not trivial and i'm willing to do the maintenence on the epd/rgb displays til then :)
when we're ready, we'll post here and assign!
from adafruit_blinka.
Sounds good. Thanks :)
from adafruit_blinka.
Looks like we're starting to approach a good place to do this (after the HT16K33 updates). I think the first step on this will be to stub it out like Scott suggested on #214 (the bleio issue). Then we can start filling in the blanks. Then we can optimize.
from adafruit_blinka.
Ok, I've put a lot of thought into this issue lately and want to share some of my thoughts:
- displayio should run in the same space as Adafruit_CircuitPython_RGB_Display and be an alternative to that library
- It should be written in Python so it is compatible on many boards
- We are now using ioctl for spi and i2c and that has proven to be fairly quick
- For backlight control, if there's now PWM, we can just round it to the nearest percentage and do on/off
- It may just be too slow to run on certain boards, but right now it doesn't run on any of them. :)
- I'm going to try and avoid using Pillow for now because that just adds another dependency/layer of complication, but it's not ruled out.
- I'll start with a basic ILI9341 and go from there
- Adafruit_CircuitPython_RGB_Display will make a good reference because it makes use of the init codes like displayio does. The main difference is that the displayio drivers each supply the codes.
I'll add more thoughts as I remember them...
from adafruit_blinka.
@tannewt for adding displayio, what are your thoughts on that the actual implementation? For instance, I'm not sure why you took the approach with _bleio as a separate repo. I could either do that or create a displayio.py file here. However, being that it should be pretty agnostic and on the complex side, I'm more inclined to take an approach like _bleio.
from adafruit_blinka.
@makermelissa I would also do a separate repo. You can always depend on Blinka for things you need.
Approach-wise, I think I'd basically re-implement the C code in Python. You could try to actually do it as a native module but I'm not sure if that's an approach worth learning.
The split between display buses and displays you'll want to keep. You'll also want to mimic the dirty rectangle behavior because you'll still be SPI bus speed limited. For the actual pixel computation it's probably better to simply use a Python library to render into a buffer for each dirty rectangle. The pixel computation is the hairiest part of the native code.
from adafruit_blinka.
Thanks @tannewt! The python approach is what I was planning on. A native approach would require reimplmentation for each microprocessor.
from adafruit_blinka.
As @tannewt suggested, I'm going to use a python library to handle the actual drawing. I'll go with Pillow since I'm familiar with it and it works reasonably fast. This will allow me to get something up and running in a reasonable amount of time. We can always rewrite the underlying subsystem in a later version if we feel that would be an improvement. I was originally debating between this approach or using drawing techniques such as in RGB_Display, but am opting for this method so I don't need to worry about writing mirroring or or xy swapping functions at this time.
from adafruit_blinka.
Ok, thanks. :)
from adafruit_blinka.
I'm going to close this since we now have support that works with most TFT situations in https://github.com/adafruit/Adafruit_Blinka_Displayio. The main things that still need to be added are ePaper display support and OLED support, but there's already issues open for those items.
from adafruit_blinka.
Related Issues (20)
- running the Windows platform. HOT 1
- ft232h output signal HOT 1
- ft232h with MLX90640 HOT 2
- Big Tree Tech BTT pi
- RPI 5 - python library piod: 'Chip' has no attribute 'OPEN_BY_NUMBER' HOT 24
- Breadboard HOT 2
- Arduino Uno HOT 5
- STM32F405 Feather Request
- rpi_ws281x not compatible with pi 5 HOT 4
- Exception thrown in Lockable.unlock() does not follow CircuitPython behavior
- Raspberry Pi5 RuntimeError: Timed out waiting for PulseIn message. Make sure libgpiod is installed. HOT 6
- Please add support for the OrangePiCM4 HOT 3
- board HOT 1
- Accessing digitalio CE0 results in a device busy error on Pi5 HOT 20
- RP2040 fails on valid UART pin combinations HOT 2
- AttributeError: pin instead of pin.id HOT 1
- NameError: name 'Pin' is not defined (ATOMIC PI) HOT 1
- Support for Feather M4 Express HOT 1
- Adafruit_CircuitPython_MCP2515 not working correctly
- Raspberry Pi 5 PWMOut needs updating to libgpiod HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adafruit_blinka.