Skip to content

Commit 8dc0669

Browse files
author
dave
committed
Prepare release 2.2
1 parent 3802283 commit 8dc0669

21 files changed

+67
-32
lines changed

examples/analogDfRobot/analogDfRobot.emf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@
180180
"saveToSrc": false,
181181
"useCppMain": false,
182182
"eepromDefinition": "",
183-
"authenticatorDefinition": ""
183+
"authenticatorDefinition": "",
184+
"projectIoExpanders": [
185+
"deviceIO:"
186+
]
184187
}
185188
}

examples/analogDfRobot/analogDfRobot_menu.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,16 @@
1919
#include <ScrollChoiceMenuItem.h>
2020
#include <RuntimeMenuItem.h>
2121
#include <EditableLargeNumberMenuItem.h>
22+
#include <IoAbstraction.h>
2223

2324
// variables we declare that you may need to access
2425
extern const PROGMEM ConnectorLocalInfo applicationInfo;
2526
extern LiquidCrystal lcd;
2627
extern LiquidCrystalRenderer renderer;
2728

29+
// Any externals needed by IO expanders, EEPROMs etc
30+
31+
2832
// Global Menu Item exports
2933
extern AnalogMenuItem menuCommits;
3034
extern ScrollChoiceMenuItem menuChooseItem;

examples/esp32Amplifier/EthernetTransport.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ void EthernetTagValTransport::flush() {
3030
if((int)client.write(writeBuffer, writeBufferPos) == writeBufferPos) {
3131
serdebugF2("Buffer written ", writeBufferPos);
3232
writeBufferPos = 0;
33-
client.flush();
34-
}
33+
client.flush();
34+
}
3535
else {
36+
writeBufferPos = 0;
3637
close();
3738
}
3839
}

examples/esp32Amplifier/ThemeCoolBlueModern.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
/**
2+
* Cool blue modern theme by TheCodersCorner.com. This is part of the standard themes shipped with TcMenu.
3+
* This file will not be updated by the designer, you can edit.
4+
*/
15
#ifndef THEME_COOL_BLUE
26
#define THEME_COOL_BLUE
37

48
#include <graphics/BaseGraphicalRenderer.h>
59

6-
const color_t coolBlueTitlePalette[] = {RGB(0,0,0), RGB(20,132,255), RGB(192,192,192), RGB(0,133,255)};
10+
const color_t coolBlueTitlePalette[] = {RGB(0,0,0), RGB(20,132,255), RGB(192,192,192), RGB(64, 64, 64)};
711
const color_t coolBlueItemPalette[] = {RGB(255, 255, 255), RGB(0,64,135), RGB(20,133,255), RGB(31,100,178)};
812
const color_t coolBlueActionPalette[] = {RGB(255, 255, 255), RGB(0,45,120), RGB(20,133,255), RGB(31,100,178)};
913

examples/esp32Amplifier/esp32Amplifier.emf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,9 @@
511511
"saveToSrc": false,
512512
"useCppMain": true,
513513
"eepromDefinition": "eeprom:",
514-
"authenticatorDefinition": "rom:200:6"
514+
"authenticatorDefinition": "rom:200:6",
515+
"projectIoExpanders": [
516+
"deviceIO:"
517+
]
515518
}
516519
}

examples/esp32Amplifier/esp32Amplifier_menu.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <RemoteMenuItem.h>
2121
#include <RuntimeMenuItem.h>
2222
#include <ScrollChoiceMenuItem.h>
23+
#include <IoAbstraction.h>
2324
#include <ArduinoEEPROMAbstraction.h>
2425
#include <RemoteAuthentication.h>
2526

@@ -36,6 +37,9 @@ extern EthernetInitialisation ethernetInitialisation;
3637
extern WiFiServer server2;
3738
extern EthernetInitialisation ethernetInitialisation2;
3839

40+
// Any externals needed by IO expanders, EEPROMs etc
41+
42+
3943
// Global Menu Item exports
4044
extern EepromAuthenticationInfoMenuItem menuConnectivityAuthenticator;
4145
extern RemoteMenuItem menuConnectivityIoTMonitor;

examples/esp32Amplifier/tcMenuTfteSpi.cpp

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

1515

1616
#include "tcMenuTfteSpi.h"
17-
#include <TfT_eSPI.h>
17+
#include <TFT_eSPI.h>
1818

1919
TfteSpiDrawable::TfteSpiDrawable(TFT_eSPI *tft, int spriteHeight) : tft(tft), spriteWithConfig(nullptr), spriteHeight(spriteHeight) {}
2020

examples/esp32SimHub/ThemeCoolBlueTraditional.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
// tcMenu drawing properties take a 4 color palette for items, titles and actions.
99
// this renderer shares the color configuration for items and actions.
10-
color_t coolBlueTitlePalette[] = {RGB(0,0,0), RGB(20,132,255), RGB(192,192,192), RGB(0,133,255)};
11-
color_t coolBlueItemPalette[] = {RGB(255, 255, 255), RGB(0,64,135), RGB(20,133,255), RGB(31,100,178)};
10+
const color_t coolBlueTitlePalette[] = {RGB(0,0,0), RGB(20,132,255), RGB(192,192,192), RGB(64, 64, 64)};
11+
const color_t coolBlueItemPalette[] = {RGB(255, 255, 255), RGB(0,64,135), RGB(20,133,255), RGB(31,100,178)};
1212

1313
void installCoolBlueTraditionalTheme(GraphicsDeviceRenderer& bgr, const MenuFontDef& itemFont, const MenuFontDef& titleFont, bool needEditingIcons) {
1414
// first we keep a reference to the screen size, and set the dimensions on the renderer.

examples/esp32SimHub/esp32SimHub.emf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,9 @@
388388
"saveToSrc": false,
389389
"useCppMain": false,
390390
"eepromDefinition": "",
391-
"authenticatorDefinition": ""
391+
"authenticatorDefinition": "",
392+
"projectIoExpanders": [
393+
"deviceIO:"
394+
]
392395
}
393396
}

examples/esp32SimHub/esp32SimHub.ino

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "DashCustomDrawing.h"
3636
#include "RobotoMonoBold60pt.h"
3737
#include <Fonts/FreeSans18pt7b.h>
38+
#include <tcMenuVersion.h>
3839

3940
// here we pulsate an LED using the ESP32's DAC
4041
const int dacPin = 32;
@@ -80,12 +81,13 @@ void setup() {
8081
});
8182

8283
setTitlePressedCallback([](int id) {
83-
auto* dlg = renderer.getDialog();
84-
if(dlg && !dlg->isInUse()) {
85-
dlg->setButtons(BTNTYPE_NONE, BTNTYPE_OK);
84+
withMenuDialogIfAvailable([](MenuBasedDialog* dlg) {
85+
dlg->setButtons(BTNTYPE_OK, BTNTYPE_NONE);
8686
dlg->show(applicationInfo.name, true);
87-
dlg->copyIntoBuffer("by theCodersCorner");
88-
}
87+
char szVersion[10];
88+
tccore::copyTcMenuVersion(szVersion, sizeof szVersion);
89+
dlg->copyIntoBuffer(szVersion);
90+
});
8991
});
9092

9193
//

0 commit comments

Comments
 (0)