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:
Dave Jones
2016-04-07 20:57:43 +01:00
parent f746ecb7cc
commit 0838965796
12 changed files with 214 additions and 32 deletions

View File

@@ -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

View File

@@ -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:

View File

@@ -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.