Skip to content

Commit 4c64e08

Browse files
authored
Merge pull request #391 from FabianSchwartau/fix_missing_button_pulldown
Fix missing pull-down on OBS Pro and remove double button pin initial…
2 parents c871a5c + c60c486 commit 4c64e08

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/OpenBikeSensorFirmware.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ void setup() {
237237
// Configure button pin as INPUT
238238
//##############################################################
239239

240-
pinMode(PUSHBUTTON_PIN, INPUT);
241240
pinMode(IP5306_BUTTON, OUTPUT);
242241
digitalWrite(IP5306_BUTTON, LOW);
243242
pinMode(BatterieVoltage_PIN, INPUT);

src/utils/button.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "variant.h"
2727

2828
Button::Button(int pin) : mPin(pin) {
29-
pinMode(pin, INPUT);
29+
pinMode(pin, INPUT_PULLDOWN);
3030
mLastStateChangeMillis = mLastRawReadMillis = millis();
3131
mLastState = mLastRawState = read();
3232
}

0 commit comments

Comments
 (0)