Gauge needle ghosting

Description

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
t4.1_8bit_gauge_ghosting

Test on the F769
ezgif.com-gif-maker
(The chopiness is due to the low frame rate of the GIF)

I replied to your last email to me :slight_smile: I’ll test this shortly…

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.

This might be a similar issue to the one you had in September. Perhaps try the lv_obj_invalidate hack on the gauge again?

I will give that a try and report back later on, once I get home.

@embeddedt ran a test with invalidating the gauge object - no changes in behaviour, looks exactly the same

Could this just be an artifact of your display? Perhaps try moving a blank object back and forth on the screen and see if it also ghosts.

It could be, I’m not ruling that out just yet.
But if it was definitely the display I wouldn’t expect to see it on the F769 Discovery.

I’ll retest on the Teensy tomorrow with the display configured @ 16 bit DBI to see if there is any improvement - kudos to @egonbeermat for the library :wink:

@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.

1 Like