Skip to content

Commit f3a8cf3

Browse files
committed
examples review
1 parent a111e98 commit f3a8cf3

40 files changed

Lines changed: 99 additions & 144 deletions

File tree

examples/Button/platformio.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111
[platformio]
12-
src_dir=Blink
12+
src_dir=Button
1313
; lib_dir=~/Arduino/Libraries
1414

1515
[env:nanoatmega328]

examples/Confirm/platformio.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ board = nanoatmega328
1818
framework = arduino
1919
upload_port=/dev/ttyUSB*
2020
upload_flags=-V
21-
build_flags = -Wno-comment -Wno-reorder -Wno-strict-aliasing -Wno-builtin-macro-redefined
2221

2322
; [env:teensy31]
2423
; platform = teensy
File renamed without changes.

examples/LCDs/PCF8574/include/readme.txt

Lines changed: 0 additions & 39 deletions
This file was deleted.

examples/SSD1306Ascii/Button_Navigation/Button_Navigation.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ result adjustBrightness() {
8282
int pwm = int(2.55 * float(brightnessValue));
8383
analogWrite(LED_PIN, pwm);
8484
}
85+
return proceed;
8586
}
8687

8788

@@ -147,7 +148,7 @@ MENU(mainMenu, "Main menu", doNothing, noEvent, wrapStyle
147148

148149
//describing a menu output device without macros
149150
//define at least one panel for menu output
150-
const panel panels[] MEMMODE = {{0, 0, 128 / fontW, 64 / fontH}};
151+
constMEM panel panels[] MEMMODE = {{0, 0, 128 / fontW, 64 / fontH}};
151152
navNode* nodes[sizeof(panels) / sizeof(panel)]; //navNodes to store navigation status
152153
panelsList pList(panels, nodes, 1); //a list of panels and nodes
153154
idx_t tops[MAX_DEPTH] = {0, 0}; //store cursor positions for each level

examples/SSD1306Ascii/platformio.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
; http://docs.platformio.org/page/projectconf.html
1010

1111
[platformio]
12-
; src_dir=Button_Navigation
13-
src_dir=SSD1306Ascii
12+
src_dir=Button_Navigation
13+
; src_dir=SSD1306Ascii
1414

1515
[env:adafruit_crickit_m0]
1616
board=adafruit_crickit_m0

examples/Serial/ansiSerial/ansiSerial/ansiSerial.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@ altMENU(menu,birthDate,"Birth",doNothing,noEvent,noStyle,(systemStyles)(_asPad|M
249249
,FIELD(day,"","",1,31,1,0,doNothing,noEvent,wrapStyle)
250250
);
251251

252-
char* constMEM hexDigit MEMMODE="0123456789ABCDEF";
253-
char* constMEM hexNr[] MEMMODE={"0","x",hexDigit,hexDigit};
252+
const char* constMEM hexDigit MEMMODE="0123456789ABCDEF";
253+
const char* constMEM hexNr[] MEMMODE={"0","x",hexDigit,hexDigit};
254254
char buf1[]="0x11";
255255

256256
MENU(mainMenu,"Main menu",doNothing,noEvent,wrapStyle

examples/Serial/serialio/platformio.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ board = nanoatmega328
4141
framework = arduino
4242
; upload_port=/dev/ttyUSB1
4343
upload_flags=-V
44-
build_flags = -DNO_MENU_DEBUG -Wno-strict-aliasing -Wno-sign-compare -Wno-write-strings
44+
build_flags = -DNO_MENU_DEBUG
4545
;
4646
; [env:teensy31]
4747
; platform = teensy

examples/Serial/serialio/serialio/serialio.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ PADMENU(birthDate,"Birth",doNothing,noEvent,noStyle
101101
,FIELD(day,"","",1,31,1,0,doNothing,noEvent,wrapStyle)
102102
);
103103

104-
char* constMEM hexDigit MEMMODE="0123456789ABCDEF";
105-
char* constMEM hexNr[] MEMMODE={"0","x",hexDigit,hexDigit};
104+
const char* constMEM hexDigit MEMMODE="0123456789ABCDEF";
105+
const char* constMEM hexNr[] MEMMODE={"0","x",hexDigit,hexDigit};
106106
char buf1[]="0x11";
107107

108-
char* constMEM alphaNum MEMMODE=" 0123456789.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz,\\|!\"#$%&/()=?~*^+-{}[]€";
109-
char* constMEM alphaNumMask[] MEMMODE={alphaNum};
108+
const char* constMEM alphaNum MEMMODE=" 0123456789.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz,\\|!\"#$%&/()=?~*^+-{}[]€";
109+
const char* constMEM alphaNumMask[] MEMMODE={alphaNum};
110110
char name[]=" ";
111111

112112
MENU(mainMenu,"Main menu",zZz,noEvent,wrapStyle

examples/TFT/TFT/TFT.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ MCU: see TFT library compatibility
1313

1414
#include <TFT.h> // Hardware-specific library
1515
#include <SPI.h>
16+
#include <menu.h>
1617
#include <menuIO/serialOut.h>
1718
#include <menuIO/serialIn.h>
1819
#include <menuIO/tftOut.h>
@@ -33,8 +34,8 @@ using namespace Menu;
3334

3435
TFT tft(CS, DC, RST);
3536

36-
char* constMEM hexDigit MEMMODE="0123456789ABCDEF";
37-
char* constMEM hexNr[] MEMMODE={"0","x",hexDigit,hexDigit};
37+
const char* constMEM hexDigit MEMMODE="0123456789ABCDEF";
38+
const char* constMEM hexNr[] MEMMODE={"0","x",hexDigit,hexDigit};
3839
char buf1[]="0x11";//<-- menu will edit this text
3940

4041
MENU(mainMenu,"Main menu",doNothing,noEvent,wrapStyle

0 commit comments

Comments
 (0)