Add touch gesture support and LilyGo T5 S3 board

Implements bottom-edge swipe-up gesture detection and delayed touch-select with tracking state. Adds isTouchTapCandidate() to distinguish taps from swipes. Includes LilyGo T5 S3 board configuration with USB CDC logging transport for boards where Serial operator bool reports false incorrectly.
This commit is contained in:
Justin Mitchell
2026-06-19 13:39:10 -04:00
parent 6648a980cb
commit 526cf1b6f9
17 changed files with 248 additions and 62 deletions
+2 -3
View File
@@ -181,7 +181,7 @@ void HomeActivity::loop() {
// Tap a menu button to select + activate it. The button menu registers
// menu-local ids (drawn with selectorIndex offset by recentBooks.size()), so map
// back into the global selector space. Touch-down shows it selected; release opens.
// back into the global selector space.
int downId = -1;
if (mappedInput.wasItemTouchedDown(downId)) {
selectorIndex = static_cast<int>(recentBooks.size()) + downId;
@@ -274,8 +274,7 @@ void HomeActivity::render(RenderLock&&) {
const int menuY = metrics.homeTopPadding + metrics.homeCoverTileHeight + metrics.homeMenuTopOffset;
const int bottomReserve = (BaseTheme::showButtonHints() ? metrics.buttonHintsHeight : 0) + metrics.verticalSpacing;
GUI.drawButtonMenu(
renderer, Rect{0, menuY, pageWidth, pageHeight - menuY - bottomReserve},
static_cast<int>(menuItems.size()),
renderer, Rect{0, menuY, pageWidth, pageHeight - menuY - bottomReserve}, static_cast<int>(menuItems.size()),
metrics.homeContinueReadingInMenu ? selectorIndex : selectorIndex - recentBooks.size(),
[&menuItems](int index) { return std::string(menuItems[index]); },
[&menuIcons](int index) { return menuIcons[index]; });