Skip to content

adds VARIANT_TOUCHSCREEN and ENABLE_TOUCH_INT#10815

Merged
jp-bennett merged 2 commits into
developfrom
variant-touch-int
Jun 30, 2026
Merged

adds VARIANT_TOUCHSCREEN and ENABLE_TOUCH_INT#10815
jp-bennett merged 2 commits into
developfrom
variant-touch-int

Conversation

@jp-bennett

@jp-bennett jp-bennett commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

This lands some of the generic work from the t-watch-ultra PR.

Summary by CodeRabbit

  • New Features
    • Enabled touchscreen support for the T-Beam ESP32 variant.
    • Touch input now wakes the touch polling thread immediately on touch activity.
    • Enhanced touchscreen reliability around ESP32 light sleep so touch resumes more consistently after waking.
  • Bug Fixes
    • Improved touch responsiveness and reduced missed/late touch events by throttling touch polling and adjusting touch event initialization timing.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: cea15993-fd7a-40ee-b184-8264188b26c9

📥 Commits

Reviewing files that changed from the base of the PR and between 591be16 and a87dce6.

📒 Files selected for processing (1)
  • src/input/TouchScreenImpl1.h
💤 Files with no reviewable changes (1)
  • src/input/TouchScreenImpl1.h

📝 Walkthrough

Walkthrough

Adds touch interrupt wake handling in TouchScreenImpl1, a 20ms execution throttle in TouchScreenBase, and variant-based touchscreen gating for T-Beam.

Changes

Touch IRQ and Polling Control

Layer / File(s) Summary
TouchScreen declarations and variant gate
src/input/TouchScreenImpl1.h, src/input/TouchScreenBase.h, variants/esp32/tbeam/variant.h, src/graphics/Screen.cpp
Declares touch interrupt support and ESP32 light-sleep hooks on TouchScreenImpl1, adds the _lastRun state to TouchScreenBase, defines VARIANT_TOUCHSCREEN for the T-Beam variant, and updates Screen.cpp to use that variant gate for touchscreen initialization.
Touch IRQ and light-sleep implementation
src/input/TouchScreenImpl1.cpp
Adds the touch interrupt handler, attaches the interrupt during touchscreen initialization, and detaches and reattaches it around ESP32 light sleep.
Touch polling throttle
src/input/TouchScreenBase.cpp
runOnce() now skips executions closer than 20ms apart, updates _lastRun, and sets the idle polling interval before creating the touch event.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 Tap-tap! The screen now wakes so fast,
With sleepy IRQs that never last.
I hop by throttle, neat and small,
And T-Beam knows touchscreens after all.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is far too brief and omits the template's required sections, testing attestations, and bug-fix details. Replace the placeholder text with the template sections, add the attestations, and note testing, regressions, hardware coverage, and any linked issue.
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change by calling out the new touchscreen variant flag and touch interrupt support.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@jp-bennett jp-bennett added cleanup Code cleanup or refactor hardware-support Hardware related: new devices or modules, problems specific to hardware labels Jun 30, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/input/TouchScreenImpl1.h`:
- Around line 20-34: The TouchScreenImpl1 class declares the _getTouch member
twice, which causes a compilation error; remove the redundant declaration and
keep only one bool (*_getTouch)(int16_t *, int16_t *) member in TouchScreenImpl1
so the class definition is unique and consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6e8bd562-12da-4b6a-a5ef-c8dd64406428

📥 Commits

Reviewing files that changed from the base of the PR and between 8345c2b and 591be16.

📒 Files selected for processing (6)
  • src/graphics/Screen.cpp
  • src/input/TouchScreenBase.cpp
  • src/input/TouchScreenBase.h
  • src/input/TouchScreenImpl1.cpp
  • src/input/TouchScreenImpl1.h
  • variants/esp32/tbeam/variant.h

Comment thread src/input/TouchScreenImpl1.h Outdated
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

⚡ Try this PR in the Web Flasher

Flash this PR in the Web Flasher

firmware commit boards expires

Warning

This is an automated, unreviewed CI test build. Back up your device configuration
before flashing, and only flash devices you are able to recover.

Supported boards built by this PR (25)
Device Board Platform
Crowpanel Adv 3.5 TFT elecrow-adv-35-tft esp32-s3
Heltec HT62 heltec-ht62-esp32c3-sx1262 esp32-c3
Heltec Mesh Node 096 heltec-mesh-node-t096 nrf52840
Heltec Mesh Node T1 heltec-mesh-node-t1 nrf52840
Heltec Mesh Node T114 heltec-mesh-node-t114 nrf52840
Heltec V3 heltec-v3 esp32-s3
Heltec V4 heltec-v4 esp32-s3
Raspberry Pi Pico pico rp2040
Raspberry Pi Pico W picow rp2040
RAK WisMesh Tag rak_wismeshtag nrf52840
RAK WisBlock 11200 rak11200 esp32
RAK WisBlock 11310 rak11310 rp2040
RAK3312 rak3312 esp32-s3
RAK WisBlock 4631 rak4631 nrf52840
Seeed Wio Tracker L1 seeed_wio_tracker_L1 nrf52840
Seeed Xiao NRF52840 Kit seeed_xiao_nrf52840_kit nrf52840
Seeed Xiao ESP32-S3 seeed-xiao-s3 esp32-s3
Station G2 station-g2 esp32-s3
Station G3 station-g3 esp32-s3
LILYGO T-Deck t-deck-tft esp32-s3
LILYGO T-Echo t-echo nrf52840
LILYGO T-Echo Plus t-echo-plus nrf52840
LILYGO T-Impulse Plus t-impulse-plus nrf52840
LilyGo T3-C6 tlora-c6 esp32-c6
Seeed SenseCAP T1000-E tracker-t1000-e nrf52840

Build artifacts expire on 2026-07-30. Updated for a87dce6.

@github-actions github-actions Bot added the needs-review Needs human review label Jun 30, 2026
@jp-bennett jp-bennett merged commit 87bb149 into develop Jun 30, 2026
178 of 180 checks passed
@jp-bennett jp-bennett deleted the variant-touch-int branch June 30, 2026 05:28
@github-actions

Copy link
Copy Markdown
Contributor

Firmware Size Report

22 targets | vs develop: 22 increased, net +11,464 (+11.2 KB)

Target Size vs develop
heltec-vision-master-e213-inkhud 2,230,240 📈 +2,880 (+2.8 KB)
t-deck-tft 3,811,504 📈 +832
station-g3 2,266,848 📈 +496
rak11200 1,861,088 📈 +480
station-g2 2,266,832 📈 +480
Show 17 more target(s)
Target Size vs develop
heltec-v3 2,264,544 📈 +464
heltec-v4 2,277,760 📈 +464
rak3312 2,272,704 📈 +464
heltec-ht62-esp32c3-sx1262 2,135,440 📈 +448
seeed-xiao-s3 2,276,592 📈 +448
tlora-c6 2,368,752 📈 +448
t-eth-elite 2,491,920 📈 +432
elecrow-adv-35-tft 3,417,040 📈 +416
pico2w 1,220,932 📈 +416
picow 1,245,240 📈 +360
seeed_xiao_rp2350 768,296 📈 +360
pico2 770,128 📈 +352
pico 783,016 📈 +328
rak11310 805,752 📈 +328
seeed_xiao_rp2040 781,232 📈 +328
wio-e5 238,756 📈 +128
rak3172 186,408 📈 +112

Updated for 8c3291b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup Code cleanup or refactor hardware-support Hardware related: new devices or modules, problems specific to hardware needs-review Needs human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant