sumotoy / RA8875

A library for RAiO RA8875 display driver for Teensy3.x or LC/Arduino's/Energia/Spark
GNU General Public License v3.0
79 stars 55 forks source link

Flicker when updating / redrawing gauge pointer #113

Open RuneKyndal opened 8 years ago

RuneKyndal commented 8 years ago

Hi guys. I'm using this library to make a screen with "analog looking" gauges

my pointer is made from a fillTriangle at the tip. and a fillQuad for the body based on the Cos/sin helper functions to define the coordinates. and its working fine. with a nice sweeping "fat" needle.

but I'm getting flicker when i redraw my needle. I'm using Layer 2 for static items, such as the gauge outlines, Ticks, writing etc. and am only updating dynamic items on Layer 1
I draw the needle in white. then Draw it again in "black / transparent" (i use 0x000001) to erase it then update the needle angle. redraw the needle.

i have tried different combinations of color / redraw transparency etc. and I cant get rid of the redraw flicker?

tft.writeTo(L1); //ERASE pointer tip tft.fillTriangle(pointer_Ax,pointer_Ay,pointer_Bx,pointer_By,pointer_Cx,pointer_Cy,0x000001); //ERASE pointer body tft.fillQuad(pointer_Bx, pointer_By, pointer_Cx, pointer_Cy, pointer_Dx, pointer_Dy, pointer_Ex, pointer_Ey, 0x000001, 1);

pointer_update();

//DRAW pointer tiP tft.fillTriangle(pointer_Ax,pointer_Ay,pointer_Bx,pointer_By,pointer_Cx,pointer_Cy,RA8875_WHITE); //DRAW pointer body tft.fillQuad(pointer_Bx, pointer_By, pointer_Cx, pointer_Cy, pointer_Dx, pointer_Dy, pointer_Ex, pointer_Ey, RA8875_WHITE, 1);

any suggestions ? ideas would be greatly appreciated

/Rune Kyndal

darmfield commented 1 year ago

Did you ever figure something out for this?

RuneKyndal commented 1 year ago

unfortunately i did not.
I have not worked with the LCD in several years now.