mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-12-08 20:39:01 +00:00
Fix #115
Adds when_held event hook to Button (via extension of the EventsMixin class). Also fixes some minor notes and activates codecov coverage tracking.
This commit is contained in:
@@ -43,6 +43,10 @@ Errors
|
||||
|
||||
.. autoexception:: BadEventHandler
|
||||
|
||||
.. autoexception:: BadQueueLen
|
||||
|
||||
.. autoexception:: BadWaitTime
|
||||
|
||||
.. autoexception:: CompositeDeviceError
|
||||
|
||||
.. autoexception:: CompositeDeviceBadName
|
||||
@@ -63,10 +67,6 @@ Errors
|
||||
|
||||
.. autoexception:: GPIOPinMissing
|
||||
|
||||
.. autoexception:: GPIOBadQueueLen
|
||||
|
||||
.. autoexception:: GPIOBadSampleWait
|
||||
|
||||
.. autoexception:: InputDeviceError
|
||||
|
||||
.. autoexception:: OutputDeviceError
|
||||
|
||||
@@ -37,6 +37,9 @@ There are also several `mixin classes`_:
|
||||
* :class:`EventsMixin` which adds activated/deactivated events to devices
|
||||
along with the machinery to trigger those events
|
||||
|
||||
* :class:`HoldMixin` which derives from :class:`EventsMixin` and adds the
|
||||
held event to devices along with the machinery to repeatedly trigger it
|
||||
|
||||
.. _mixin classes: https://en.wikipedia.org/wiki/Mixin
|
||||
|
||||
The current class hierarchies are displayed below. For brevity, the mixin
|
||||
@@ -141,3 +144,6 @@ Mixin Classes
|
||||
.. autoclass:: EventsMixin(...)
|
||||
:members:
|
||||
|
||||
.. autoclass:: HoldMixin(...)
|
||||
:members:
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ to utilize pins that are part of IO extender chips. For example::
|
||||
|
||||
.. warning::
|
||||
|
||||
The astute and mischievious reader may note that it is possible to mix pin
|
||||
The astute and mischievous reader may note that it is possible to mix pin
|
||||
implementations, e.g. using ``RPiGPIOPin`` for one pin, and ``NativePin``
|
||||
for another. This is unsupported, and if it results in your script
|
||||
crashing, your components failing, or your Raspberry Pi turning into an
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 56 KiB |
Binary file not shown.
Reference in New Issue
Block a user