GLCD Display Manager Overhaul

For general Flowcode discussion that does not belong in the other sections.
Post Reply
BenR
Matrix Staff
Posts: 2064
http://meble-kuchenne.info.pl
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 549 times
Been thanked: 735 times

GLCD Display Manager Overhaul

Post by BenR »

Hello,

I've recently added a lot of new functionality into the GLCD Display Manager component to help make it a bit easier to use and more functional. It is now capable of drawing primitives as well as touch interactive elements such as buttons and sliders. There are colour themes which makes it easier to define your colour pallets and text can now be drawn on top of any item and justified in both vertical and horizontal.

There's a new wiki page and example available here.
https://www.flowcode.co.uk/wiki/index.p ... l_Library)

Currently the only extra thing I maybe want to add is object and button types that can draw bitmaps, though I'm not 100% sure how to do this just yet.

If anyone wants to have a go and report back as to how they get on then that would be very appreciated.

mnfisher
Valued Contributor
Posts: 1783
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 150 times
Been thanked: 843 times

Re: GLCD Display Manager Overhaul

Post by mnfisher »

Looks a very neat idea.

I tried with the esp32s3 board (parallel ILI9488) - and got many build errors.
G:/Downloads/DisplayManagerDemo/main/esp-project.c: In function 'FCD_0fe41_gLCD_ILI9488__Initialise':
G:/Downloads/DisplayManagerDemo/main/esp-project.c:2810:21: error: expected expression before '?' token
2810 | SET_PORT_MASK(?,0x0, 0);
| ^
C:\ProgramData\MatrixTSL\FlowcodeV10\CAL\ESP\ESP_CAL_IO.h:91:78: note: in definition of macro 'SET_PORT_MASK'
91 | #define SET_PORT_MASK(p,m,v) FC_CAL_Port_Out_DDR (p, m, v)
being the start of them :-(

Martin

jgu1
Posts: 889
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 780 times
Been thanked: 195 times

Re: GLCD Display Manager Overhaul

Post by jgu1 »

Hi Ben!

First thank you for you effort and upgrading and all the benefit. :D You know I have a lot of project with these display (all Ili and st7796), hopefully the new benefit not have any influence of my project´s ;) I sometimes make improvements to these projects.

I have test your eksamble in simulation, but get these error.

See that the ST7735 is added, I will order one and test it for a project, Thank´s.

What is the FT6X06 vs. XPT2046?

Look forward to learn and test your new improvement ;)
Thank´s in advance.

Br Jorgen
Attachments
BenEksamble.png
BenEksamble.png (37.39 KiB) Viewed 3948 times

BenR
Matrix Staff
Posts: 2064
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 549 times
Been thanked: 735 times

Re: GLCD Display Manager Overhaul

Post by BenR »

Hi Martin,

I tried with the esp32s3 board (parallel ILI9488) - and got many build errors

They look like I/O related compile errors. is the display component connected correctly?


Hi Jorgen,

Looks like you might need to update to the latest component via library updates.

mnfisher
Valued Contributor
Posts: 1783
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 150 times
Been thanked: 843 times

Re: GLCD Display Manager Overhaul

Post by mnfisher »

is the display component connected correctly?
I'm going to say 'maybe' - or I think/hope so...

2024-04-10_20-53-02.png
2024-04-10_20-53-02.png (23.48 KiB) Viewed 3929 times

Will play some more....

BenR
Matrix Staff
Posts: 2064
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 549 times
Been thanked: 735 times

Re: GLCD Display Manager Overhaul

Post by BenR »

Could maybe be that led pin being in the different style? Shouldn't cause an issue but you never know. That's the only thing jumping out to me.

mnfisher
Valued Contributor
Posts: 1783
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 150 times
Been thanked: 843 times

Re: GLCD Display Manager Overhaul

Post by mnfisher »

Just started to use the esp32s3 board (with ili9488 in parallel mode) - and I'm hitting this error again...

Error is as before (and in v10 and v11) - I can write to the display - but not using the component - errors occurring in ESP_CAL_IO
D:/Projects/Flowcode/Lidar_s3/main/esp-project.c:2700:21: error: expected expression before '?' token
2700 | SET_PORT_MASK(?,0x0, 0);
| ^
C:\ProgramData\MatrixTSL\FlowcodeV10\CAL\ESP\ESP_CAL_IO.h:91:78: note: in definition of macro 'SET_PORT_MASK'
91 | #define SET_PORT_MASK(p,m,v) FC_CAL_Port_Out_DDR (p, m, v)
| ^
C:\ProgramData\MatrixTSL\FlowcodeV10\CAL\ESP\ESP_CAL_IO.h:91:79: error: left-hand operand of comma expression has no effect [-Werror=unused-value]
91 | #define SET_PORT_MASK(p,m,v) FC_CAL_Port_Out_DDR (p, m, v)
Code - I just tried to initialise the display - so not sure which connection is the culprit? We've hit this before - see https://www.flowcode.co.uk/forums/viewt ... 5&start=10 - and my code from there works (using port A0 and A1 to write to the display in port mode) - but Ben's didn;t (C:/Espressif/frameworks/esp-idf-v5.5/components/esp_lcd/rgb/esp_lcd_panel_rgb.c:681:1: internal compiler error: Segmentation fault
- a new one for me!) but compiled on second attempt - as far as I see the only difference is the write using port mode and changing this doesn't affect things ?

Also - how is the 'super bright' LED on the ep32s3 board controlled ?


Martin
Attachments
Lidar_s3.fcfx
(11.74 KiB) Downloaded 11 times

jgu1
Posts: 889
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 780 times
Been thanked: 195 times

Re: GLCD Display Manager Overhaul

Post by jgu1 »

Hi Martin!

Happy Newyear!. Concerning the LED on the board. I have worked with the ESP32 Dev board myself and tried to get the onboard LED working.
When I bought a new board, it came pre-programmed and the LED changed color as a test, so I know it is functional. When I check the pin with a scope, I can see activity on that pin.

What I have found is that the LED is connected to pin 48 and it is a WS2812 LED. I have tried to control it in Flowcode 11 using the WS2812 component, but I do not get any signal output on the pin. Based on my attempts so far, I suspect that the WS2812 component may not work correctly on the ESP32-S3, or at least I have not been able to make it work, maybe me :lol:

Jorgen.
Attachments
WS2812.png
WS2812.png (570.69 KiB) Viewed 63 times

BenR
Matrix Staff
Posts: 2064
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 549 times
Been thanked: 735 times

Re: GLCD Display Manager Overhaul

Post by BenR »

Hello,

The compiler problem is caused by the hidden pins in the component, even though these aren't used they are causing the compile errors.

Here's a fixed version of your project file.

Lidar_s3.fcfx
(13.61 KiB) Downloaded 7 times
I'll see if I can improve things by automatically assigning correct values for the hidden pins.

I'll also investigate the WS2812B as it certainly used to work but I beleive something may have changed with the latest compiler version.

mnfisher
Valued Contributor
Posts: 1783
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 150 times
Been thanked: 843 times

Re: GLCD Display Manager Overhaul

Post by mnfisher »

Thanks Ben,

Yes it would be good if the 'hidden' pins either defaulted to something - I think it's been suggested to have a 'unconnected' pin allowed - that doesn't compile / cause errors?

Thanks Jorgen,

I'll have a play with the LED too - be good to turn the thing off if nothing else!

Martin

Post Reply