Skip to content

Commit babd4dc

Browse files
author
dave
committed
examples recompiled ready for release.
1 parent 9c20525 commit babd4dc

File tree

8 files changed

+43
-20
lines changed

8 files changed

+43
-20
lines changed

examples/colorTftEthernet32/colorTftEthernet.emf

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,11 @@
418418
"latestValue": "-1",
419419
"subsystem": "DISPLAY"
420420
},
421+
{
422+
"name": "ST7735_TAB_TYPE",
423+
"latestValue": "INITR_BLACKTAB",
424+
"subsystem": "DISPLAY"
425+
},
421426
{
422427
"name": "DISPLAY_ROTATION",
423428
"latestValue": "1",
@@ -535,8 +540,8 @@
535540
"eepromDefinition": "at24:80:PAGESIZE_AT24C128",
536541
"authenticatorDefinition": "rom:100:6",
537542
"projectIoExpanders": [
538-
"deviceIO:",
539-
"pcf8574:io8574:32:0"
543+
"pcf8574:io8574:32:0",
544+
"deviceIO:"
540545
]
541546
}
542547
}

examples/colorTftEthernet32/colorTftEthernet32.ino.backup

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <SPI.h>
99
#include <IoLogging.h>
1010
#include "ColorEtherenetCustomDraw.h"
11+
#include <tcMenuVersion.h>
1112

1213
// contains the graphical widget title components.
1314
#include "stockIcons/wifiAndConnectionIcons16x12.h"
@@ -55,7 +56,7 @@ const int ledPin = 1;
5556
// when there's a change in communication status (connection or disconnection for example) this gets called.
5657
// see further down in the code where we add this to the remote IoT monitor.
5758
void onCommsChange(CommunicationInfo info) {
58-
if(info.remoteNo == 0) {
59+
if(info.remoteNo == 0U) {
5960
connectedWidget.setCurrentState(info.connected ? 1 : 0);
6061
}
6162
// this relies on logging in IoAbstraction's ioLogging.h, to turn it on visit the file for instructions.
@@ -102,19 +103,29 @@ void setup() {
102103
menuIpAddress.copyValue(sz, sizeof(sz));
103104
Serial.print("Ethernet available on ");Serial.println(sz);
104105

105-
taskManager.scheduleFixedRate(2250, [] {
106+
taskManager.scheduleFixedRate(250, [] {
106107
float a1Value = analogDevice.getCurrentFloat(A1);
107-
menuVoltA1.setFloatValue(a1Value * 3.3);
108+
menuVoltA1.setFloatValue(a1Value * 3.3F);
108109
});
109110

110111
// register the custom drawing handler
111112
renderer.setCustomDrawingHandler(&myCustomDraw);
112113

114+
ioDevicePinMode(switches.getIoAbstraction(), ledPin, OUTPUT);
115+
116+
setTitlePressedCallback([](int id) {
117+
withMenuDialogIfAvailable([](MenuBasedDialog* dlg) {
118+
dlg->setButtons(BTNTYPE_CLOSE, BTNTYPE_NONE);
119+
dlg->showRam("ARM Example", false);
120+
char menuVer[10];
121+
tccore::copyTcMenuVersion(menuVer, sizeof menuVer);
122+
dlg->copyIntoBuffer(menuVer);
123+
});
124+
});
125+
113126
// Start 2nd encoder
114127
Serial.println("Setting up second encoder now");
115128

116-
ioDevicePinMode(switches.getIoAbstraction(), ledPin, OUTPUT);
117-
118129
// here we want the encoder set to the range of values that menuCurrent takes, this is just for example,
119130
// and you could set the range to anything that is required. We use the callback to update the menu item.
120131
secondEncoder = new HardwareRotaryEncoder(encoder2APin, encoder2BPin, [](int encoderValue) {

examples/colorTftEthernet32/colorTftEthernet32_menu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
#include <RuntimeMenuItem.h>
2020
#include <ScrollChoiceMenuItem.h>
2121
#include <RemoteMenuItem.h>
22-
#include <IoAbstraction.h>
2322
#include <IoAbstractionWire.h>
23+
#include <IoAbstraction.h>
2424
#include <EepromAbstractionWire.h>
2525
#include <RemoteAuthentication.h>
2626

examples/keyboardEthernetShield/keyboardEthernetShield.emf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,8 +614,8 @@
614614
"eepromDefinition": "avr:",
615615
"authenticatorDefinition": "rom:100:6",
616616
"projectIoExpanders": [
617-
"mcp23017:io23017:32:2",
618-
"deviceIO:"
617+
"deviceIO:",
618+
"mcp23017:io23017:32:2"
619619
]
620620
}
621621
}

examples/keyboardEthernetShield/keyboardEthernetShield_menu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
#include <ScrollChoiceMenuItem.h>
2121
#include <RemoteMenuItem.h>
2222
#include <EditableLargeNumberMenuItem.h>
23-
#include <IoAbstractionWire.h>
2423
#include <IoAbstraction.h>
24+
#include <IoAbstractionWire.h>
2525
#include <EepromAbstraction.h>
2626
#include <RemoteAuthentication.h>
2727
#include "tcMenuLiquidCrystal.h"

examples/simpleU8g2/simpleU8g2.emf

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,6 @@
168168
"latestValue": "U8G2_R0",
169169
"subsystem": "DISPLAY"
170170
},
171-
{
172-
"name": "YIELDING_WIRE_CB",
173-
"latestValue": "true",
174-
"subsystem": "DISPLAY"
175-
},
176171
{
177172
"name": "DISPLAY_CLOCK_PIN",
178173
"latestValue": "5",
@@ -203,6 +198,11 @@
203198
"latestValue": "10",
204199
"subsystem": "DISPLAY"
205200
},
201+
{
202+
"name": "YIELDING_WIRE_CB",
203+
"latestValue": "true",
204+
"subsystem": "DISPLAY"
205+
},
206206
{
207207
"name": "PULLUP_LOGIC",
208208
"latestValue": "true",
@@ -215,7 +215,7 @@
215215
},
216216
{
217217
"name": "SWITCH_IODEVICE",
218-
"latestValue": "",
218+
"latestValue": "devicePins",
219219
"subsystem": "INPUT"
220220
},
221221
{
@@ -278,6 +278,9 @@
278278
"saveToSrc": false,
279279
"useCppMain": false,
280280
"eepromDefinition": "eeprom:",
281-
"authenticatorDefinition": ""
281+
"authenticatorDefinition": "",
282+
"projectIoExpanders": [
283+
"deviceIO:"
284+
]
282285
}
283286
}

examples/simpleU8g2/simpleU8g2_menu.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@
1616
#include "tcMenuU8g2.h"
1717
#include <RuntimeMenuItem.h>
1818
#include <EditableLargeNumberMenuItem.h>
19+
#include <IoAbstraction.h>
1920
#include <ArduinoEEPROMAbstraction.h>
2021

2122
// variables we declare that you may need to access
2223
extern const PROGMEM ConnectorLocalInfo applicationInfo;
2324
extern U8G2_SH1106_128X64_NONAME_F_SW_I2C gfx;
2425
extern GraphicsDeviceRenderer renderer;
2526

27+
// Any externals needed by IO expanders, EEPROMs etc
28+
29+
2630
// Global Menu Item exports
2731
extern ActionMenuItem menuSettingsSaveSettings;
2832
extern EditableLargeNumberMenuItem menuSettingsSerialNumber;

examples/takeOverDisplay/takeOverDisplay.emf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,8 @@
454454
"eepromDefinition": "at24:80:PAGESIZE_AT24C128",
455455
"authenticatorDefinition": "rom:100:6",
456456
"projectIoExpanders": [
457-
"customIO:io23017",
458-
"deviceIO:"
457+
"deviceIO:",
458+
"customIO:io23017"
459459
]
460460
}
461461
}

0 commit comments

Comments
 (0)