Ciao Roberto,
Macchè evidentemente non ho capito, non mi funziona. Aggiungendo:
s2=menu.addMenu(MW_VAR,s1,F("Step"));
come nel codice sotto, quello che accade è che mi viene aggiunto un altro menu "Step" alla root principale.
Ho provato ha cambiare s2 in s3 sopra e relativa aggiunta *s3 all'inizio sotto ma nisba
_menu *r,*s1,*s2;
// initialize the menu object ( 4 x rows x 20 colums LCD)
menu.begin(&lcd,16,2); //initialize the menwiz menu object passing the lcd object and the colums and rows params
menu.addUsrNav(navMenu,4);
MW_navbtn=4; // force 4 or 6 buttons mode for menu navigation -> MW_navbtn=4; or MW_navbtn=6;
//create the menu tree
r=menu.addMenu(MW_ROOT,NULL,F("MAIN MENU")); //create a root menu at first (required)
//---------------
s1=menu.addMenu(MW_SUBMENU,r,F("SAW")); //add a submenu node 1 to the root menu (control the heigh of my Saw)
s2=menu.addMenu(MW_VAR,s1,F("ABS Height")); //add a terminal node in the menu tree (that is "variable"); (move at a certain mm height)
s2->addVar(MW_AUTO_INT,&sp,0,100,1); //int type, fd binded variable, rage 0-100, step 1
s2=menu.addMenu(MW_VAR,s1,F("Step"));
s2->addVar(MW_ACTION,Step);
invece
s2->addVar(MW_ACTION,Step);
mi blocca il codice su Step perchè non dichiarato .... ma questo è un altro discorso legato alla mia incapacità .... ci devo studiare un po' (ho provato a smanettare ma peggioro la situazione)
Comunque quello che mi sembrava aver capito è che una volta impostata la mia variabile
s2->addVar(MW_AUTO_INT,&sp,0,100,1);
ad esempio 10 ... premendo confirm passavo al livello successivo "Step" e confermando di nuovo eseguivo l'azione step con valore 10 impostato al livello precedente ... sbaglio ?