Skip to content

Default button polarity to active-LOW across all firmware types#1612

Open
weebl2000 wants to merge 2 commits intomeshcore-dev:devfrom
weebl2000:default-button-low
Open

Default button polarity to active-LOW across all firmware types#1612
weebl2000 wants to merge 2 commits intomeshcore-dev:devfrom
weebl2000:default-button-low

Conversation

@weebl2000
Copy link
Contributor

@weebl2000 weebl2000 commented Feb 7, 2026

Nearly all LoRa boards use a boot button that pulls to ground when pressed. The T1000-E is the one exception — it uses a capacitive touch button that is active-HIGH (confirmed by Meshtastic's BUTTON_ACTIVE_LOW false).

Changes:

  • Default USER_BTN_PRESSED to LOW where not already defined (ESP32Board.h, UITask.cpp, XiaoNrf52Board.h)
  • Replace hardcoded LOW button checks with USER_BTN_PRESSED in UITask and board files
  • Fix MinewSemi ME25LS01: was incorrectly set to USER_BTN_PRESSED=HIGH with NRF_GPIO_PIN_SENSE_HIGH — changed to active-LOW with SENSE_LOW
  • Fix ThinkNode M3 / Wio-E5-Mini: remove redundant explicit USER_BTN_PRESSED=LOW (now the default)
  • Fix T1000-E: keep USER_BTN_PRESSED=HIGH and SENSE_HIGH (correct for this hardware), but fix buttonStateChanged() to use USER_BTN_PRESSED instead of hardcoded LOW

I found out when I was working on #1347 — it was actually releasing the boot button that would trigger the wakeup, not the pressing.

@LitBomb
Copy link
Contributor

LitBomb commented Feb 7, 2026

When you say "nearly all LoRa boards..." which boards do not pull to ground when the button pressed? What would happen to those boards if this PR is merged?

Nearly all LoRa boards use a boot button that pulls to ground when
pressed.
@weebl2000
Copy link
Contributor Author

When you say "nearly all LoRa boards..." which boards do not pull to ground when the button pressed? What would happen to those boards if this PR is merged?

All devices as far as I can tell, just went through the datasheets. Except T1000-E that is genuinely high. MinewSemi being high was a bug AFAIK.

@LitBomb
Copy link
Contributor

LitBomb commented Feb 8, 2026

Thanks for checking. T1000-E has been a problem child but with a lot of effort from the community it is finally working. Sure don't want to break its button functionality. thanks.

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.

2 participants