Skip to content

Conversation

@Onefabis
Copy link

If user will define in build flags -D AUTO_SHUTDOWN_MILLIVOLTS=3100 and -D TEXT_BATTERY it will show battery level on the companion node as a text. Without AUTO_SHUTDOWN_MILLIVOLTS it will use default 3.0V as 0%. Without TEXT_BATTERY defined in platformio.ini it will draw default icon.

If user will define in build flags -D AUTO_SHUTDOWN_MILLIVOLTS=3100 and -D TEXT_BATTERY it will show battery level on the companion node as a text. Without AUTO_SHUTDOWN_MILLIVOLTS it will use default 3.0V as 0%. Without TEXT_BATTERY defined in platformio.ini it will draw default icon.
@Onefabis
Copy link
Author

Sorry @OverseerHSof! I didn't noticed that my PR (#1236) was approved, but wasn't merged while I was on my own fork experiments. Will not touch my fork untill full merge this time :)

Developer put HAS_ENCODER definition into target .h/.cpp and define HAS_ENCODER in platformio.ini for own developed device that has encoder. Developer need to add pin_A and pin_B for the encoder and pin_BTN for the encoder button. It may work with joystick/button if needed. Has software debounce. Final look in platformio:
build_flags = -D HAS_ENCODER
-D PIN_ENC_A=0
-D PIN_ENC_B=1
-D PIN_ENCODER_BTN=5
build_src_filter =
  +<helpers/ui/EncoderAndButton.cpp>
This example could be found in promicro conmanion ble variant
@Onefabis Onefabis changed the title Text battery display option Text battery display option and encoder (with button) support Dec 24, 2025
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.

1 participant