Skip to content

Commit 1f55372

Browse files
committed
doc/configuration.rst: Add new Button drivers
Add documentation for ManualButtonDriver, ExternalButtonDriver, DigitalOutputButtonDriver. Signed-off-by: Perry Melange <[email protected]>
1 parent ea9f1d8 commit 1f55372

File tree

1 file changed

+69
-2
lines changed

1 file changed

+69
-2
lines changed

doc/configuration.rst

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2313,6 +2313,72 @@ Implements:
23132313
Arguments:
23142314
- delay (float, default=2.0): delay in seconds between off and on
23152315

2316+
ManualButtonDriver
2317+
~~~~~~~~~~~~~~~~~~
2318+
A :any:`ManualButtonDriver` requires the user to control the taget button.
2319+
This is required if a strategy is used with the target, but no automatic
2320+
button control is available.
2321+
2322+
The driver's name will be displayed during interaction.
2323+
2324+
Binds to:
2325+
- None
2326+
2327+
Implements:
2328+
- :any:`ButtonProtocol`
2329+
2330+
.. code-block:: yaml
2331+
2332+
ManualButtonDriver:
2333+
name: 'example-board'
2334+
2335+
Arguments:
2336+
- None
2337+
2338+
ExternalButtonDriver
2339+
~~~~~~~~~~~~~~~~~~~~
2340+
An :any:`ExternalButtonDriver` is used to control a target button via an
2341+
external command.
2342+
2343+
Binds to:
2344+
- None
2345+
2346+
Implements:
2347+
- :any:`ButtonProtocol`
2348+
2349+
.. code-block:: yaml
2350+
2351+
ExternalButtonDriver:
2352+
cmd_press: 'example_command press and hold'
2353+
cmd_release: 'example_command release'
2354+
cmd_press_for: 'example_command press_for'
2355+
delay: 2.0
2356+
2357+
Arguments:
2358+
- cmd_press (str): command to press and hold the button on the board
2359+
- cmd_release (str): command to release the button on the board
2360+
- cmd_press_for (str): command to press, pause, and release the button on the board
2361+
- delay (float, default=1.0): delay in seconds when calling press_for
2362+
2363+
DigitalOutputButtonDriver
2364+
~~~~~~~~~~~~~~~~~~~~~~~~~
2365+
A :any:`DigitalOutputButtonDriver` is used to control a target button via a
2366+
DigitalOutputDriver
2367+
2368+
Binds to:
2369+
- :any:`DigitalOutputProtocol`
2370+
2371+
Implements:
2372+
- :any:`ButtonProtocol`
2373+
2374+
.. code-block:: yaml
2375+
2376+
DigitalOutputButtonDriver:
2377+
delay: 2.0
2378+
2379+
Arguments:
2380+
- delay (float, default=1.0): delay in seconds when calling press_for
2381+
23162382
GpioDigitalOutputDriver
23172383
~~~~~~~~~~~~~~~~~~~~~~~
23182384
The :any:`GpioDigitalOutputDriver` writes a digital signal to a GPIO line.
@@ -2333,10 +2399,11 @@ Implements:
23332399

23342400
.. code-block:: yaml
23352401
2336-
GpioDigitalOutputDriver: {}
2402+
GpioDigitalOutputDriver:
2403+
delay: 2.0
23372404
23382405
Arguments:
2339-
- None
2406+
- delay (float, default=1.0): delay in seconds between off and on for a power cycle or between states for button press_for
23402407

23412408
SerialPortDigitalOutputDriver
23422409
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)