@@ -166,7 +166,7 @@ MENU(mainMenu,"Main menu",doNothing,noEvent,wrapStyle
166166#define Yellow RGB565 (255 ,255 ,0 )
167167#define White RGB565 (255 ,255 ,255 )
168168
169- const colorDef<uint16_t> colors[] MEMMODE={
169+ const colorDef<uint16_t> colors[6 ] MEMMODE={
170170 {
171171 {
172172 (uint16_t )Black,
@@ -268,7 +268,7 @@ result idle(menuOut& o,idleEvent e) {
268268 // Show the idle message once
269269 int xpos = gfx.width () / 2 ; // Half the screen width
270270 gfx.fillScreen (Black);
271-
271+
272272 gfx.setTextSize (5 );
273273 gfx.setTextColor (Yellow,Black);
274274 gfx.setTextWrap (false );
@@ -296,7 +296,7 @@ void button_init()
296296 nav.doNav (enterCmd);
297297 }
298298 });
299-
299+
300300 btnUp.setClickHandler ([](Button2 & b) {
301301 // Up
302302 nav.doNav (downCmd); // It's called downCmd because it decreases the index of an array. Visually that would mean the selector goes upwards.
@@ -309,7 +309,7 @@ void button_init()
309309 nav.doNav (escCmd);
310310 }
311311 });
312-
312+
313313 btnDwn.setClickHandler ([](Button2 & b) {
314314 // Down
315315 nav.doNav (upCmd); // It's called upCmd because it increases the index of an array. Visually that would mean the selector goes downwards.
@@ -332,7 +332,7 @@ void setup() {
332332 Serial.print (" ARDUINOMENU DEMO V" );
333333 Serial.print (PROG_VERSION);
334334 Serial.println (" FOR LILYGO TTGO T-DISPLAY" );
335-
335+
336336 nav.idleTask =idle;// point a function to be used when menu is suspended
337337 mainMenu[1 ].disable ();
338338 // outGfx.usePreview=true;//reserve one panel for preview?
@@ -351,17 +351,17 @@ void setup() {
351351 Serial.println (" DONE" );
352352
353353 gfx.setRotation (1 ); // Rotate display a quarter clockwise
354-
354+
355355 gfx.setTextSize (2 );
356356 gfx.setTextWrap (false );
357357 gfx.fillScreen (Black);
358-
358+
359359 Serial.print (" Showing bootlogo... " );
360360 gfx.setSwapBytes (true );
361361 gfx.pushImage (0 , 0 , 240 , 135 , bootlogo);
362362 delay (1000 );
363363 Serial.println (" DONE" );
364-
364+
365365 Serial.print (" Initialize buttons... " );
366366 button_init ();
367367 delay (1000 );
@@ -380,9 +380,9 @@ void setup() {
380380 }
381381
382382 delay (2000 ); // A little bit more delay so that you will be able to see the bootlogo.
383-
383+
384384 Serial.println (" - READY -" );
385-
385+
386386 gfx.fillScreen (Black); // Clear the screen to be ready to draw the menu
387387}
388388
@@ -394,7 +394,7 @@ void loop() {
394394 if (LED_CTRL > 0 ){ // Only set led state when a pinnumber for the external led has been provided.
395395 digitalWrite (LED_CTRL,ledCtrl);
396396 }
397-
397+
398398 // Set blacklight intenisty of screen
399399 ledcWrite (pwmLedChannelTFT, ledBacklight);
400400}
0 commit comments