Skip to content

Commit b19821f

Browse files
committed
docs/units: Code format.
Signed-off-by: lbuque <[email protected]>
1 parent 549f400 commit b19821f

32 files changed

+320
-336
lines changed

docs/en/units/adc.rst

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
ADC Unit
2-
==================
2+
========
33

44
.. include:: ../refs/unit.adc.ref
55

66
Support the following products:
77

8-
9-
|ADC|
8+
|ADC|
109

1110

1211
Micropython Example::
@@ -26,22 +25,21 @@ Micropython Example::
2625
time.sleep(1)
2726

2827

29-
30-
31-
3228
UIFLOW2 Example:
3329

3430
|example.svg|
3531

32+
3633
.. only:: builder_html
3734

38-
|adc_core_example.m5f2|
35+
|adc_core_example.m5f2|
36+
3937

4038
class ADCUnit
41-
--------------
39+
-------------
4240

4341
Constructors
44-
--------------
42+
------------
4543

4644
.. class:: ADCUnit(i2c0)
4745

@@ -50,7 +48,6 @@ Constructors
5048
parameters is:
5149
- ``I2C0`` is I2C Port.
5250

53-
5451
UIFLOW2:
5552

5653
|init.svg|
@@ -61,13 +58,13 @@ Methods
6158

6259
.. method:: ADCUnit.get_value()
6360

64-
65-
Gets the original value read by the adc.
61+
Gets the original value read by the adc.
6662

6763
UIFLOW2:
6864

6965
|get_value.svg|
7066

67+
7168
.. method:: ADCUnit.get_voltage()
7269

7370
Get the voltage value.
@@ -76,6 +73,7 @@ Methods
7673

7774
|get_voltage.svg|
7875

76+
7977
.. method:: ADCUnit.get_raw_value()
8078

8179
Read the raw value.
@@ -84,6 +82,7 @@ Methods
8482

8583
|get_raw_value.svg|
8684

85+
8786
.. method:: ADCUnit.get_operating_mode()
8887

8988
Get working mode. (Single read or continuous read)
@@ -92,6 +91,7 @@ Methods
9291

9392
|get_operating_mode.svg|
9493

94+
9595
.. method:: ADCUnit.get_data_rate()
9696

9797
Get the read rate of the data.
@@ -100,34 +100,38 @@ Methods
100100

101101
|get_data_rate.svg|
102102

103+
103104
.. method:: ADCUnit.get_gain()
104105

105106
Get the gain multiple of the data.
106107

107108
UIFLOW2:
108109

109-
|get_gain.svg|
110+
|get_gain.svg|
111+
110112

111113
.. method:: ADCUnit.operating_mode()
112114

113115
Set working mode (single read or continuous read)
114116

115117
UIFLOW2:
116118

117-
|set_operating_mode.svg|
119+
|set_operating_mode.svg|
120+
118121

119122
.. method:: ADCUnit.data_rate()
120123

121124
Set the data acquisition rate.
122125

123126
UIFLOW2:
124127

125-
|set_data_rate.svg|
128+
|set_data_rate.svg|
129+
126130

127131
.. method:: ADCUnit.gain()
128132

129133
Set the gain multiple for reading data.
130134

131135
UIFLOW2:
132136

133-
|set_gain.svg|
137+
|set_gain.svg|

docs/en/units/angle.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Angle Unit
33

44
.. include:: ../refs/unit.angle.ref
55

6-
The following products are supported
6+
The following products are supported:
77

8-
|Angle|
8+
|Angle|
99

1010
Micropython Example::
1111

@@ -21,13 +21,16 @@ Micropython Example::
2121
print(angle_0.get_voltage())
2222
print(angle_0.get_value())
2323

24+
2425
UIFLOW2 Example:
2526

2627
|example.svg|
2728

29+
2830
.. only:: builder_html
2931

30-
|angle_core_example.m5f2|
32+
|angle_core_example.m5f2|
33+
3134

3235
class Angle
3336
-----------
@@ -47,7 +50,6 @@ Constructors
4750
|init.svg|
4851

4952

50-
5153
Methods
5254
-------
5355

@@ -59,11 +61,11 @@ Methods
5961

6062
|get_value.svg|
6163

64+
6265
.. method:: Angle.get_voltage()
6366

6467
This method allows reading the voltage value of Angle, and the return value is a floating point value.
6568

6669
UIFLOW2:
6770

6871
|get_voltage.svg|
69-

docs/en/units/dlight.rst

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
DLight Unit
2-
==================
2+
===========
33

44
.. include:: ../refs/unit.dlight.ref
55

66
Support the following products:
77

8-
9-
|Dlight|
8+
|Dlight|
109

1110

1211
Micropython Example::
@@ -30,22 +29,21 @@ Micropython Example::
3029
Widgets.fillScreen(0x222222)
3130

3231

33-
34-
35-
3632
UIFLOW2 Example:
3733

3834
|example.svg|
3935

36+
4037
.. only:: builder_html
4138

42-
|dlight_core_example.m5f2|
39+
|dlight_core_example.m5f2|
40+
4341

4442
class DLight
45-
-----------------
43+
------------
4644

4745
Constructors
48-
--------------
46+
------------
4947

5048
.. class:: DLight(port)
5149

@@ -54,7 +52,6 @@ Constructors
5452
The parameters is:
5553
- ``PORT`` Define an i2c port.
5654

57-
5855
UIFLOW2:
5956

6057
|init.svg|
@@ -65,19 +62,17 @@ Methods
6562

6663
.. method:: dlight.get_lux()
6764

68-
6965
Get light lux.
7066

7167
UIFLOW2:
7268

7369
|get_lux.svg|
7470

71+
7572
.. method:: dlight.configure()
7673

7774
Configure the measurement mode (continuous measurement/single measurement) and resolution.
7875

7976
UIFLOW2:
8077

8178
|configure.svg|
82-
83-

docs/en/units/dualbutton.rst

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
Dual_Button Unit
2-
==================
2+
================
33

44
.. include:: ../refs/unit.dual_button.ref
55

66
Support the following products:
77

8-
9-
|Dual_Button|
8+
|Dual_Button|
109

1110

1211
Micropython Example::
@@ -30,21 +29,20 @@ Micropython Example::
3029
print(dual_button_0_blue.isHolding())
3130

3231

33-
34-
3532
UIFLOW2 Example:
3633

3734
|example.svg|
3835

3936
.. only:: builder_html
4037

41-
|dual_button_core_example.m5f2|
38+
|dual_button_core_example.m5f2|
39+
4240

4341
class DualButton
4442
-----------------
4543

4644
Constructors
47-
--------------
45+
------------
4846

4947
.. class:: DualButton(IO1,IO2)
5048

@@ -53,7 +51,6 @@ Constructors
5351
The parameters are:
5452
- ``IO1,IO2`` Define two key pins.
5553

56-
5754
UIFLOW2:
5855

5956
|init.svg|
@@ -64,13 +61,13 @@ Methods
6461

6562
.. method:: Dual_Button.isHolding()
6663

67-
6864
The parameters are:
6965

7066
UIFLOW2:
7167

7268
|get_status.svg|
7369

70+
7471
.. method:: Dual_Button.setCallback()
7572

7673
Execute the program when the key is pressed.
@@ -79,11 +76,11 @@ Methods
7976

8077
|setCallback.svg|
8178

79+
8280
.. method:: Dual_Button.tick()
8381

8482
The polling method, placed in the loop function, constantly detects the state of the key.
8583

8684
UIFLOW2:
8785

8886
|tick.svg|
89-

0 commit comments

Comments
 (0)