Merge pull request #1043 from isaac-webb/main

Fix Button class on Pico 2W
pull/1049/head
Philip Howard 2025-01-08 11:48:10 +00:00 zatwierdzone przez GitHub
commit 324b15ae2f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -96,7 +96,7 @@ class Button:
self.invert = invert
self.repeat_time = repeat_time
self.hold_time = hold_time
self.pin = Pin(button, pull=Pin.PULL_UP if invert else Pin.PULL_DOWN)
self.pin = Pin(button, Pin.IN, Pin.PULL_UP if invert else Pin.PULL_DOWN)
self.last_state = False
self.pressed = False
self.pressed_time = 0