Skip to content

Conversation

@Kate-hey
Copy link

@Kate-hey Kate-hey commented Jan 11, 2026

Summary

This PR adds several UI improvements for the LilyGo T-Lora Pager:

1. Alt+Encoder Message Scrolling

  • Hold the Sym (Alt) key and rotate the encoder to scroll through messages
  • Scrolls 80 pixels per encoder tick with smooth animation
  • Only active when viewing the messages panel

2. Native 480x222 UI Resolution

  • Implements full TFTView_480x222 class with native resolution support
  • Removes non-uniform scaling (was 1.5x horizontal, 0.925x vertical)
  • Eliminates stretched/distorted UI appearance
  • UI now renders pixel-perfect at the display's native resolution

3. Alert Auto-Dismiss

  • Alert messages (e.g., "No map tiles found on SDCard!") now auto-dismiss after 3 seconds
  • Alerts can still be dismissed immediately by tapping
  • Prevents alerts from blocking UI interaction indefinitely

4. Sym/Alt Modifier Visual Indicator

  • Displays orange "S" at bottom-left of screen when Sym key is pressed
  • Indicator disappears when any other key is pressed (one-shot behavior)
  • Provides visual feedback so users know when modifier is active

Files Changed

Input Driver (Sym Indicator + Scrolling):

  • include/input/I2CKeyboardInputDriver.h - Added ScrollCallback and AltIndicatorCallback
  • source/input/I2CKeyboardInputDriver.cpp - Implement callbacks
  • source/input/RotaryEncoderInputDriver.cpp - Check alt state for scroll

480x222 Native UI:

  • include/graphics/view/TFT/TFTView_480x222.h - Full class declaration
  • source/graphics/TFT/TFTView_480x222.cpp - Full implementation (~7,400 lines)
  • source/graphics/TFT/Themes.cpp - Added VIEW_480x222 compilation flag
  • include/graphics/driver/LGFXDriver.h - Removed scaling code

View Updates (Alert + Scrolling + Indicator):

  • source/graphics/TFT/TFTView_320x240.cpp - All features
  • source/graphics/TFT/TFTView_480x222.cpp - All features

Test Plan

  • Build: pio run -e tlora-pager-tft
  • Flash to T-Lora Pager device
  • Verify UI renders at full 480x222 without stretching
  • Test Sym+encoder scrolling in messages panel
  • Navigate to Maps (without SD card) and verify alert auto-dismisses after 3 seconds
  • Press Sym key and verify orange "S" appears at bottom-left
  • Test all screens: Home, Nodes, Messages, Map, Settings

🤖 Generated with Claude Code

Kate-hey and others added 2 commits January 11, 2026 12:40
- Add RotaryEncoderInputDriver for quadrature encoder input
- Add ScrollCallback mechanism to I2CKeyboardInputDriver
- Implement alt+encoder scrolling in messages panel
- When Sym key is held, encoder scrolls messages instead of navigating

Co-Authored-By: Claude <[email protected]>
- Add TFTView header declarations for focus event handlers
- Update I2CKeyboardScanner to avoid I2C conflicts on T-Lora Pager
- Add LGFXDriver improvements
- Update library.json dependencies
- Minor TFTView_480x222 fix

Co-Authored-By: Claude <[email protected]>
@CLAassistant
Copy link

CLAassistant commented Jan 11, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulations for your first pull request

- Implement full TFTView_480x222 class with native 480x222 resolution
- Remove non-uniform scaling code from LGFXDriver.h (was 1.5x/0.925x)
- Add VIEW_480x222 to Themes.cpp compilation conditions
- Add 3-second auto-dismiss timer to messageAlert() for both views

This eliminates the stretched/distorted UI appearance and makes the
"No map tiles found" alert automatically disappear after 3 seconds.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@Kate-hey Kate-hey changed the title [Liliygo T-Lora Pager] Feature/tlora pager scrollwheel [LilyGo T-Lora Pager] UI Improvements: Native 480x222, Scrolling, Alert Timeout Jan 11, 2026
- Display orange "S" at bottom-left when Sym key is pressed
- Indicator disappears when any other key is pressed (one-shot)
- Added AltIndicatorCallback mechanism to I2CKeyboardInputDriver
- Provides visual feedback for modifier state

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@Kate-hey Kate-hey changed the title [LilyGo T-Lora Pager] UI Improvements: Native 480x222, Scrolling, Alert Timeout feat(tlora-pager): Add native 480x222 UI, scrolling, alert timeout, sym indicator Jan 11, 2026
Kate-hey and others added 3 commits January 11, 2026 15:19
- Reverse flex flow on chats_panel so encoder clockwise moves UP (to newer chats)
- Add red message count badge on Messages button showing unread count
- Use bolder font (montserrat_20) for Sym indicator and message badge

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add static requestWake()/isWakeRequested()/clearWakeRequest() to DisplayDriver
  for thread-safe wake requests from external contexts
- Check wake request flag in LGFXDriver power save loop alongside GPIO/activity
- Add InputEventCallback to I2CKeyboardInputDriver to notify firmware on keypress
- Call lv_display_trigger_activity() on keyboard input to reset LVGL inactivity

This enables TFT devices to properly wake from power save when receiving
messages or keyboard input via the firmware's PowerFSM callbacks.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@mverch67 mverch67 marked this pull request as draft January 12, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants