@@ -35,11 +35,7 @@ Print& operator<<(Print&o, Menu::prompt&p) {
3535}
3636#endif
3737
38- #ifdef ARDUINO_SAM_DUE
39- #define LEDPIN 13
40- #else
41- #define LEDPIN A3
42- #endif
38+ #define LEDPIN LED_BUILTIN
4339
4440// define menu colors --------------------------------------------------------
4541// each color is in the format:
@@ -55,13 +51,13 @@ const colorDef<uint8_t> colors[] MEMMODE={
5551
5652// define menu outputs ------------------------------------------------
5753#define MAX_DEPTH 4
58- /* const panel panels[] MEMMODE={{1,1,16,10},{18,1,16,10},{36,1,16,10}};
59- navNode* nodes[sizeof(panels)/sizeof(panel)];
60- panelsList pList(panels,nodes,sizeof(panels)/sizeof(panel));
61- idx_t ansi_tops[MAX_DEPTH];
62- ansiSerialOut ansi(Serial,colors,ansi_tops,pList);//the output device, ansi-terminal Cols x Rows
63- menuOut* outputs[]={&ansi};
64- outputsList out(outputs,1);*/
54+ // const panel panels[] MEMMODE={{1,1,16,10},{18,1,16,10},{36,1,16,10}};
55+ // navNode* nodes[sizeof(panels)/sizeof(panel)];
56+ // panelsList pList(panels,nodes,sizeof(panels)/sizeof(panel));
57+ // idx_t ansi_tops[MAX_DEPTH];
58+ // ansiSerialOut ansi(Serial,colors,ansi_tops,pList);//the output device, ansi-terminal Cols x Rows
59+ // menuOut* outputs[]={&ansi};
60+ // outputsList out(outputs,1);
6561
6662MENU_OUTPUTS (out,MAX_DEPTH
6763 ,ANSISERIAL_OUT(Serial,colors,{1 ,1 ,16 ,10 })// ,{18,1,16,10},{36,1,16,10})
@@ -238,11 +234,11 @@ MENU(subMenu,"Sub-Menu",showEvent,anyEvent,noStyle
238234 ,EXIT(" <Back" )
239235);
240236
241- extern menu mainMenu;
242- TOGGLE ((mainMenu[1 ].enabled),togOp,"Op 2:",doNothing,noEvent,noStyle
243- ,VALUE(" Enabled" ,enabledStatus,doNothing,noEvent)
244- ,VALUE(" disabled" ,disabledStatus,doNothing,noEvent)
245- );
237+ // extern menu mainMenu;
238+ // TOGGLE((mainMenu[1].enabled),togOp,"Op 2:",doNothing,noEvent,noStyle
239+ // ,VALUE("Enabled",enabledStatus,doNothing,noEvent)
240+ // ,VALUE("disabled",disabledStatus,doNothing,noEvent)
241+ // );
246242
247243result alert (menuOut& o,idleEvent e) {
248244 if (e==idling)
@@ -303,19 +299,16 @@ void setup() {
303299 pinMode (LEDPIN,OUTPUT);
304300 Serial.begin (9600 );
305301 while (!Serial);
302+ Serial.println (" ok" );
306303 Serial<<" menu 3.0 test" <<endl;Serial.flush ();
307304 nav.idleTask =idle;// point a function to be used when menu is suspended
308305 mainMenu[1 ].enabled =disabledStatus;
309306 nav.showTitle =true ;
310- // nav.printMenu(1);
311- // ansi.fill(1, 1, 2, 2, 'X');
312- // Serial<<"pList[0]:{"<<pList[0].x<<","<<pList[0].y<<","<<pList[0].w<<","<<pList[0].h<<"}"<<endl;
313307 delay (1000 );
314308}
315309
316310void loop () {
317311 nav.poll ();
318312 digitalWrite (LEDPIN, ledCtrl);
319- // digitalWrite(LEDPIN,!digitalRead(LEDPIN));
320- delay (100 );// simulate a delay when other tasks are done
313+ delay (100 );
321314}
0 commit comments