There seems to be ghosting of the gauge needle on several platforms
This was tested on a Teensy 4.1 running an ILI9488 display via 8 bit parallel as well as an STM32F769 Discovery via LTDC (test provided by @papadkostas)
What MCU/Processor/Board and compiler are you using?
Teensy 4.1 & STM32F769
Tested on multiple versions of lvgl v7 (from v7.4 and above, have not tested earlier versions)
What do you experience?
Ghosting of the gauge needle, it’s previous position is visible on the display but with some opacity and sometimes even with some tearing.
What do you expect?
Smooth needle movement
Code to reproduce
I used the code provided by the gauge example on the doc site with an animation to make it move back and forth
void lv_ex_gauge_1(void)
{
/*Describe the color for the needles*/
static lv_color_t needle_colors[1];
needle_colors[0] = LV_COLOR_BLUE;
/*Create a gauge*/
lv_obj_t * gauge1 = lv_gauge_create(lv_scr_act(), NULL);
lv_gauge_set_needle_count(gauge1, 1, needle_colors);
lv_obj_set_size(gauge1, 320, 320);
lv_obj_align(gauge1, NULL, LV_ALIGN_CENTER, 0, 0);
/*Set the values*/
lv_gauge_set_value(gauge1, 0, 10);
}
Screenshot and/or video
Test on the Teensy 4.1
Test on the F769
(The chopiness is due to the low frame rate of the GIF)
Thanks @egonbeermat! I don’t think the ghosting is due to the display library on the Teensy, as I did see it a few months back when testing with SPI but thought it was due to the SPI speed bottleneck.
The fact that it happens on the STM32F769 with a MIPI DSI interface running DMA2D and some other software/hardware accelerators leads me to believe that it’s originating from LVGL and not the display interface.
@embeddedt I’ve changed the display driver from 8 bit bus to a 16 bit bus.
I tested the slider - it ghosts as well but only when moving very fast, and it’s ghosted image is overlapping, so it’s hard to notice with the naked eye.
I have been able to eliminate most of the ghosting and tearing on the gauge needle with the new display driver library - it required me to adjust the frame rate control register on the display as well as LV_DISP_DEF_REFR_PERIOD in lv_conf.h (the closer the are the smoother it is).
I’ll keep tinkering around until I find the sweet spot.