mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2026-04-25 08:23:53 +00:00
Add pin_factory to all relevant class docs
Also tell a whole load of lies about what's a keyword-only arg. In the vast majority of cases, pin_factory (and other args) *aren't* keyword-only ... but we'd really like them to be, it's just difficult while maintaining py2 compatibility.
This commit is contained in:
@@ -16,35 +16,35 @@ everyday components. Components must be wired up correctly before use in code.
|
||||
Button
|
||||
======
|
||||
|
||||
.. autoclass:: Button(pin, pull_up=True, bounce_time=None, hold_time=1, hold_repeat=False, pin_factory=None)
|
||||
.. autoclass:: Button(pin, \*, pull_up=True, bounce_time=None, hold_time=1, hold_repeat=False, pin_factory=None)
|
||||
:members: wait_for_press, wait_for_release, pin, is_pressed, is_held, hold_time, held_time, hold_repeat, pull_up, when_pressed, when_released, when_held
|
||||
|
||||
|
||||
Line Sensor (TRCT5000)
|
||||
======================
|
||||
|
||||
.. autoclass:: LineSensor(pin, queue_len=5, sample_rate=100, threshold=0.5, partial=False, pin_factory=None)
|
||||
.. autoclass:: LineSensor(pin, \*, queue_len=5, sample_rate=100, threshold=0.5, partial=False, pin_factory=None)
|
||||
:members: wait_for_line, wait_for_no_line, pin, line_detected, when_line, when_no_line
|
||||
|
||||
|
||||
Motion Sensor (D-SUN PIR)
|
||||
=========================
|
||||
|
||||
.. autoclass:: MotionSensor(pin, queue_len=1, sample_rate=10, threshold=0.5, partial=False, pin_factory=None)
|
||||
.. autoclass:: MotionSensor(pin, \*, queue_len=1, sample_rate=10, threshold=0.5, partial=False, pin_factory=None)
|
||||
:members: wait_for_motion, wait_for_no_motion, pin, motion_detected, when_motion, when_no_motion
|
||||
|
||||
|
||||
Light Sensor (LDR)
|
||||
==================
|
||||
|
||||
.. autoclass:: LightSensor(pin, queue_len=5, charge_time_limit=0.01, threshold=0.1, partial=False, pin_factory=None)
|
||||
.. autoclass:: LightSensor(pin, \*, queue_len=5, charge_time_limit=0.01, threshold=0.1, partial=False, pin_factory=None)
|
||||
:members: wait_for_light, wait_for_dark, pin, light_detected, when_light, when_dark
|
||||
|
||||
|
||||
Distance Sensor (HC-SR04)
|
||||
=========================
|
||||
|
||||
.. autoclass:: DistanceSensor(echo, trigger, queue_len=30, max_distance=1, threshold_distance=0.3, partial=False, pin_factory=None)
|
||||
.. autoclass:: DistanceSensor(echo, trigger, \*, queue_len=30, max_distance=1, threshold_distance=0.3, partial=False, pin_factory=None)
|
||||
:members: wait_for_in_range, wait_for_out_of_range, trigger, echo, when_in_range, when_out_of_range, max_distance, distance, threshold_distance
|
||||
|
||||
Base Classes
|
||||
@@ -63,19 +63,19 @@ to construct classes for their own devices.
|
||||
DigitalInputDevice
|
||||
==================
|
||||
|
||||
.. autoclass:: DigitalInputDevice(pin, pull_up=False, bounce_time=None, pin_factory=None)
|
||||
.. autoclass:: DigitalInputDevice(pin, \*, pull_up=False, bounce_time=None, pin_factory=None)
|
||||
:members:
|
||||
|
||||
SmoothedInputDevice
|
||||
===================
|
||||
|
||||
.. autoclass:: SmoothedInputDevice
|
||||
.. autoclass:: SmoothedInputDevice(pin, \*, pull_up=False, threshold=0.5, queue_len=5, sample_wait=0.0, partial=False, pin_factory=None)
|
||||
:members:
|
||||
|
||||
InputDevice
|
||||
===========
|
||||
|
||||
.. autoclass:: InputDevice(pin, pull_up=False, pin_factory=None)
|
||||
.. autoclass:: InputDevice(pin, \*, pull_up=False, pin_factory=None)
|
||||
:members:
|
||||
|
||||
GPIODevice
|
||||
|
||||
Reference in New Issue
Block a user