**Solved** Colour changes between simulator and real hardware

Description: I am a new user and have been delighted with LVGL. My first project is a monitor for two lithium batteries plus their charging and management systems. I finished the project in the simulator using Eclipse. There is a fair bit of UDP networking and I have about 10 screens and 1200 lines of C. Everything works as expected in the simulator. The issue is a small one in that the cross compiled program (which ran first time) and the simulator show some different colours (three instances).

What MCU/Processor/Board and compiler are you using? The hardware is the new Onion Omega2-Dash. I just received two of them today. Eclipse IDE. Compiler gcc on 64bit Ubuntu 19.10. Cross compiler supplied by Onion.

What do you want to achieve? For the Omega2-Dash to display the same colours as the simulator.

What have you tried so far? I just need some clues/hints as to what might be going on. There are three colours which are totally different. However, I’ll just focus on one example.

If I create a default screen with default theme/styles etc I get a greyish colour both in the simulator and also in the hardware. If I add the two lines of code shown below, to change the default body colour to Orange, that works in the simulator but the colour does not change on the Dash hardware. I have the colour depth set to 16 in each case (simulator as well as cross compiled). LVGL is the latest 7.0.1 in each case.

Code to reproduce

lv_style_set_bg_color(&style, LV_STATE_DEFAULT, LV_COLOR_ORANGE);
lv_obj_add_style(lv_scr_act(), LV_OBJ_PART_MAIN, &style);

Screenshot and/or video

I have not added these. The background is orange on the simulator but unchanged from grey on the hardware.

Maybe I am not setting the colour/style correctly? Any thoughts?

Best Regds,

EDIT: Embarrassment! the two lines above were excluded in the cross compilation due to an error on my part