Skip to content

Conversation

@dkruyt
Copy link

@dkruyt dkruyt commented Jan 8, 2026

Pull Request: Add configurable OLED wake-up behavior

Description
This PR introduces a new user-configurable setting to the Companion Radio firmware to control the OLED display's wake-up behavior.

Problem
Previously, the OLED display would automatically wake up whenever any text message (including public channel traffic) was received. While useful for visibility, this could lead to the screen turning on unexpectedly in quiet environments or causing unnecessary battery drain in high-traffic
mesh areas.

Solution
Added a display_wake_mode setting to NodePrefs that allows users to toggle between two modes:

  1. AUTO (Default): Screen wakes up automatically on new messages (original behavior).
  2. MANUAL: Screen remains off when messages are received. The user must manually press a button to wake the screen and view the message queue.

Technical Changes

  • NodePrefs.h: Added display_wake_mode field and defined DISPLAY_WAKE_AUTO (0) and DISPLAY_WAKE_MANUAL (1) constants.
  • MyMesh.cpp: Initialized the new preference to AUTO in the constructor.
  • UITask.cpp:
    • Added a new "Wake Screen" settings page to the OLED menu (positioned after the Advert page).
    • Modified newMsg() to conditionally call turnOn() based on the display_wake_mode setting.
    • Used DISPLAY_SETTINGS for the internal enum to avoid a macro collision with the "DISPLAY" macro in the ESP32 Arduino core.
    • Verified that hardware button interactions continue to wake the screen regardless of the setting.

Verification Results

  • Build: Successfully compiled for the Heltec_v3_companion_radio_usb environment using PlatformIO.
  • Logic: Confirmed that newMsg respects the preference while button handlers still force the screen on for user interaction.

dkruyt added 2 commits January 8, 2026 11:59
Extends the display wake behavior with a third option that keeps the
display always on, cycling through AUTO -> MANUAL -> ALWAYS_ON modes.
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