Skip to content

Commit 8ac50a6

Browse files
author
dave
committed
Example updates for 2.3
1 parent f7262a7 commit 8ac50a6

File tree

10 files changed

+34
-745
lines changed

10 files changed

+34
-745
lines changed

examples/dynamicMenuItems/dynamicMenuItems.emf

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@
282282
},
283283
{
284284
"name": "DISPLAY_WIDTH",
285-
"latestValue": "160",
285+
"latestValue": "128",
286286
"subsystem": "DISPLAY"
287287
},
288288
{
@@ -292,17 +292,17 @@
292292
},
293293
{
294294
"name": "DISPLAY_RESET_PIN",
295-
"latestValue": "3",
295+
"latestValue": "-1",
296296
"subsystem": "DISPLAY"
297297
},
298298
{
299299
"name": "DISPLAY_CS_PIN",
300-
"latestValue": "6",
300+
"latestValue": "1",
301301
"subsystem": "DISPLAY"
302302
},
303303
{
304304
"name": "DISPLAY_RS_PIN",
305-
"latestValue": "7",
305+
"latestValue": "0",
306306
"subsystem": "DISPLAY"
307307
},
308308
{
@@ -315,6 +315,11 @@
315315
"latestValue": "-1",
316316
"subsystem": "DISPLAY"
317317
},
318+
{
319+
"name": "ST7735_TAB_TYPE",
320+
"latestValue": "INITR_REDTAB",
321+
"subsystem": "DISPLAY"
322+
},
318323
{
319324
"name": "DISPLAY_ROTATION",
320325
"latestValue": "0",
@@ -326,33 +331,28 @@
326331
"subsystem": "DISPLAY"
327332
},
328333
{
329-
"name": "PULLUP_LOGIC",
330-
"latestValue": "true",
331-
"subsystem": "INPUT"
332-
},
333-
{
334-
"name": "INTERRUPT_SWITCHES",
335-
"latestValue": "true",
334+
"name": "SW_POLLING_MODE",
335+
"latestValue": "SWITCHES_POLL_EVERYTHING",
336336
"subsystem": "INPUT"
337337
},
338338
{
339339
"name": "SWITCH_IODEVICE",
340-
"latestValue": "io8574",
340+
"latestValue": "devicePins",
341341
"subsystem": "INPUT"
342342
},
343343
{
344344
"name": "ENCODER_PIN_A",
345-
"latestValue": "7",
345+
"latestValue": "6",
346346
"subsystem": "INPUT"
347347
},
348348
{
349349
"name": "ENCODER_PIN_B",
350-
"latestValue": "6",
350+
"latestValue": "5",
351351
"subsystem": "INPUT"
352352
},
353353
{
354354
"name": "ENCODER_PIN_OK",
355-
"latestValue": "5",
355+
"latestValue": "9",
356356
"subsystem": "INPUT"
357357
},
358358
{
@@ -365,6 +365,11 @@
365365
"latestValue": "-1",
366366
"subsystem": "INPUT"
367367
},
368+
{
369+
"name": "PULLUP_LOGIC",
370+
"latestValue": "true",
371+
"subsystem": "INPUT"
372+
},
368373
{
369374
"name": "ENCODER_IS_QUARTER_CYCLE",
370375
"latestValue": "false",
@@ -409,6 +414,10 @@
409414
"projectIoExpanders": [
410415
"deviceIO:",
411416
"pcf8574:io8574:32:0"
412-
]
417+
],
418+
"menuInMenuCollection": {
419+
"menuDefinitions": []
420+
},
421+
"packageNamespace": ""
413422
}
414423
}

examples/dynamicMenuItems/dynamicMenuItems.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
/**
22
* This example shows how to create scroll choices, lists, and dynamically add items to both dialogs and existing menus
3-
* at runtime. Although it's set up to run on SAMD/MKR there is no reason it could not be easily reconfigured for any
3+
* at runtime.
4+
*
5+
* Test environment: Seeed MG126 - Adafruit 128x128 display, encoder on device pins.
6+
*
7+
* Although it's set up to run on SAMD/MKR there is no reason it could not be easily reconfigured for any
48
* other board.
59
*/
610

examples/dynamicMenuItems/dynamicMenuItems_menu.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// Global variable declarations
1616
const ConnectorLocalInfo applicationInfo = { "Dynamic Menus", "5f22995e-8da2-49c4-9ec8-d055901003af" };
1717
IoAbstractionRef ioexp_io8574 = ioFrom8574(0x20, 0);
18-
Adafruit_ST7735 gfx(6, 7, 3);
18+
Adafruit_ST7735 gfx(1, 0, -1);
1919
AdafruitDrawable gfxDrawable(&gfx);
2020
GraphicsDeviceRenderer renderer(30, applicationInfo.name, &gfxDrawable);
2121

@@ -69,11 +69,11 @@ void setupMenu() {
6969
// First we set up eeprom and authentication (if needed).
7070

7171
// Code generated by plugins.
72-
gfx.initR(INITR_BLACKTAB);
72+
gfx.initR(INITR_REDTAB);
7373
gfx.setRotation(0);
7474
renderer.setUpdatesPerSecond(5);
75-
switches.initialiseInterrupt(ioexp_io8574, true);
76-
menuMgr.initForEncoder(&renderer, &menuMainPower, 7, 6, 5);
75+
switches.init(internalDigitalIo(), SWITCHES_POLL_EVERYTHING, true);
76+
menuMgr.initForEncoder(&renderer, &menuMainPower, 6, 5, 9);
7777
renderer.setTitleMode(BaseGraphicalRenderer::TITLE_FIRST_ROW);
7878
renderer.setUseSliderForAnalog(true);
7979
installCoolBlueTraditionalTheme(renderer, MenuFontDef(nullptr, 1), MenuFontDef(nullptr, 1), true);

examples/unoSsd1306Ascii/README.md

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

examples/unoSsd1306Ascii/src/ssd1306asciiRenderer.cpp

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

0 commit comments

Comments
 (0)