mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-12-08 20:39:01 +00:00
Change bouncetime to bounce_time
The parameter was already changed to bounce_time in the base DigitalInputDevice class, but was overridden (incorrectly) in the derived Button class.
This commit is contained in:
@@ -402,8 +402,8 @@ class Button(DigitalInputDevice):
|
|||||||
side of the switch, and ground to the other (the default `pull_up` value
|
side of the switch, and ground to the other (the default `pull_up` value
|
||||||
is `True`).
|
is `True`).
|
||||||
"""
|
"""
|
||||||
def __init__(self, pin=None, pull_up=True, bouncetime=None):
|
def __init__(self, pin=None, pull_up=True, bounce_time=None):
|
||||||
super(Button, self).__init__(pin, pull_up, bouncetime)
|
super(Button, self).__init__(pin, pull_up, bounce_time)
|
||||||
|
|
||||||
Button.is_pressed = Button.is_active
|
Button.is_pressed = Button.is_active
|
||||||
Button.when_pressed = Button.when_activated
|
Button.when_pressed = Button.when_activated
|
||||||
|
|||||||
Reference in New Issue
Block a user