Description
Trying to draw a set of lv_color16_t pixels or something equivalent to the screen memory efficient.
What MCU/Processor/Board and compiler are you using?
nRF52832 on the Pinetime
What LVGL version are you using?
7.11 InfiniTime fork
What do you want to achieve?
I want to draw an image based on data send per Bluetooth. I deemed 32 * 32 or 16 * 16 pixels a viable size to display. Both are scaled up at runtime on the pinetime to cover a certain area.
What have you tried so far?
I tried to create an lv_color16_t array of the size needed to display my image and I tried creating an image src based on 4 bit indexed colors with the size needed. Both need to much memory (not sure if lv_mem is used in the case of them) and thus intersect with stack.
My current solution which also doesn’t work involves sending 16 pixels + row number via Bluetooth, those are buffered in an array fitting the size. From the buffer i try to directly draw to screen when the specified app is open (music app in InfiniTime). This method is in my eyes the most likely to work, but is probably stomped by the fact that the area drawn to gets overwritten too fast.
Code to reproduce
This code cannot exactly run on its own, as there is more ecosystem around it, see InfiniTime.
The code block(s) should be formatted like:
lv_area_t area; // Some area
lv_color16_t color;
color.full = (albumArtDataBuffer[dataIndex] << 8) | albumArtDataBuffer[dataIndex + 1];
dataIndex++;
dataIndex++;
lvgl.SetFullRefresh(Components::LittleVgl::FullRefreshDirections::None);
lvgl.FlushDisplay(&area, &color);