Hey Guys!
Im started to display characters on a !graphical! display (its a M5StickC with esp32 and TFT color display).
It is important that we not talk about lcd like, character/digit numbers based display!
The problem is classical. If my variable = 10. It is displayed correctly. But when the value decrease to 9, the display shows: 90 ... of course, of course... "the characters remains unchanged until it is overwritten".
So far i did not see real working solution. That is how i tried:
-
i wrote an if statment: if variable less than 10 >> put the cursor to the second character. So it will be not 90 it will be 09 or 9... right? ... Of course not... it will be 19
-
Fill the screen or fill some rectangle. >> not good >> the screen will flicker.
2.2 Fill the screen or fill some characters rectangle WITH TIMER... (in every 500millisec fill/draw etc.) >> kinda works... but it gives you good result only slowly.... if you increase the update time, the slower it dislpay the correct value. And you still get some flicker on every update. If you update/draw faster... yes you get mooorrreee flicker.
- You combine everythig above. You write an if statment, about the number of characters and combine it with some conditional fill.rectangle. You gone be spot on!
BUT... It is freakin ~20 lines of code to display a 2digit character correctly!?!? And that is just one variable.
So any ideas anybody? Is there any solution i miss? So wierd in 2022 to deal this kind of silly. Any ideas are welcome!
Ben