Skip to content

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

Open
weebl2000 wants to merge 10 commits intodevfrom
default-button-low
Open

Default button polarity to active-LOW across all firmware types#25
weebl2000 wants to merge 10 commits intodevfrom
default-button-low

Conversation

@weebl2000
Copy link
Owner

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 meshcore-dev#1347 — it was actually releasing the boot button that would trigger the wakeup, not the pressing.


Build firmware: Build from this branch


Mirror of meshcore-dev#1612

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.

5 participants