-
Notifications
You must be signed in to change notification settings - Fork 501
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
PicoGraphics direct pens #613
Conversation
Draws the frame of a rectangle.
Pico Display 2 examples ported.
Major change, the registers used before were incorrect, the x and y were swapped, the code I cribbed them from was wrong! Also implemented pressure (Z) as some screens give wonky results with light pressure. Pressure rejection to touch is on line 73 of xpt2046.cpp, currently set at 50% of max pressure. We also now have a pressure value for points (now TouchPoints), from 0-100 where 100 is max pressure.
Add TouchPoint struct. Add calibration for Z.
The direct pen concept is getting some field-testing for Inky Frame, so we'll see how that pans out. There's some discussion about whether it should be replaced with a generic hardfault handler to map the PSRAM but I'm not sure how well that would work in MicroPython. |
With PicoVision we now have a project that uses out-of-tree, non-direct display drivers - https://github.com/pimoroni/picovision I think this is how ili9341 and xpt2046 should be handled. Our MicroPython builds are bloating out of control, and this repository is getting a little too monolithic to be navigable, so I'm slowly trying to break it apart into logical units and only put stuff here that's used by and shared across our products. It looks like |
This also contains:
#593
#596
The idea here is to enable PicoGraphics Pens to work without frame buffers, so directly to the display.
Display drivers need to implement the templated pure virtual interface IDirectDisplayDriver is they want to support this.
write_pixel()
should write a single pixel to the display.write_pixel_span()
should write a scanline/span of pixelswrite_pixel_rect()
should write a rectangle of pixels. This is currently not used.A single direct pen has been implemented
PicoGraphics_PenRGB565_direct
I have only updated the ili9341 driver to implement the interface, if people think this direct pen idea is a good idea I will update the ST7789 driver as well.
An example is provided
ili9341_direct_demo
has been added to show everything working.