Skip to content

Conversation

Halcao
Copy link

@Halcao Halcao commented Sep 20, 2025

Summary

This PR exposes macros for flexible rotary encoder support and provides a DIY configuration example.

Main contributions:

  1. Expose FSM_ROTARY_ENCODER related macros

    • FSM_ROTARY_ENCODER
    • FSM_ROTARY_ENCODER_DEBOUNCE (debounce time in ms)
    • FSM_ROTARY_ENCODER_CHECK_INTERVAL (scan interval / loop iterations)

    These macros were previously only available via the T_LORA_PAGER build.
    By exposing them, rotary encoder functionality can now be reused on other boards, and behavior can be tuned as needed.

  2. DIY configuration example
    Hardware details of the DIY setup (NovaLoRa):

    • Main controller: ESP32-C3 Supermini
    • LoRa module: Ebyte E22 400M30S
    • Peripherals: MITSUMI SIQ-02FVS3 rotary encoder and OLED display

    This configuration is specific to my DIY hardware but serves as a reference for other DIY projects integrating rotary encoders.

Testing: Confirmed on the DIY setup with no regressions on other supported boards.

Notes: Happy to split this PR if maintainers prefer macro exposure separate from the example.

Attestations

  • I have tested that my changes behave as described.
  • I have tested that my changes do not cause 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: DIY ESP32-C3 Supermini setup

@CLAassistant
Copy link

CLAassistant commented Sep 20, 2025

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Halcao Halcao changed the title Expose FSM_ROTARY_ENCODER macros for flexible rotary encoder support (with variant example) [enhancement] Expose FSM_ROTARY_ENCODER macros for flexible rotary encoder support (with variant example) Sep 20, 2025
@WillyJL
Copy link
Contributor

WillyJL commented Sep 21, 2025

interesting, so this rotary encoder type one is not only for T-Lora Pager.

might be worth looking at #7986, it drastically improves the usability and responsiveness of this rotary encoder implementation, could use some feedback on whether it works on this variant as well. if so, FSM_ROTARY_ENCODER_CHECK_INTERVAL would not be necessary anymore as my version gets rid of periodic polling completely. besides this point, it doesnt seem like these 2 PRs will conflict.

i reverted renaming the class in my PR, and i would imagine removing the T_LORA_PAGER define checks and adding the FSM_ROTARY_ENCODER define to tlora-pager variant for your PR would help going forward.

@Halcao
Copy link
Author

Halcao commented Sep 21, 2025

Hi @WillyJL, thanks for pointing me to #7986!
I tested it on my variant, and everything works fine, the responsiveness improvements are confirmed here as well.
Our changes don't conflict, mine only adjusts the defines, so it's easy for maintainer to merge both PRs.

Copy link
Collaborator

@mverch67 mverch67 left a comment

Choose a reason for hiding this comment

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

please remove the T_LORA_PAGER defines as well as suggested by @WillyJL

@Halcao
Copy link
Author

Halcao commented Sep 21, 2025

Hi @WillyJL, T_LORA_PAGER macro for rotary encoder is removed, I also added FSM_ROTARY_ENCODER to variant.h of tlora_pager.

@thebentern thebentern added the enhancement New feature or request label Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants