Skip to content

Commit 57b2132

Browse files
committed
examples updated
1 parent e1c422b commit 57b2132

File tree

5 files changed

+27
-23
lines changed

5 files changed

+27
-23
lines changed

examples/arduino32/piPicoTftTouch/piPicoTftEncoder.emf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@
320320
"type": "runtimeList",
321321
"item": {
322322
"initialRows": 0,
323+
"listCreationMode": "CUSTOM_RTCALL",
323324
"name": "Root List",
324325
"variableName": "RootList",
325326
"id": 17,
@@ -336,7 +337,6 @@
336337
"embeddedPlatform": "ARDUINO32",
337338
"lastDisplayUuid": "e6342680-6fab-4d1b-ac08-ce8dbfc0974c",
338339
"lastInputUuid": "89cd7f70-0457-4884-97c2-0db904ccb0ba",
339-
"lastRemoteUuid": "2c101fec-1f7d-4ff3-8d2b-992ad41e7fcb",
340340
"lastRemoteUuids": [
341341
"2c101fec-1f7d-4ff3-8d2b-992ad41e7fcb"
342342
],
@@ -461,8 +461,8 @@
461461
}
462462
],
463463
"namingRecursive": true,
464-
"saveToSrc": false,
465464
"useCppMain": false,
465+
"saveLocation": "ALL_TO_CURRENT",
466466
"usingSizedEEPROMStorage": false,
467467
"eepromDefinition": "",
468468
"authenticatorDefinition": "",
@@ -474,5 +474,6 @@
474474
},
475475
"packageNamespace": "",
476476
"appIsModular": false
477-
}
477+
},
478+
"stringLists": []
478479
}

examples/arduino32/piPicoTftTouch/piPicoTftTouch_menu.cpp

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ MenuTouchScreenManager touchScreen(&touchInterrogator, &renderer, touchOrientati
2626
tcextras::IoaTouchScreenCalibrator touchCalibrator(&touchScreen, &renderer, 400);
2727

2828
// Global Menu Item declarations
29-
ListRuntimeMenuItem menuRootList(17, 0, fnRootListRtCall, NULL);
29+
const AnyMenuInfo minfoRootList = { "Root List", 17, 0xffff, 0, NO_CALLBACK };
30+
ListRuntimeMenuItem menuRootList(&minfoRootList, 0, fnRootListRtCall, nullptr, INFO_LOCATION_PGM);
3031
const AnyMenuInfo minfoDialogs = { "Dialogs", 12, 0xffff, 0, onShowDialogs };
3132
ActionMenuItem menuDialogs(&minfoDialogs, &menuRootList, INFO_LOCATION_PGM);
3233
RENDERING_CALLBACK_NAME_OVERRIDDEN(fnStatusInfoRtCall, infoRenderingRtCall, "Info", -1)
33-
TextMenuItem menuStatusInfo(fnStatusInfoRtCall, "", 19, 5, NULL);
34+
TextMenuItem menuStatusInfo(fnStatusInfoRtCall, "", 19, 5, nullptr);
3435
AnyMenuInfo minfoStatusRestart = { "Restart", 11, 0xffff, 0, onRestart };
3536
ActionMenuItem menuStatusRestart(&minfoStatusRestart, &menuStatusInfo, INFO_LOCATION_RAM);
3637
const FloatMenuInfo minfoStatusLineVoltage = { "Line Voltage", 10, 0xffff, 2, NO_CALLBACK };
@@ -48,16 +49,16 @@ EnumMenuItem menuStatusAmpStatus(&minfoStatusAmpStatus, 0, &menuStatusAmpPower,
4849
const SubMenuInfo minfoStatus = { "Status", 7, 0xffff, 0, NO_CALLBACK };
4950
BackMenuItem menuBackStatus(&minfoStatus, &menuStatusAmpStatus, INFO_LOCATION_PGM);
5051
SubMenuItem menuStatus(&minfoStatus, &menuBackStatus, &menuDialogs, INFO_LOCATION_PGM);
51-
RENDERING_CALLBACK_NAME_INVOKE(fnSettingsNlgeRtCall, largeNumItemRenderFn, "NLge", -1, NO_CALLBACK)
52-
EditableLargeNumberMenuItem menuSettingsNlge(fnSettingsNlgeRtCall, LargeFixedNumber(8, 0, 0U, 0U, false), 18, true, NULL);
53-
RENDERING_CALLBACK_NAME_INVOKE(fnSettingsLargeNumRtCall, largeNumItemRenderFn, "LargeNum", -1, NO_CALLBACK)
54-
EditableLargeNumberMenuItem menuSettingsLargeNum(fnSettingsLargeNumRtCall, LargeFixedNumber(8, 3, 100U, 500U, false), 16, false, &menuSettingsNlge);
55-
RENDERING_CALLBACK_NAME_INVOKE(fnSettingsRGBRtCall, rgbAlphaItemRenderFn, "RGB", -1, NO_CALLBACK)
56-
Rgb32MenuItem menuSettingsRGB(fnSettingsRGBRtCall, RgbColor32(0, 0, 0), 15, false, &menuSettingsLargeNum);
57-
RENDERING_CALLBACK_NAME_INVOKE(fnSettingsIPRtCall, ipAddressRenderFn, "IP", 19, NO_CALLBACK)
58-
IpAddressMenuItem menuSettingsIP(fnSettingsIPRtCall, IpAddressStorage(192, 168, 0, 33), 14, &menuSettingsRGB);
59-
RENDERING_CALLBACK_NAME_INVOKE(fnSettingsTextRtCall, textItemRenderFn, "Text", 9, NO_CALLBACK)
60-
TextMenuItem menuSettingsText(fnSettingsTextRtCall, "hello", 13, 10, &menuSettingsIP);
52+
const AnyMenuInfo minfoSettingsNlge = { "NLge", 18, 0xffff, 0, NO_CALLBACK };
53+
EditableLargeNumberMenuItem menuSettingsNlge(&minfoSettingsNlge, LargeFixedNumber(8, 0, 0U, 0U, false), true, nullptr, INFO_LOCATION_PGM);
54+
const AnyMenuInfo minfoSettingsLargeNum = { "LargeNum", 16, 0xffff, 0, NO_CALLBACK };
55+
EditableLargeNumberMenuItem menuSettingsLargeNum(&minfoSettingsLargeNum, LargeFixedNumber(8, 3, 100U, 500U, false), false, &menuSettingsNlge, INFO_LOCATION_PGM);
56+
const AnyMenuInfo minfoSettingsRGB = { "RGB", 15, 0xffff, 0, NO_CALLBACK };
57+
Rgb32MenuItem menuSettingsRGB(&minfoSettingsRGB, RgbColor32(0, 0, 0), false, &menuSettingsLargeNum, INFO_LOCATION_PGM);
58+
const AnyMenuInfo minfoSettingsIP = { "IP", 14, 19, 0, NO_CALLBACK };
59+
IpAddressMenuItem menuSettingsIP(&minfoSettingsIP, IpAddressStorage(192, 168, 0, 33), &menuSettingsRGB, INFO_LOCATION_PGM);
60+
const AnyMenuInfo minfoSettingsText = { "Text", 13, 9, 0, NO_CALLBACK };
61+
TextMenuItem menuSettingsText(&minfoSettingsText, "hello", 10, &menuSettingsIP, INFO_LOCATION_PGM);
6162
const BooleanMenuInfo minfoSettingsProtection = { "Protection", 6, 0xffff, 1, NO_CALLBACK, NAMING_ON_OFF };
6263
BooleanMenuItem menuSettingsProtection(&minfoSettingsProtection, false, &menuSettingsText, INFO_LOCATION_PGM);
6364
const AnalogMenuInfo minfoSettingsMaxOnVolume = { "Max On Volume", 5, 7, 255, NO_CALLBACK, -180, 2, "dB" };

examples/arduino32/piPicoTftTouch/tcMenuTfteSpi.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@
1313
*/
1414

1515
#include "tcMenuTfteSpi.h"
16-
#include "tcUnicodeHelper.h"
16+
#include "tcUnicodeTFT_eSPI.h"
1717
#include <TFT_eSPI.h>
1818

1919
using namespace iotouch;
20+
using namespace tcgfx;
2021

2122
TfteSpiDrawable::TfteSpiDrawable(TFT_eSPI *tft, int spriteHeight) : tft(tft), spriteWithConfig(nullptr), spriteHeight(spriteHeight) {}
2223

@@ -110,7 +111,7 @@ void TfteSpiDrawable::fontPtrToNum(const void* font, int mag) {
110111
}
111112

112113
UnicodeFontHandler *TfteSpiDrawable::createFontHandler() {
113-
return fontHandler = new UnicodeFontHandler(tft, tccore::ENCMODE_UTF8);
114+
return fontHandler = new UnicodeFontHandler(newTFT_eSPITextPipeline(tft), tccore::ENCMODE_UTF8);
114115
}
115116

116117
//
@@ -126,7 +127,7 @@ bool TftSpriteAndConfig::initSprite(const Coord &spriteWhere, const Coord &sprit
126127
if(spriteSize.x > size.x || spriteSize.y > size.y) return false;
127128

128129
if(root->isTcUnicodeEnabled() && fontHandler == nullptr) {
129-
fontHandler = new UnicodeFontHandler(&sprite, tccore::ENCMODE_UTF8);
130+
fontHandler = new UnicodeFontHandler(newTFT_eSPITextPipeline(&sprite), tccore::ENCMODE_UTF8);
130131
}
131132

132133
// create the sprite if needed

examples/arduino32/picoAdafruitDashboard/generated/picoAdafruitDashboard_menu.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ GraphicsDeviceRenderer renderer(30, applicationInfo.name, &gfxDrawable);
2222

2323
// Global Menu Item declarations
2424
const PROGMEM BooleanMenuInfo minfoSettingsCheckBox = { "CheckBox", 9, 0xffff, 1, NO_CALLBACK, NAMING_CHECKBOX };
25-
BooleanMenuItem menuSettingsCheckBox(&minfoSettingsCheckBox, false, NULL, INFO_LOCATION_PGM);
25+
BooleanMenuItem menuSettingsCheckBox(&minfoSettingsCheckBox, false, nullptr, INFO_LOCATION_PGM);
2626
const PROGMEM BooleanMenuInfo minfoSettingsYesNo = { TC_I18N_MENU_8_NAME, 8, 0xffff, 1, NO_CALLBACK, NAMING_YES_NO };
2727
BooleanMenuItem menuSettingsYesNo(&minfoSettingsYesNo, false, &menuSettingsCheckBox, INFO_LOCATION_PGM);
28-
RENDERING_CALLBACK_NAME_INVOKE(fnSettingsRGBRtCall, rgbAlphaItemRenderFn, TC_I18N_MENU_7_NAME, -1, NO_CALLBACK)
29-
Rgb32MenuItem menuSettingsRGB(fnSettingsRGBRtCall, RgbColor32(0, 0, 0), 7, false, &menuSettingsYesNo);
28+
const PROGMEM AnyMenuInfo minfoSettingsRGB = { TC_I18N_MENU_7_NAME, 7, 0xffff, 0, NO_CALLBACK };
29+
Rgb32MenuItem menuSettingsRGB(&minfoSettingsRGB, RgbColor32(0, 0, 0), false, &menuSettingsYesNo, INFO_LOCATION_PGM);
3030
const PROGMEM AnyMenuInfo minfoSettingsAction = { "Action", 6, 0xffff, 0, onSettingsAction };
3131
ActionMenuItem menuSettingsAction(&minfoSettingsAction, &menuSettingsRGB, INFO_LOCATION_PGM);
3232
const PROGMEM SubMenuInfo minfoSettings = { TC_I18N_MENU_5_NAME, 5, 0xffff, 0, NO_CALLBACK };
3333
BackMenuItem menuBackSettings(&minfoSettings, &menuSettingsAction, INFO_LOCATION_PGM);
34-
SubMenuItem menuSettings(&minfoSettings, &menuBackSettings, NULL, INFO_LOCATION_PGM);
34+
SubMenuItem menuSettings(&minfoSettings, &menuBackSettings, nullptr, INFO_LOCATION_PGM);
3535
const PROGMEM BooleanMenuInfo minfoPower = { "Power", 4, 0xffff, 1, NO_CALLBACK, NAMING_ON_OFF };
3636
BooleanMenuItem menuPower(&minfoPower, false, &menuSettings, INFO_LOCATION_PGM);
3737
const char enumStrEnum_0[] PROGMEM = TC_I18N_MENU_3_ENUM_0;

examples/arduino32/picoAdafruitDashboard/picoAdafruitDashboard.emf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,5 +325,6 @@
325325
},
326326
"packageNamespace": "",
327327
"appIsModular": false
328-
}
328+
},
329+
"stringLists": []
329330
}

0 commit comments

Comments
 (0)