Closed tomelgato closed 1 month ago
Can i poll the encoder directly when taken over the display? I would need a quicker update frequency then 1/5 seconds.
Can i poll the encoder directly when taken over the display? I would need a quicker update frequency then 1/5 seconds.
I've never tried it but I cannot see why not. You can even I think check if the button is pressed using polling.
Can you please raise things like this as discussions, and not overwrite the issue template. You've done it several times now, those templates are there for a reason, to help us identify real problems from questions. It is hard enough to run a project of this size even when everyone follows the rules.
Ok, no problem. I did see it as a bug, cause the callback is called over and over again with the same values. I expected to get just new values/states.
TCmenu 4.2
After taking over the display with
renderer.takeOverDisplay(myDisplayCallback);
it calls
but i just get encodervalue 0-X (X=number of submenu items from where the display was taken by a ActionMenuItem callback) and clicked stays on 1 (clicked) or 2 (held) till i turn the encoder again, then clicked is 0 again.
do i miss something?
EDIT: changing the precision works
switches.getEncoder()->changePrecision(100,0,false,1);
this also sets back the clicked flag, so its working like that. The Q is ... is this the right way to do it?