Skip to content
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

XIAO NRF Sense Image not working #9

Closed
Gabinson200 opened this issue Dec 29, 2024 · 4 comments
Closed

XIAO NRF Sense Image not working #9

Gabinson200 opened this issue Dec 29, 2024 · 4 comments
Assignees
Labels
Seeed_Arduino_RoundDisplay Label for Seeed_Arduino_RoundDisplay UAY Unassigned yet

Comments

@Gabinson200
Copy link

Hello, I'm using the round display with the XIAO nRF52840 (Sense) with the Arduino GFX library. I was able to use images with lvgl version 8.3.4 but I wanted to upgrade to 9.2.0 so i can do non-uniform scaling on images. However, while my code compiles and there are no errors the image is not shown. I used the v9 converter here https://lvgl.io/tools/imageconverter and tried the 565 and 565A8 encoding but neither worked. I have tried using different versions of the conf_h file to get it to work but while both 8.3 and 9.2 conf_h file versions compiled neither displayed the image. Lastly I had to change the lv_image_dsc_t in both 8.3 and 9.2 versions to work. For 8.3 this style worked perfectly:

const lv_img_dsc_t tile000 = {
.header = {
.cf = LV_IMG_CF_TRUE_COLOR_ALPHA,
.always_zero = 0,
.reserved = 0,
.w = 64,
.h = 64,
},
.data_size = 4096 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = tile000_map,
};

but for version 9.2, while the program compiled the image did not display:
const lv_image_dsc_t tile000 = {
{
LV_COLOR_FORMAT_RGB565,
LV_IMAGE_HEADER_MAGIC,
64,
64,
},
4096 * 2,
tile000_map,
};

Any and all help is greatly appreciated!

@Lesords Lesords added UAY Unassigned yet Seeed_Arduino_RoundDisplay Label for Seeed_Arduino_RoundDisplay labels Dec 30, 2024
@ackPeng
Copy link
Contributor

ackPeng commented Dec 31, 2024

@Gabinson200 Hi, I ran the HardwareTest instance using esp32s3 and it worked fine. Can you provide a more detailed description of your program?

@ackPeng
Copy link
Contributor

ackPeng commented Dec 31, 2024

@Gabinson200 When I use nRF52840, I find that there are compilation errors in the dependent Arduino GFX library. I will further investigate. Your further feedback is also welcome.

@Gabinson200
Copy link
Author

Thank you for the help, I have kind of found a workaround for what I wanted from the lvgl 9.2 function in 8.3. But in short the issue was that my program which creates images by importing the hex code from a .h file in the form described above:

lv_obj_t *sprite_img = lv_img_create(lv_scr_act());
// Set the image source
const lv_img_dsc_t *src = sprite_images[i % num_sprites];
lv_img_set_src(sprite_img, src);

was unable to display (probably decode) the images.

here is a link to my github where I uploaded the code if additional info is needed. The program is basically a sprite stacking code so I can create pseudo 3d images / animations in lvgl + some really jank touch control that I'm trying to fix right now.

@ackPeng
Copy link
Contributor

ackPeng commented Jan 8, 2025

Great, this issue will be closed. If you have new questions, please feel free to submit them again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Seeed_Arduino_RoundDisplay Label for Seeed_Arduino_RoundDisplay UAY Unassigned yet
Projects
Status: Done
Development

No branches or pull requests

3 participants