Skip to content

Fix T1000-E button helper polarity#2071

Open
robekl wants to merge 1 commit intomeshcore-dev:devfrom
robekl:fix-t1000e-button-helper-polarity
Open

Fix T1000-E button helper polarity#2071
robekl wants to merge 1 commit intomeshcore-dev:devfrom
robekl:fix-t1000e-button-helper-polarity

Conversation

@robekl
Copy link
Contributor

@robekl robekl commented Mar 17, 2026

Summary

  • make T1000eBoard::buttonStateChanged() respect USER_BTN_PRESSED
  • align the board helper with the T1000-E build flags and UI code
  • keep the change limited to the stale helper implementation

Issue

The T1000-E board definition already declares the user button as active-high in:

  • variants/t1000-e/platformio.ini
    • -D USER_BTN_PRESSED=HIGH

But T1000eBoard::buttonStateChanged() still hardcodes LOW as the pressed state.

That leaves the board helper out of sync with the actual board configuration. Even if most T1000-E UI paths currently use the generic button abstraction instead of this helper, keeping the helper inverted is still a maintenance trap for any code that uses the board class directly.

Fix

This change:

  • adds the same USER_BTN_PRESSED fallback used elsewhere in the UI code
  • replaces the hardcoded LOW comparison in buttonStateChanged() with USER_BTN_PRESSED

Why this fixes it

It makes the board helper follow the same polarity source as the rest of the T1000-E build. That keeps the T1000-E board abstraction internally consistent and avoids future regressions where direct board-button callers would interpret presses backwards.

Validation

  • pio run -e t1000e_companion_radio_ble

@robekl robekl marked this pull request as ready for review March 17, 2026 14:04
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