@@ -142,9 +142,9 @@ MENU(subMenu,"LED ON/OFF",
142142MENU (mainMenu," Sistema" ,
143143 OP (" Frequency" ,setFreq),
144144 OP(" Dutty" ,setDutty),
145- OP(" Scroll up" , scrollUp_test),
146- OP(" scroll down" , scrollDown_test),
147145 OP(" Disabled" ,disabledTest),
146+ /* OP("Scroll up", scrollUp_test),
147+ OP("scroll down", scrollDown_test),
148148 OP("Handler test",completeHandlerTest),
149149 OP("Handler test",completeHandlerTest),
150150 OP("Handler test",completeHandlerTest),
@@ -154,53 +154,10 @@ MENU(mainMenu,"Sistema",
154154 OP("Handler test",completeHandlerTest),
155155 OP("Handler test",completeHandlerTest),
156156 OP("Handler test",completeHandlerTest),
157- OP(" Handler test" ,completeHandlerTest),
157+ OP("Handler test",completeHandlerTest),*/
158158 SUBMENU(subMenu)
159159);
160160
161- // more menu functions that need the menu defs
162- /* int scrollY(menuOut& o,int pixels) {
163- tft.print(pixels);tft.println(" px");
164- int lines=pixels/o.resY;//convert pixels to lines
165- tft.print(lines);tft.println(" lines");
166- tft.print(o.top);tft.println(" top");
167- o.top+=lines;
168- mainMenu.clampY(o);
169- tft.print(o.top);tft.println(" clamped top");
170- if (mainMenu.sel<o.top) mainMenu.sel=o.top;
171- else if (mainMenu.sel>=(o.top+o.maxY)) mainMenu.sel=o.top+o.maxY-1;
172- //menu needs to be redrawn after this
173- return pixels-lines*o.resY;
174- }*/
175-
176- void scrollUp_test (prompt &p,menuOut &o,Stream &i) {
177- setValue (stv,p,o,i," dist:" ," Pixels" ,1 ,0 ,16 );
178- /* selectTFT();
179- tft.fillScreen(BLACK);tft.setCursor(0,0);
180- int ot=o.top;
181- int os=mainMenu.sel;*/
182- int remain=mainMenu.scrollY (o,-stv);// assuming its main menu
183- /* tft.print("top: ");tft.print(ot);tft.print(" sel: ");tft.println(os);
184- tft.print("scroll ");tft.print(stv);tft.print(" remain:");tft.println(remain);
185- tft.print("top: ");tft.print(o.top);tft.print(" sel: ");tft.println(mainMenu.sel);
186- selectLCD();*/
187- mainMenu.printMenu (o, false );
188- }
189-
190- void scrollDown_test (prompt &p,menuOut &o,Stream &i) {
191- setValue (stv,p,o,i," dist:" ," Pixels" ,1 ,0 ,16 );
192- // selectTFT();
193- // tft.fillScreen(BLACK);tft.setCursor(0,0);
194- // int ot=o.top;
195- // int os=mainMenu.sel;
196- int remain=mainMenu.scrollY (o,stv);// assuming its main menu
197- /* tft.print("top: ");tft.print(ot);tft.print(" sel: ");tft.println(os);
198- tft.print("scroll ");tft.print(stv);tft.print(" remain:");tft.println(remain);
199- tft.print("top: ");tft.print(o.top);tft.print(" sel: ");tft.println(mainMenu.sel);
200- selectLCD();*/
201- mainMenu.printMenu (o, false );
202- }
203-
204161// the quadEncoder
205162quadEncoder quadEncoder (encA,encB);// simple quad encoder driver
206163quadEncoderStream enc (quadEncoder,5 );// simple quad encoder fake Stream
@@ -230,7 +187,7 @@ menuPrint menuSerialOut(Serial);//describe output device
230187
231188// ///////////////////////////////////////////////////////////////////////
232189void setup () {
233- mainMenu.data [4 ]->enabled =false ;// disabling option
190+ mainMenu.data [2 ]->enabled =false ;// disabling option
234191
235192 Serial.begin (9600 );
236193 Serial.println (" menu system test" );
0 commit comments