Closed leikoilja closed 4 years ago
Hi!
I avoid that by limiting the times that .poll
is called per second
10 times = 100ms delay
Ou, that's a good suggestion. Thank you, @neu-rah. Could you please share a quick reference how to do it?
of course, ex: inside loop doing a minimal delay of 100ms, this wont be correct near millis overflow (that happens about every 5 days, but you get the point)
static unsigned int next=0;
if (millis()>=next) {
nav.poll();
next=millis()+100;
}
please note that I've not compiled this
Thank you, @neu-rah, for help! :+1:
I don't know if i should open another question ticket, but would you please be so kind to help me to find out if there is any method to check for button press? I am wondering if i can monitor which button was pressed inside of
idle_function
? :smile: In my use case i want to do an action if a user has clicked "OK" button whileidle_function
was running. Cause currently if any of the buttons pressed duringidle_function
it will simply return to the menu. I am more thinking if there is any method likewait_until_button_is_pressed()
I think i have got an answer for my own question from this line in docs
you have to manage input on your own and activate the menu again when needed
Thanks
Hey all. Thank you for the amazing library.
I have tried finding it in documentation, but don't seem to find anything about how to make a slight delay between TOGGLE options?
My problem is that when i press the button it changes the state like 5 times while i hold the button. A slight delay between button press of like 5-10ms would perfectly work here i guess. Instead of me introducing a custom delays is there any configuration option for that?