-
Notifications
You must be signed in to change notification settings - Fork 160
-
Notifications
You must be signed in to change notification settings - Fork 160
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
st77xx.py is broken #263
Comments
Fix color.dereference in st77xx.py
lv.color_t.SIZE cannot be resolved. Described at def init(....) thank you. |
@amirgon IIRC |
Use 2 directly, in order to not rely on LVGL import. Related: #263 (comment)
@ngc6589 I changed it back to 2 instead of Please let me know if it works now, as I cannot test this on my side.
@eudoxos Looking at the C callback: /**
* Set the flush callback whcih will be called to copy the rendered image to the display.
* @param disp pointer to a display
* @param flush_cb the flush callback
*/
void lv_disp_set_flush_cb(lv_disp_t * disp, void (*flush_cb)(struct _lv_disp_t * disp, const lv_area_t * area,
lv_color_t * color_p));
Here is an example from Linux FB driver: static void flush_cb(lv_disp_t * disp, const lv_area_t * area, lv_color_t * color_p)
{
...
lv_memcpy(&fbp32[location], (uint32_t *)color_p, (area->x2 - area->x1 + 1) * 4); |
I've seen a fix that changed lv.color_t.SIZE back to 2. |
What name would you find more intuitive? E.g. |
First, I think that documentation does not say anything about the callback parameters and their meanings. |
Or perhaps |
|
Sounds good to me. But please also add comments/docs that explain the callback arguments, so everything would be clear. |
I updated it. |
After adapting the Micropython Bindings to the new LVGL driver API (lvgl/lvgl#4011), st77xx.py broke.
Related: https://forum.lvgl.io/t/issue-st77xx-py-generic-driver/11216
The problem is as following:
lv_binding_micropython/driver/generic/st77xx.py
Lines 438 to 443 in cf206e1
st77xx.py accesses
disp_drv.draw_buf.buf_act
directly. This is no longer possible becausedraw_buf_act
is now a private LVGL member that is not exposed to the users. It is not part of the LVGL public API and therefore not part of the Micropython bindings.The user is supposed to access the data through
color
argument which represents the buffer.@eudoxos - What was the reason you used
buf_act
directly instead ofcolor
?The text was updated successfully, but these errors were encountered: