Skip to content

Commit 642939b

Browse files
author
dave
committed
rebuild examples before release.
1 parent 85f5782 commit 642939b

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

examples/esp/esp32s3TftEncoder/esp32s3TftEncoder.emf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@
384384
},
385385
{
386386
"name": "TITLE_SHOW_MODE",
387-
"latestValue": "TITLE_FIRST_ROW",
387+
"latestValue": "NO_TITLE",
388388
"subsystem": "THEME"
389389
},
390390
{

examples/esp/esp32s3TftEncoder/esp32s3TftEncoder.ino

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "stockIcons/directionalIcons.h"
88
#include "app_icondata.h"
99
#include "tcMenuVersion.h"
10+
#include <IoLogging.h>
1011

1112
//
1213
// We use a card layout to present the items, here we demonstrate how to set it up and prepare custom menu items that
@@ -28,9 +29,9 @@ void setupGridLayoutForCardView() {
2829
const Coord iconBatSize(BATTERY_WIDTH, BATTERY_HEIGHT);
2930
factory.addImageToCache(DrawableIcon(menuBattery.getId(), iconBatSize, DrawableIcon::ICON_XBITMAP, batteryIcon40Bits));
3031

31-
factory.addGridPosition(&menuSettings, GridPosition(GridPosition::DRAW_AS_ICON_TEXT, GridPosition::JUSTIFY_CENTER_NO_VALUE, 1, 60));
32-
factory.addGridPosition(&menuMute, GridPosition(GridPosition::DRAW_AS_ICON_TEXT, GridPosition::JUSTIFY_CENTER_NO_VALUE, 2, 60));
33-
factory.addGridPosition(&menuBattery, GridPosition(GridPosition::DRAW_AS_ICON_TEXT, GridPosition::JUSTIFY_CENTER_NO_VALUE, 3, 60));
32+
factory.addGridPosition(&menuSettings, GridPosition(GridPosition::DRAW_AS_ICON_TEXT, GridPosition::JUSTIFY_CENTER_NO_VALUE, 0, 60));
33+
factory.addGridPosition(&menuMute, GridPosition(GridPosition::DRAW_AS_ICON_TEXT, GridPosition::JUSTIFY_CENTER_NO_VALUE, 1, 60));
34+
factory.addGridPosition(&menuBattery, GridPosition(GridPosition::DRAW_AS_ICON_TEXT, GridPosition::JUSTIFY_CENTER_NO_VALUE, 2, 60));
3435

3536
// after adding things to the drawing properties, we must refresh it.
3637
tcgfx::ConfigurableItemDisplayPropertiesFactory::refreshCache();
@@ -41,12 +42,12 @@ void setupGridLayoutForCardView() {
4142
void setup() {
4243
Serial.begin(115200);
4344

45+
serEnableLevel(SER_TCMENU_DEBUG, true);
4446
setupMenu();
4547

4648
// Here we enable the card layout mode for the main menu by first enabling support, then adding the root menu.
4749
// We also set up the item layout for card view by calling our setup function, defined above.
4850
renderer.enableCardLayout(iconLeft, iconRight, nullptr, false);
49-
renderer.setCardLayoutStatusForSubMenu(&rootMenuItem(), true);
5051
setupGridLayoutForCardView();
5152

5253
// We can set a callback for when the title item is pressed on the main menu, here we show the app version

examples/esp/esp32s3TftEncoder/generated/esp32s3TftEncoder_menu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void setupMenu() {
7171
renderer.setUpdatesPerSecond(15);
7272
switches.init(internalDigitalIo(), SWITCHES_NO_POLLING, true);
7373
menuMgr.initForEncoder(&renderer, &menuSettings, 3, 4, 5);
74-
renderer.setTitleMode(BaseGraphicalRenderer::TITLE_FIRST_ROW);
74+
renderer.setTitleMode(BaseGraphicalRenderer::NO_TITLE);
7575
renderer.setUseSliderForAnalog(true);
7676
renderer.enableTcUnicode();
7777
installCoolBlueTraditionalTheme(renderer, MenuFontDef(&OpenSansCyrillicLatin12, 0), MenuFontDef(&OpenSansCyrillicLatin12, 0), true);

src/graphics/BaseGraphicalRenderer.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ uint8_t BaseGraphicalRenderer::setActiveItem(MenuItem *item) {
5959
uint16_t totalHeight = calculateHeightTo(activeIndex, rootItem);
6060
int startRow = 0;
6161
uint16_t adjustedHeight = height + (isLastRowExactFit() ? 0 : 1);
62-
serdebugF4("toth, activeidx, adj ", totalHeight, activeIndex, adjustedHeight);
6362

6463
auto startY = 0;
6564
if(titleMode == TITLE_ALWAYS) {
@@ -68,13 +67,13 @@ uint8_t BaseGraphicalRenderer::setActiveItem(MenuItem *item) {
6867
adjustedHeight -= startY;
6968
totalHeight -= startY;
7069
}
71-
serdebugF4("sy, sr, adj ", startY, startRow, adjustedHeight);
70+
serlogF4(SER_TCMENU_DEBUG, "totH, actIdx, adjH ", totalHeight, activeIndex, adjustedHeight);
7271

7372
while (totalHeight > adjustedHeight) {
7473
totalHeight -= heightOfRow(startRow, true);
7574
startRow++;
7675
}
77-
serdebugF3("sr, th", startRow, totalHeight);
76+
serlogF4(SER_TCMENU_DEBUG, "sy, sr, adj ", startY, startRow, adjustedHeight);
7877

7978
// the screen has moved, we must completely redraw the area, and we need a clear first.
8079
if(drawingLocation.getCurrentOffset() != startRow) {

0 commit comments

Comments
 (0)