mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2026-01-31 13:45:46 +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,44 +16,44 @@ everyday components. Components must be wired up correctly before use in code.
|
||||
LED
|
||||
===
|
||||
|
||||
.. autoclass:: LED(pin, active_high=True, initial_value=False)
|
||||
.. autoclass:: LED(pin, \*, active_high=True, initial_value=False, pin_factory=None)
|
||||
:members: on, off, toggle, blink, pin, is_lit
|
||||
|
||||
PWMLED
|
||||
======
|
||||
|
||||
.. autoclass:: PWMLED(pin, active_high=True, initial_value=0, frequency=100)
|
||||
.. autoclass:: PWMLED(pin, \*, active_high=True, initial_value=0, frequency=100, pin_factory=None)
|
||||
:members: on, off, toggle, blink, pulse, pin, is_lit, value
|
||||
|
||||
RGBLED
|
||||
======
|
||||
|
||||
.. autoclass:: RGBLED(red, green, blue, active_high=True, initial_value=(0, 0, 0), pwm=True)
|
||||
.. autoclass:: RGBLED(red, green, blue, \*, active_high=True, initial_value=(0, 0, 0), pwm=True, pin_factory=None)
|
||||
:members: on, off, toggle, blink, pulse, red, green, blue, is_lit, color
|
||||
|
||||
Buzzer
|
||||
======
|
||||
|
||||
.. autoclass:: Buzzer(pin, active_high=True, initial_value=False)
|
||||
.. autoclass:: Buzzer(pin, \*, active_high=True, initial_value=False, pin_factory=None)
|
||||
:members: on, off, toggle, beep, pin, is_active
|
||||
|
||||
Motor
|
||||
=====
|
||||
|
||||
.. autoclass:: Motor(forward, backward, pwm=True)
|
||||
.. autoclass:: Motor(forward, backward, \*, pwm=True, pin_factory=None)
|
||||
:members: forward, backward, stop
|
||||
|
||||
Servo
|
||||
=====
|
||||
|
||||
.. autoclass:: Servo(pin, initial_value=0, min_pulse_width=1/1000, max_pulse_width=2/1000, frame_width=20/1000)
|
||||
.. autoclass:: Servo(pin, \*, initial_value=0, min_pulse_width=1/1000, max_pulse_width=2/1000, frame_width=20/1000, pin_factory=None)
|
||||
:inherited-members:
|
||||
:members:
|
||||
|
||||
AngularServo
|
||||
============
|
||||
|
||||
.. autoclass:: AngularServo(pin, initial_angle=0, min_angle=-90, max_angle=90, min_pulse_width=1/1000, max_pulse_width=2/1000, frame_width=20/1000)
|
||||
.. autoclass:: AngularServo(pin, \*, initial_angle=0, min_angle=-90, max_angle=90, min_pulse_width=1/1000, max_pulse_width=2/1000, frame_width=20/1000, pin_factory=None)
|
||||
:inherited-members:
|
||||
:members:
|
||||
|
||||
@@ -73,25 +73,25 @@ to construct classes for their own devices.
|
||||
DigitalOutputDevice
|
||||
===================
|
||||
|
||||
.. autoclass:: DigitalOutputDevice(pin, active_high=True, initial_value=False)
|
||||
.. autoclass:: DigitalOutputDevice(pin, \*, active_high=True, initial_value=False, pin_factory=None)
|
||||
:members:
|
||||
|
||||
PWMOutputDevice
|
||||
===============
|
||||
|
||||
.. autoclass:: PWMOutputDevice(pin, active_high=True, initial_value=0, frequency=100)
|
||||
.. autoclass:: PWMOutputDevice(pin, \*, active_high=True, initial_value=0, frequency=100, pin_factory=None)
|
||||
:members:
|
||||
|
||||
OutputDevice
|
||||
============
|
||||
|
||||
.. autoclass:: OutputDevice(pin, active_high=True, initial_value=False)
|
||||
.. autoclass:: OutputDevice(pin, \*, active_high=True, initial_value=False, pin_factory=None)
|
||||
:members:
|
||||
|
||||
GPIODevice
|
||||
==========
|
||||
|
||||
.. autoclass:: GPIODevice(pin)
|
||||
.. autoclass:: GPIODevice(pin, \*, pin_factory=None)
|
||||
:members:
|
||||
:noindex:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user