From c1c9bcebee89f26598a72c34b69fb897cf570374 Mon Sep 17 00:00:00 2001 From: Andrew Scheller Date: Mon, 6 Jun 2016 03:46:32 +0100 Subject: [PATCH 1/2] Document Button default values --- gpiozero/input_devices.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gpiozero/input_devices.py b/gpiozero/input_devices.py index 7e89709..51c087c 100644 --- a/gpiozero/input_devices.py +++ b/gpiozero/input_devices.py @@ -256,11 +256,13 @@ class Button(HoldMixin, DigitalInputDevice): :param float hold_time: The length of time (in seconds) to wait after the button is pushed, - until executing the :attr:`when_held` handler. + until executing the :attr:`when_held` handler. Defaults to ``1``. :param bool hold_repeat: If ``True``, the :attr:`when_held` handler will be repeatedly executed - as long as the device remains active, every *hold_time* seconds. + as long as the device remains active, every *hold_time* seconds. If + ``False`` (the default) the :attr:`when_held` handler will be only be + executed once per hold. """ def __init__( self, pin=None, pull_up=True, bounce_time=None, From ee458214a047ec28315fa8694550f0abbb488a04 Mon Sep 17 00:00:00 2001 From: Andrew Scheller Date: Mon, 6 Jun 2016 10:59:31 +0100 Subject: [PATCH 2/2] Typo fix --- gpiozero/input_devices.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpiozero/input_devices.py b/gpiozero/input_devices.py index 51c087c..8fa1a6b 100644 --- a/gpiozero/input_devices.py +++ b/gpiozero/input_devices.py @@ -251,7 +251,7 @@ class Button(HoldMixin, DigitalInputDevice): :param float bounce_time: If ``None`` (the default), no software bounce compensation will be - performed. Otherwise, this is the length in time (in seconds) that the + performed. Otherwise, this is the length of time (in seconds) that the component will ignore changes in state after an initial change. :param float hold_time: