Fix T1000-E button helper polarity

This commit is contained in:
Robert Ekl 2026-03-17 08:56:23 -05:00
parent a22c4b6270
commit 080c613497
No known key found for this signature in database
GPG key ID: 224F2A3AEDFDEC85

View file

@ -4,6 +4,10 @@
#include <Arduino.h>
#include <helpers/NRF52Board.h>
#ifndef USER_BTN_PRESSED
#define USER_BTN_PRESSED LOW
#endif
class T1000eBoard : public NRF52BoardDCDC {
protected:
uint8_t btn_prev_state;
@ -43,7 +47,7 @@ public:
uint8_t v = digitalRead(BUTTON_PIN);
if (v != btn_prev_state) {
btn_prev_state = v;
return (v == LOW) ? 1 : -1;
return (v == USER_BTN_PRESSED) ? 1 : -1;
}
#endif
return 0;