Skip to content

Commit f7262a7

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

File tree

7 files changed

+87
-248
lines changed

7 files changed

+87
-248
lines changed

examples/colorTftEthernet32/EthernetTransport.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ int tcremote::fromWiFiRSSITo4StateIndicator(int strength) {
111111
}
112112

113113
bool EthernetInitialisation::attemptInitialisation() {
114+
#ifdef ARDUINO_ARCH_STM32
115+
// we'll keep checking if the link is up before trying to initialise further
116+
if(Ethernet.linkStatus() == LinkOFF) return false;
117+
#endif
114118
serdebugF("Initialising server ");
115119
this->server->begin();
116120
initialised = true;

examples/colorTftEthernet32/colorTftEthernet.emf

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -449,13 +449,8 @@
449449
"subsystem": "DISPLAY"
450450
},
451451
{
452-
"name": "PULLUP_LOGIC",
453-
"latestValue": "true",
454-
"subsystem": "INPUT"
455-
},
456-
{
457-
"name": "INTERRUPT_SWITCHES",
458-
"latestValue": "true",
452+
"name": "SW_POLLING_MODE",
453+
"latestValue": "SWITCHES_POLL_KEYS_ONLY",
459454
"subsystem": "INPUT"
460455
},
461456
{
@@ -488,6 +483,11 @@
488483
"latestValue": "-1",
489484
"subsystem": "INPUT"
490485
},
486+
{
487+
"name": "PULLUP_LOGIC",
488+
"latestValue": "true",
489+
"subsystem": "INPUT"
490+
},
491491
{
492492
"name": "ENCODER_IS_QUARTER_CYCLE",
493493
"latestValue": "false",
@@ -557,6 +557,10 @@
557557
"projectIoExpanders": [
558558
"pcf8574:io8574:32:0",
559559
"deviceIO:"
560-
]
560+
],
561+
"menuInMenuCollection": {
562+
"menuDefinitions": []
563+
},
564+
"packageNamespace": ""
561565
}
562566
}

examples/colorTftEthernet32/colorTftEthernet32.ino.backup

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

examples/colorTftEthernet32/colorTftEthernet32_menu.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ void setupMenu() {
103103
gfx.initR(INITR_BLACKTAB);
104104
gfx.setRotation(1);
105105
renderer.setUpdatesPerSecond(5);
106-
switches.initialiseInterrupt(ioexp_io8574, true);
106+
switches.init(ioexp_io8574, SWITCHES_POLL_KEYS_ONLY, true);
107107
menuMgr.initForEncoder(&renderer, &menuVoltage, 7, 6, 5);
108108
remoteServer.addConnection(&ethernetConnection);
109109
renderer.setTitleMode(BaseGraphicalRenderer::TITLE_ALWAYS);
@@ -112,5 +112,8 @@ void setupMenu() {
112112

113113
// We have an IoT monitor, register the server
114114
menuIoTMonitor.setRemoteServer(remoteServer);
115+
116+
// We have an EEPROM authenticator, it needs initialising
117+
menuAuthenticator.init();
115118
}
116119

examples/stm32DuinoDemo/stm32DuinoDemo.emf

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -295,13 +295,8 @@
295295
"subsystem": "DISPLAY"
296296
},
297297
{
298-
"name": "PULLUP_LOGIC",
299-
"latestValue": "true",
300-
"subsystem": "INPUT"
301-
},
302-
{
303-
"name": "INTERRUPT_SWITCHES",
304-
"latestValue": "false",
298+
"name": "SW_POLLING_MODE",
299+
"latestValue": "SWITCHES_POLL_EVERYTHING",
305300
"subsystem": "INPUT"
306301
},
307302
{
@@ -334,6 +329,11 @@
334329
"latestValue": "-1",
335330
"subsystem": "INPUT"
336331
},
332+
{
333+
"name": "PULLUP_LOGIC",
334+
"latestValue": "true",
335+
"subsystem": "INPUT"
336+
},
337337
{
338338
"name": "ENCODER_IS_QUARTER_CYCLE",
339339
"latestValue": "false",
@@ -398,6 +398,9 @@
398398
"projectIoExpanders": [
399399
"deviceIO:"
400400
],
401+
"menuInMenuCollection": {
402+
"menuDefinitions": []
403+
},
401404
"packageNamespace": ""
402405
}
403406
}

0 commit comments

Comments
 (0)