Problems in exported C code for font size and colour depth

What do you want to achieve?

Use SLS to generate correct C code for SLS design.
I have created a simple 2 screen project as a test of using SLS in our embedded project.
I have exported the template project & UI.
I am compiling using Microchip (Atmel) Studio on a win10 PC.

So I have 2 problems in the generated code.
Neither are show stoppers, just a bit annoying.

Problem1.
When I tried to compile, I realised I used too many different font sizes in the SLS design, so I went back into SLS and changed the text fonts to only use 2 sizes, 18 & 40.
However when I re-export the UI files they are still referencing the original font size, and not the changed current SLS selection.

e.g. I have a label called Screen1_label4, default text style is set to montserrat 40.
(It looks ok on SLS screen)

the code generated is:
lv_obj_set_style_text_font(ui_Screen1_Label4, &lv_font_montserrat_44, LV_PART_MAIN | LV_STATE_DEFAULT);
(Where montserrat_44 was the original size)

Problem 2
In SLS/Project Properties I have selected colour depth as “16 bit swap”.
(I need this for my SPI display interface)

In LVGL I have built using the following options in lv_conf.h
/Color depth: 1 (1 byte per pixel), 8 (RGB332), 16 (RGB565), 32 (ARGB8888)/
#define LV_COLOR_DEPTH 16

/Swap the 2 bytes of RGB565 color. Useful if the display has an 8-bit interface (e.g. SPI)/
#define LV_COLOR_16_SWAP 1

When I try to compile I get an error triggered by these lines of code.
#if LV_COLOR_16_SWAP !=0

  • #error “LV_COLOR_16_SWAP should be 0 to match SquareLine Studio’s settings”*
    #endif

What have you tried so far?

Changing the font size again, saving the SLS project, re-exporting

Screenshot or video

Others

  • SquareLine Studio version:
    1.1.1

  • Operating system:
    Windows 10

  • Target hardware:
    Custom board using an ATSAMD51N20 microcontroller

Can you send the project to forum@squareline.io so that we can try it out?