Skip to content

Commit 9cdb419

Browse files
committed
docs: Minor cleanup.
1 parent 67610ea commit 9cdb419

File tree

5 files changed

+67
-7
lines changed

5 files changed

+67
-7
lines changed

docs/library/machine.LED.rst

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
.. currentmodule:: machine
2+
.. _machine.LED:
3+
4+
class LED -- LED Control
5+
========================
6+
7+
The LED class provides an interface to control the on-board LED.
8+
9+
Example usage::
10+
11+
from machine import LED
12+
13+
r = LED("LED_RED")
14+
g = LED("LED_GREEN")
15+
b = LED("LED_BLUE")
16+
17+
r.on()
18+
g.off()
19+
b.toggle()
20+
21+
Constructors
22+
------------
23+
24+
.. class:: LED(pin_name) -> LED
25+
26+
Access the LED associated with a source identified by *pin_name*. This
27+
``pin_name`` may be a string (usually specifying a color), a
28+
:ref:`Pin <machine.Pin>` object, or other value supported by the
29+
underlying machine.
30+
31+
Methods
32+
-------
33+
34+
.. method:: LED.boardname() -> str
35+
36+
Returns the name of the board.
37+
38+
.. method:: LED.on() -> None
39+
40+
Turns the LED on.
41+
42+
.. method:: LED.() -> None
43+
44+
Turns the LED off.
45+
46+
.. method:: LED.toggle() -> None
47+
48+
Toggles the LED state.
49+
50+
.. method:: LED.value(v=None) -> int
51+
52+
If ``v`` is given, sets the LED to the given value. If ``v`` is not given,
53+
returns the current LED value.

docs/library/machine.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ Classes
245245

246246
machine.Pin.rst
247247
machine.Signal.rst
248+
machine.LED.rst
248249
machine.ADC.rst
249250
machine.ADCBlock.rst
250251
machine.CAN.rst

docs/library/omv.ml.postprocessing.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ Constructors
2525
``threshold`` The threshold to use for postprocessing.
2626

2727
This post-processor returns a list of rect ``[x, y, w, h]`` and score tuples for each class in the model output.
28+
E.g. ``[[((x, y, w, h), score)]]``. Note that empty class list are included in the output to ensure the position
29+
of each class list in the output matches the position of the class index in the model output.
2830

2931
class yolo_v2_postprocess -- YOLO V2
3032
------------------------------------
@@ -43,6 +45,8 @@ Constructors
4345
``anchors`` A list of anchor points ``(x, y)`` the model was trained on to use for postprocessing.
4446

4547
This post-processor returns a list of rect ``[x, y, w, h]`` and score tuples for each class in the model output.
48+
E.g. ``[[((x, y, w, h), score)]]``. Note that empty class list are included in the output to ensure the position
49+
of each class list in the output matches the position of the class index in the model output.
4650

4751
class yolo_v5_postprocess -- YOLO V5
4852
------------------------------------
@@ -59,3 +63,5 @@ Constructors
5963
``threshold`` The threshold to use for postprocessing.
6064

6165
This post-processor returns a list of rect ``[x, y, w, h]`` and score tuples for each class in the model output.
66+
E.g. ``[[((x, y, w, h), score)]]``. Note that empty class list are included in the output to ensure the position
67+
of each class list in the output matches the position of the class index in the model output.

docs/library/omv.tof.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Example usage::
2929
Functions
3030
---------
3131

32-
.. function:: init(type=-1) -> None
32+
.. function:: init(type:int=-1) -> None
3333

3434
Initializes an onboard depth sensor.
3535

@@ -41,7 +41,7 @@ Functions
4141
By default type is ``-1`` which will cause `tof.init()` to automatically scan and initialize an
4242
attached thermal sensor based on the I2C address.
4343

44-
.. function:: reset(type=-1) -> None
44+
.. function:: reset(type:int=-1) -> None
4545

4646
Re-initializes an onboard depth sensor.
4747

@@ -85,7 +85,7 @@ Functions
8585
* `tof.TOF_NONE`: 0 Hz.
8686
* `tof.TOF_VL53L5CX`: 15 Hz.
8787

88-
.. function:: read_depth(hmirror=False, vflip=False, transpose=False, timeout=-1)
88+
.. function:: read_depth(hmirror:bool=False, vflip:bool=False, transpose:bool=False, timeout:int=-1)
8989

9090
Returns a tuple containing the depth list (width * height),
9191
the minimum depth seen, and the maximum depth seen.
@@ -115,7 +115,7 @@ Functions
115115

116116
``depth`` is a (width * height) list of floats (4-bytes each).
117117

118-
.. function:: draw_depth(image:image.Image, ir, x:Optional[int]=None, y:Optional[int]=None, x_scale=1.0, y_scale=1.0, roi:Optional[Tuple[int,int,int,int]]=None, rgb_channel=-1, alpha=128, color_palette=image.PALETTE_DEPTH, alpha_palette=-1, hint=0, scale=Optional[Tuple[float, float]]) -> None
118+
.. function:: draw_depth(image:image.Image, tof, x:Optional[int]=None, y:Optional[int]=None, x_scale:float=1.0, y_scale:float=1.0, roi:Optional[Tuple[int,int,int,int]]=None, rgb_channel:int=-1, alpha:int=128, color_palette=image.PALETTE_DEPTH, alpha_palette=-1, hint:int=0, scale=Optional[Tuple[float, float]]) -> None
119119

120120
Draws an ``depth`` array on ``image`` whose top-left corner starts at location x, y. This method
121121
automatically handles rendering the image passed into the correct pixel format for the destination
@@ -180,7 +180,7 @@ Functions
180180
To handle a transposed ``depth`` array `read_depth` remembers if it was called with ``transposed``
181181
``True``. This is then passed to ``draw_depth`` internally.
182182

183-
.. function:: snapshot(hmirror=False, vflip=False, transpose=False, x_scale=1.0, y_scale=1.0, roi:Optional[Tuple[int,int,int,int]]=None, rgb_channel=-1, alpha=128, color_palette=image.PALETTE_DEPTH, alpha_palette=None, hint=0, scale:Optional[Tuple[float, float]]=None, pixformat=image.RGB565, copy_to_fb=False, timeout=-1) -> image.Image
183+
.. function:: snapshot(hmirror:bool=False, vflip:bool=False, transpose:bool=False, x_scale:float=1.0, y_scale:float=1.0, roi:Optional[Tuple[int,int,int,int]]=None, rgb_channel:int=-1, alpha:int=128, color_palette=image.PALETTE_DEPTH, alpha_palette=None, hint:int=0, scale:Optional[Tuple[float, float]]=None, pixformat:int=image.RGB565, copy_to_fb:bool=False, timeout:int=-1) -> image.Image
184184

185185
Works like `sensor.snapshot()` and returns an `image` object that is either
186186
`image.GRAYSCALE` (grayscale) or `image.RGB565` (color). If ``copy_to_fb`` is False then

docs/library/requests.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
:mod:`urequests` --- Related functions of HTTP client
1+
:mod:`requests` --- Related functions of HTTP client
22
=====================================================
33

4-
.. module:: urequests
4+
.. module:: requests
55
:synopsis: Relevant functional functions of the HTTP client, providing various HTTP request methods
66

77
Relevant functional functions of the HTTP client, providing various HTTP request methods

0 commit comments

Comments
 (0)