Skip to content

fix: replace EVENT_CONTACT_FROM_PHONE for MUI keep awake - #10840

Merged
thebentern merged 1 commit into
developfrom
fix-10571
Jul 1, 2026
Merged

fix: replace EVENT_CONTACT_FROM_PHONE for MUI keep awake#10840
thebentern merged 1 commit into
developfrom
fix-10571

Conversation

@mverch67

@mverch67 mverch67 commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

PR #10571 breaks the previous MUI keep awake mechanism to tell the device not to sleep while MUI is being used.

This PR replaces (for MUI / PacketAPI) the previously used EVENT_CONTACT_FROM_PHONE (which is in PhoneAPI actually used to keep the bluetooth connection alive while the phone is using it) by EVENT_INPUT to reset the screen/device sleep timer.

INFO  | ??:??:?? 81 [DeviceUI] enter powersave
DEBUG | ??:??:?? 81 [DeviceUI] showing blank screen
DEBUG | ??:??:?? 81 [DeviceUI] disable touch, enable button input
DEBUG | ??:??:?? 91 [PowerFSM] lsEnter begin, ls_secs=300
WARN  | ??:??:?? 91 [PowerFSM] Detaching power interrupts for sleep
INFO  | ??:??:?? 91 [PowerFSM] setup LORA_DIO1 (GPIO45) with wakeup by gpio interrupt
[32mINFO  | ??:??:?? 97 [PowerFSM] Exit light sleep gpio
DEBUG | ??:??:?? 97 [PowerFSM] State: lsExit
DEBUG | ??:??:?? 97 [PowerFSM] State: darkEnter
DEBUG | ??:??:?? 97 [DeviceUI] screen unlocked by button
DEBUG | ??:??:?? 97 [DeviceUI] screen unlocked by button
INFO  | ??:??:?? 98 [DeviceUI] leaving powersave
DEBUG | ??:??:?? 98 [DeviceUI] showing main screen
DEBUG | ??:??:?? 98 [DeviceUI] enable touch, disable button input
DEBUG | ??:??:?? 98 [PacketAPI] State: darkEnter
DEBUG | ??:??:?? 98 [PacketAPI] Received packet id=6
DEBUG | ??:??:?? 98 [PacketAPI] Got client heartbeat
DEBUG | ??:??:?? 102 [PacketAPI] State: darkEnter
DEBUG | ??:??:?? 102 [PacketAPI] Received packet id=7
DEBUG | ??:??:?? 102 [PacketAPI] Got client heartbeat

🤝 Attestations

  • I have tested that my proposed changes behave as described.
  • I have tested that my proposed changes do not cause any obvious regressions on the following devices:
    • Heltec (Lora32) V3
    • LilyGo T-Deck
    • LilyGo T-Beam
    • RAK WisBlock 4631
    • Seeed Studio T-1000E tracker card
    • Other (please specify below)

Summary by CodeRabbit

  • Bug Fixes
    • Improved how the app responds to incoming input events, helping power state changes happen more reliably during packet handling.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

A single-line change in PacketAPI.cpp modifies the powerFSM trigger event used when receiving packets, replacing EVENT_CONTACT_FROM_PHONE with EVENT_INPUT.

Changes

PowerFSM Event Update

Layer / File(s) Summary
Change powerFSM trigger event
src/mesh/api/PacketAPI.cpp
Switched the event fired in receivePacket from EVENT_CONTACT_FROM_PHONE to EVENT_INPUT.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

A single hop, a tiny leap,
One event traded, none to weep.
EVENT_INPUT now takes the stage,
A rabbit's nod on a single page. 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately describes the main change to the MUI keep-awake event.
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.
Description check ✅ Passed The PR description includes a clear fix summary and the required attestations section, with testing details provided.

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

@github-actions

github-actions Bot commented Jul 1, 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-31. Updated for 128ac56.

@github-actions github-actions Bot added needs-review Needs human review bugfix Pull request that fixes bugs labels Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Firmware Size Report

22 targets | vs develop: 22 increased, net +23,024 (+22.5 KB)

Target Size vs develop
t-deck-tft 3,817,840 📈 +7,168 (+7.0 KB)
heltec-vision-master-e213-inkhud 2,230,432 📈 +3,072 (+3.0 KB)
elecrow-adv-35-tft 3,418,448 📈 +1,824 (+1.8 KB)
heltec-v3 2,264,800 📈 +720
rak11200 1,861,312 📈 +704
Show 17 more target(s)
Target Size vs develop
rak3312 2,272,944 📈 +704
station-g2 2,267,056 📈 +704
station-g3 2,267,056 📈 +704
seeed-xiao-s3 2,276,832 📈 +688
t-eth-elite 2,492,160 📈 +672
heltec-v4 2,277,904 📈 +608
tlora-c6 2,368,912 📈 +608
pico2w 1,221,116 📈 +600
heltec-ht62-esp32c3-sx1262 2,135,584 📈 +592
picow 1,245,424 📈 +544
pico 783,216 📈 +528
rak11310 805,952 📈 +528
seeed_xiao_rp2350 768,464 📈 +528
pico2 770,296 📈 +520
seeed_xiao_rp2040 781,416 📈 +512
wio-e5 238,916 📈 +288
rak3172 186,504 📈 +208

Updated for 1b5f593

@thebentern
thebentern merged commit 18d64bf into develop Jul 1, 2026
94 of 99 checks passed
@thebentern
thebentern deleted the fix-10571 branch July 1, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes bugs needs-review Needs human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants