Skip to content

Fix #8899 [Bug]: [TloraPager] RotaryEncoder crash#8933

Merged
thebentern merged 3 commits into
meshtastic:masterfrom
polarikus:8899-rotary-enc-crash
Dec 12, 2025
Merged

Fix #8899 [Bug]: [TloraPager] RotaryEncoder crash#8933
thebentern merged 3 commits into
meshtastic:masterfrom
polarikus:8899-rotary-enc-crash

Conversation

@polarikus

Copy link
Copy Markdown
Contributor

Fix #8899

🤝 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 TLoraPager

@thebentern thebentern requested review from Copilot and mverch67 and removed request for mverch67 December 11, 2025 12:32
@thebentern thebentern added the bugfix Pull request that fixes bugs label Dec 11, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a crash in the RotaryEncoder implementation on the TLoraPager device by adding proper lifecycle management and light sleep support for ESP32 platforms.

Key Changes:

  • Added destructor and proper cleanup for RotaryEncoder resources
  • Implemented light sleep callbacks to properly detach/reattach interrupts during sleep cycles
  • Added virtual destructor to InputPollable base class for proper polymorphic deletion

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
src/input/RotaryEncoderImpl.h Added destructor, light sleep callback methods, and observer members for sleep notifications; marked class as final
src/input/RotaryEncoderImpl.cpp Implemented destructor with cleanup logic, refactored interrupt management into dedicated methods, and added light sleep handlers
src/input/InputBroker.h Added virtual destructor to InputPollable base class to enable proper cleanup through polymorphism

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/input/RotaryEncoderImpl.cpp Outdated
Comment thread src/input/RotaryEncoderImpl.cpp Outdated
Comment thread src/input/RotaryEncoderImpl.cpp
Comment thread src/input/RotaryEncoderImpl.cpp Outdated
Comment thread src/input/RotaryEncoderImpl.cpp
@polarikus

Copy link
Copy Markdown
Contributor Author

The checks failed not because of changes in the last commit:
PackageException: Got the unrecognized status code '503' when downloaded https://github.com/earlephilhower/pico-quick-toolchain/releases/download/4.0.1/x86_64-linux-gnu.arm-none-eabi-8ec9d6f.240929.tar.gz
Error: Process completed with exit code 1.

@thebentern thebentern changed the base branch from develop to master December 12, 2025 01:04
@thebentern thebentern merged commit c8628b3 into meshtastic:master Dec 12, 2025
151 of 152 checks passed
scobert969 pushed a commit to zeropt/meshtastic-firmware that referenced this pull request Dec 22, 2025
…ic#8933)

* Fix meshtastic#8899 [Bug]: [TloraPager] RotaryEncoder crash

* Apply Copilot review

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
jeek pushed a commit to jeek/Meshtastic-Exploiteers-Hacker-Pager that referenced this pull request Jun 30, 2026
…ic#8933)

* Fix meshtastic#8899 [Bug]: [TloraPager] RotaryEncoder crash

* Apply Copilot review

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: [TloraPager] RotaryEncoder crash

4 participants