Slider Sample #71
-
Do you have a sample that shows how the slider works? I found one here: I have the slider working, but nothing happens when I touch the slider. I suspect the value is changed back on the next redraw of the screen, so I'm not seeing the change, but I don't know how to work around that. Here is the code I have to draw and track the slider. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I do not have a full example, I maybe should add one to my demo since this is something less obvious. In my last project I was using this in TFT_display(): And then this in TFT_touch:
... |
Beta Was this translation helpful? Give feedback.
-
Thanks! It took me a while to get this integrated into the framework I've built around this library, but the sliders now work. |
Beta Was this translation helpful? Give feedback.
I do not have a full example, I maybe should add one to my demo since this is something less obvious.
I posted this before, somewhere, perhaps on the BRT forum...
In my last project I was using this in TFT_display():
EVE_cmd_dl_burst(TAG(30));
EVE_color_rgb_burst(LIGHT_GREY);
EVE_cmd_slider_burst(50, 270, 700, 20, 0, rpm_request, 550);
And then this in TFT_touch:
switch(tag)
{
case 0:
if(touchtest == 0xffffffff) /* display no longer touched */
{
toggle_lock = 0;
...
case 30:
if(track == 0)
{
if(toggle_lock == 0 && active_nad != 0)
{
EVE_cmd_track(…