File tree Expand file tree Collapse file tree 5 files changed +6
-3
lines changed
Expand file tree Collapse file tree 5 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,6 @@ void setup()
4141
4242void loop ()
4343{
44- // serial can use numbers or +/- and Enter to navigate
44+ // serial can use numbers or +/- and Enter=* Esc=/ to navigate (nav keys can be redefined)
4545 mainMenu.poll (menu_lcd,Serial);
4646}
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ quadEncoder quadEncoder(encA,encB);//simple quad encoder driver
7575quadEncoderStream enc (quadEncoder,5 );// simple quad encoder fake Stream
7676
7777// a keyboard with only one key :D, this is the encoder button
78- keyMap encBtn_map[]={{-encBtn,13 }};// negative pin numbers means we have a pull-up, this is on when low
78+ keyMap encBtn_map[]={{-encBtn,menu::enterCode }};// negative pin numbers means we have a pull-up, this is on when low
7979keyLook<1 > encButton (encBtn_map);
8080
8181// multiple inputs allow conjugation of the quadEncoder with a single key keyboard that is the quadEncoder button
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ quadEncoder encoder(encA,encB);//simple quad encoder driver
8989quadEncoderStream enc (encoder,5 );// simple quad encoder fake Stream
9090
9191// a keyboard with only one key :D, this is the encoder button
92- keyMap encBtn_map[]={{-encBtn,13 }};// negative pin numbers means we have a pull-up, this is on when low
92+ keyMap encBtn_map[]={{-encBtn,menu::enterCode }};// negative pin numbers means we have a pull-up, this is on when low
9393keyLook<1 > encButton (encBtn_map);
9494
9595// multiple inputs allow conjugation of the quadEncoder with a single key keyboard that is the quadEncoder button
Original file line number Diff line number Diff line change @@ -215,6 +215,7 @@ www.r-site.net
215215 virtual void activate (menuOut& p,Stream&c,bool ) {
216216 action (*this ,p,c);
217217 }
218+ virtual bool isMenu () const {return false ;}
218219 };
219220
220221 class menuNode :public prompt {// some basic information for menus and fields
@@ -253,6 +254,7 @@ www.r-site.net
253254
254255 void poll (menuOut& p,Stream& c,bool canExit=false );
255256
257+ virtual bool isMenu () const {return true ;}
256258 };
257259
258260#endif
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ www.r-site.net
4040 };
4141
4242 // Prompt linked to a variable
43+ // TODO: implement Escape on a field cancels the editting (undo) restoring the value
4344 static const char * numericChars=" 0123456789." ;
4445 template <typename T>
4546 class menuField :public menuNode {
You can’t perform that action at this time.
0 commit comments