Closed woodencase01 closed 5 years ago
Hi!
on setup:
nav.idleTask=myIdleScr;//point a function to be called when menu exists
nav.timeOut=60;//optionally define a timeout in seconds
nav.idleOn(myIdleScr);//optionally start the system with the idle screen
the menu will idle either by timeout or by exiting the main menu and resume on select/exit command or programaticallly with nav.idleOff()
example of idle function, put it before setup
//the idle handler
result myIdleScr(menuOut& o,idleEvent e) {
switch(e) {
case idleStart:
//enter idle
//can be called multiple times, depending of the number of output devices
break;
case idleEnd:
//terminate idle
break;
case idling:
//do idle stuff, can be called multiple times, depending on output device type
nav.idleChanged=true;//force redraw of idle screen (we need to update content, so this will be called again)
break;
}
return proceed;
}
i've not compiled this, just copy paste from existing code, so let me know if i skipped or miss renamed some stuff.
there is some info on "idling" here https://github.com/neu-rah/ArduinoMenu/wiki/Idling
thanks for the interest.
feel free to reopen if not solved or if you need more info
Hi!
I'm building a menu system for a benchmarking tool which has many sensors. I'd like to have the main screen showing all the sensors current values and have the menus appear on my encoder clicks.
I'm having difficulties figuring out how to do it.
I'd like to show all sensors such as below on the main screen:
|-CURRENT STATE-|
|-TEMP 1--TEMP 2--TEMP 3--|
|-POS 1---POS 2---POS 3---|
|-SPEED 1-SPEED 2-SPEED 3-|
What's the best way to achieve this?
Here is my current code: