2025-01-30 05:08 PM
Hi all,
TouchGFX version: 4.16.1
I have a slider that allows user to change the timer values. I have registered two callbacks (1) setNewValueCallback and (2) setStopValueCallback.
When using simulator, when I simply click(no release yet) on some value on a slider that is different than the current value, I get a new value callback once. When I release the mouse button, I get another new value callback(which is expected based on the code I see in Slider.cpp), followed by stop value callback - total of three callbacks happen. This works without any issues in the simulator.
On target, it works for the most part but every now and then I run into issues where when I click on a slider value, the slider jumps to zero position. I have also seen it jump to max position. I added some events in the both of those callback handlers to debug this further. When this issue is not happening, I see three debug events as expected as explained earlier in simulator case(two new value callback events and one Stop callback event). The events also prints out the correct slider value that came from the callback function's argument. But when this issue happens(slider jumping to zero case) - my slider touch on a slider triggers 4 events (i.e. 4 callbacks) in total. The first callback is new value callback with the correct slider value(verified by event data). The second callback is new value callback with slider value set to 0 which does not make any sense.(I do not call setValue() on this slider anywhere in my code at all). The 3rd callback is new value callback again with the slider value set to 0 and the 4th callback is Stop value callback with the slider value of 0 as well.
Any help would be appreciated to point me to where things could be going wrong.