I am developing the interface with ESP32-WROVER MCU (equipped with 16MB flash and 8MB PSRAM) and I have a question related to the PresentDialog command.
In my solution as I described in this post: https://ask.embedded-wizard.de/4633/esp32-display-800x480-artefacts-effects-limitation-display I am using a 5" display at 800x480 resolution with the SPI interface. The display controller is a Raio RA8875 and I use a scratchpad width of 800 and a scratchpad height of 30 (It is less than 1/10 of the screen size but it seems to work with no problem), however to avoid tearing effects during Dialog update (cause of the big size of the resolution compared the scratchpad size) I want to manage the backlight of the display (hardware managing) to fade-out and fade-in the backlight during a change of the Dialog screen (DismissDialog followed by a PresentDialog).
To do so I thought this solution
thanks for your excellent description of the issue - it is very clear what you have done so far and what you try to achieve...
Maybe the solution is very simple (I did not verify this on a hardware but it should work):
You can use PresentDialog and the aComplete slot to get informed about the completion (your solution 1). Within this slot method you send a signal to your DeviceDriver to swich on the backlight. The trick is now, to use idlesignal which will be delivered after the screen update is completed.
Does this work?
Thank you for the answer
Sorry, but I have try your solution and: or it doesn't work or I don't understand how to implement it.
Maybe I'm wrong, but your solution It seems related to the completion of the Transiction effects of the PresentDialog, (if I use "PresentDialog( alert, null, null, null, null, null, null, onComplete, null, false );, also with idlesignal, the slot "onComplete" is executed immediately,and not related to the real device completion of the SPI write in the GRAM of the display, so the onComplete slot is execute while the DispDrvWriteDataWindow of the entire frame (launched by the PresenDialog) it's in progess and not yet completed.
I have implement the idlsignal in the wrong place?
The idea was the following:
You use the mechanism of PresentDialog and the onComplete slot as it is (no changes).
Within the onComplete method that is called when PresentDialog is completed, you send an idlesignal to the device driver that will switch on the backlight.
This idlesignal ensures that it will be delivered after the screen update is completed.
Does it work?
sorry for my late reply, but I was in vacation after your last reply till one week ago.
I want to confirm that now I understand your solution: I put the idlesignal in the slot onComplete invoked by the PresentDialog, I tested it and I can confirmed to you that it works very well as expected.
Thank you very much for you assistance.
Ask Embedded Wizard
Welcome to the question and answer site for Embedded Wizard users and UI developers.
Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!