Skip to content

Commit 53beaeb

Browse files
committed
fix arduino-ide error
array needs dimension to be static... its a lie but ok
1 parent 890f529 commit 53beaeb

File tree

17 files changed

+27
-27
lines changed

17 files changed

+27
-27
lines changed

examples/ESP32/ClickEncoderTFT.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ MENU(mainMenu, "COPPER TAPE CUTTER", doNothing, noEvent, wrapStyle, FIELD(length
113113
#define DarkerOrange RGB565(255,140,0)
114114

115115
// TFT color table
116-
const colorDef<uint16_t> colors[] MEMMODE = {
116+
const colorDef<uint16_t> colors[6] MEMMODE = {
117117
//{{disabled normal,disabled selected},{enabled normal,enabled selected, enabled editing}}
118118
{{(uint16_t)Black, (uint16_t)Black}, {(uint16_t)Black, (uint16_t)Red, (uint16_t)Red}}, //bgColor
119119
{{(uint16_t)White, (uint16_t)White}, {(uint16_t)White, (uint16_t)White, (uint16_t)White}},//fgColor

examples/Serial/ansiSerial/ansiSerial/ansiSerial.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Print& operator<<(Print&o, Menu::prompt&p) {
3838
// define menu colors --------------------------------------------------------
3939
//each color is in the format:
4040
// {{disabled normal,disabled selected},{enabled normal,enabled selected, enabled editing}}
41-
const colorDef<uint8_t> colors[] MEMMODE={
41+
const colorDef<uint8_t> colors[6] MEMMODE={
4242
{{BLUE,WHITE} ,{BLUE,WHITE,WHITE}},//bgColor
4343
{{BLACK,BLACK} ,{WHITE,BLUE,BLUE}},//fgColor
4444
{{BLACK,BLACK} ,{YELLOW,YELLOW,RED}},//valColor

examples/TFT/TFT/TFT.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ MENU(mainMenu,"Main menu",doNothing,noEvent,wrapStyle
4747

4848
#define ST7735_GRAY RGB565(128,128,128)
4949

50-
const colorDef<uint16_t> colors[] MEMMODE={
50+
const colorDef<uint16_t> colors[6] MEMMODE={
5151
{{ST7735_BLACK,ST7735_BLACK},{ST7735_BLACK,ST7735_BLUE,ST7735_BLUE}},//bgColor
5252
{{ST7735_GRAY,ST7735_GRAY},{ST7735_WHITE,ST7735_WHITE,ST7735_WHITE}},//fgColor
5353
{{ST7735_WHITE,ST7735_BLACK},{ST7735_YELLOW,ST7735_YELLOW,ST7735_RED}},//valColor

examples/TFT_HX8257/TFT_HX8257/TFT_HX8257.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ MENU(mainMenu,"Main menu",doNothing,noEvent,wrapStyle
122122

123123
#define TFT_GREY 0x5AEB
124124

125-
const colorDef<uint16_t> colors[] MEMMODE={
125+
const colorDef<uint16_t> colors[6] MEMMODE={
126126
{{TFT_BLACK,TFT_BLACK},{TFT_BLACK,TFT_BLUE,TFT_BLUE}},//bgColor
127127
{{TFT_GREY,TFT_GREY},{TFT_WHITE,TFT_WHITE,TFT_WHITE}},//fgColor
128128
{{TFT_WHITE,TFT_BLACK},{TFT_YELLOW,TFT_YELLOW,TFT_RED}},//valColor

examples/U8G2/U8G2/U8G2.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ using namespace Menu;
7878
//each color is in the format:
7979
// {{disabled normal,disabled selected},{enabled normal,enabled selected, enabled editing}}
8080
// this is a monochromatic color table
81-
const colorDef<uint8_t> colors[] MEMMODE={
81+
const colorDef<uint8_t> colors[6] MEMMODE={
8282
{{0,0},{0,1,1}},//bgColor
8383
{{1,1},{1,0,0}},//fgColor
8484
{{1,1},{1,0,0}},//valColor

examples/U8GLib/U8GLib/U8GLib.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ MENU(mainMenu,"Main menu",doNothing,noEvent,wrapStyle
139139
//each color is in the format:
140140
// {{disabled normal,disabled selected},{enabled normal,enabled selected, enabled editing}}
141141
// this is a monochromatic color table
142-
const colorDef<uint8_t> colors[] MEMMODE={
142+
const colorDef<uint8_t> colors[6] MEMMODE={
143143
{{0,0},{0,1,1}},//bgColor
144144
{{1,1},{1,0,0}},//fgColor
145145
{{1,1},{1,0,0}},//valColor

examples/UART/uart_menu/uart_menu.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ SoftwareSerial ss(11, 10);
3535
#define C_GREEN 2
3636
//each color is in the format:
3737
// {{disabled normal,disabled selected},{enabled normal,enabled selected, enabled editing}}
38-
const colorDef<uint8_t> colors[] MEMMODE={
38+
const colorDef<uint8_t> colors[6] MEMMODE={
3939
{{C_BLACK,C_BLACK}, {C_BLACK,C_BLUE,C_BLUE}},//bgColor
4040
{{C_GRAY,C_GRAY}, {C_WHITE,C_WHITE,C_WHITE}},//fgColor
4141
{{C_WHITE,C_BLACK}, {C_YELLOW,C_YELLOW,C_RED}},//valColor

examples/UCGLib/UCGLib/UCGLib.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ MENU(mainMenu,"Main menu",doNothing,noEvent,wrapStyle
6868
#define YELLOW {255,255,0}
6969
#define RED {255,0,0}
7070

71-
const colorDef<rgb> colors[] MEMMODE={
71+
const colorDef<rgb> colors[6] MEMMODE={
7272
{{BLACK,BLACK},{BLACK,BLUE,BLUE}},//bgColor
7373
{{GRAY,GRAY},{WHITE,WHITE,WHITE}},//fgColor
7474
{{WHITE,BLACK},{YELLOW,YELLOW,RED}},//valColor

examples/UTFT/UTFT/UTFT.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ MENU(mainMenu,"Main menu",doNothing,noEvent,noStyle
119119
// {{disabled normal,disabled selected},{enabled normal,enabled selected, enabled editing}}
120120
//monochromatic color table
121121

122-
const colorDef<uint16_t> colors[] MEMMODE={
122+
const colorDef<uint16_t> colors[6] MEMMODE={
123123
{{VGA_BLACK,VGA_BLACK},{VGA_BLACK,VGA_BLUE,VGA_BLUE}},//bgColor
124124
{{VGA_GRAY,VGA_GRAY},{VGA_WHITE,VGA_WHITE,VGA_WHITE}},//fgColor
125125
{{VGA_WHITE,VGA_BLACK},{VGA_YELLOW,VGA_YELLOW,VGA_RED}},//valColor

examples/adafruitGfx/eTFT/TFT_eSPI/ArduinoMenu_LilyGo_TTGO_T-display_demo/ArduinoMenu_LilyGo_TTGO_T-display_demo.ino

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)