Skip to content

Commit 8024b05

Browse files
committed
added unit2 docstring
1 parent b6b7279 commit 8024b05

File tree

25 files changed

+2053
-194
lines changed

25 files changed

+2053
-194
lines changed

docs/generate.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
cd $(dirname $0)/..
22

3-
pdoc --html --output-dir docs/ --force python_lib/isotope/isotope --template-dir docs/templates/
3+
pdoc --html --output-dir docs/ --force python_lib/isotope/isotope --template-dir docs/templates/
4+
pdoc --html --output-dir docs/ --force python_lib/unit2_controller/unit2_controller --template-dir docs/templates/

docs/index.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ <h2 class="section-title" id="header-submodules">Packages</h2>
3333
<dd>
3434
<div class="desc"><p>Python library for communicating with the Isotope Breakout board.</p></div>
3535
</dd>
36+
<dt><code class="name"><a title="unit2_controller" href="unit2_controller/index.html">unit2_controller</a></code></dt>
37+
<dd>
38+
<div class="desc"><p>Python library for controlling Unit2.</p></div>
39+
</dd>
3640
</dl>
3741
</section>
3842
<section>
@@ -51,6 +55,9 @@ <h2 class="section-title" id="header-submodules">Packages</h2>
5155
<ul>
5256
<li><code><a title="isotope" href="isotope/index.html">isotope</a></code></li>
5357
</ul>
58+
<ul>
59+
<li><code><a title="unit2_controller" href="unit2_controller/index.html">unit2_controller</a></code></li>
60+
</ul>
5461
</li>
5562
</ul>
5663
</nav>

docs/isotope/port/adc_input.html

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ <h1 class="title">Module <code>isotope.port.adc_input</code></h1>
3030
while the <code><a title="isotope.port.adc_input.ADCInput" href="#isotope.port.adc_input.ADCInput">ADCInput</a></code> class inherits from the <code><a title="isotope.port.isotope_port.IsotopePortContainer" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer">IsotopePortContainer</a></code> class as a list-like container that holds <code><a title="isotope.port.adc_input.ADCInputPort" href="#isotope.port.adc_input.ADCInputPort">ADCInputPort</a></code>
3131
instances for all available ADC ports on the Isotope board.</p>
3232
<h2 id="notes">Notes</h2>
33-
<p>Users are encouraged to use the Isotope class to access the ports instead of creating their own instances of these
33+
<p>Users are encouraged to use the isotope.Isotope class to access the ports instead of creating their own instances of these
3434
class directly.</p>
3535
<h2 id="example">Example</h2>
3636
<pre><code>import isotope
@@ -94,15 +94,29 @@ <h3>Ancestors</h3>
9494
<li><a title="isotope.port.isotope_port.IsotopePortContainer" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer">IsotopePortContainer</a></li>
9595
<li>typing.Generic</li>
9696
</ul>
97-
<h3>Inherited members</h3>
98-
<ul class="hlist">
99-
<li><code><b><a title="isotope.port.isotope_port.IsotopePortContainer" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer">IsotopePortContainer</a></b></code>:
100-
<ul class="hlist">
101-
<li><code><a title="isotope.port.isotope_port.IsotopePortContainer.__getitem__" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer.__getitem__">__getitem__</a></code></li>
102-
<li><code><a title="isotope.port.isotope_port.IsotopePortContainer.__len__" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer.__len__">__len__</a></code></li>
103-
</ul>
104-
</li>
105-
</ul>
97+
<h3>Methods</h3>
98+
<dl>
99+
<dt id="isotope.port.adc_input.ADCInput.__getitem__"><code class="name flex">
100+
<span>def <span class="ident">__getitem__</span></span>(<span>self, key: int) ‑> ~T</span>
101+
</code></dt>
102+
<dd>
103+
<p class="inheritance">
104+
<em>Inherited from:</em>
105+
<code><a title="isotope.port.isotope_port.IsotopePortContainer" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer">IsotopePortContainer</a></code>.<code><a title="isotope.port.isotope_port.IsotopePortContainer.__getitem__" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer.__getitem__">__getitem__</a></code>
106+
</p>
107+
<div class="desc inherited"><p>Get the specific IsotopePort object by index …</p></div>
108+
</dd>
109+
<dt id="isotope.port.adc_input.ADCInput.__len__"><code class="name flex">
110+
<span>def <span class="ident">__len__</span></span>(<span>self) ‑> int</span>
111+
</code></dt>
112+
<dd>
113+
<p class="inheritance">
114+
<em>Inherited from:</em>
115+
<code><a title="isotope.port.isotope_port.IsotopePortContainer" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer">IsotopePortContainer</a></code>.<code><a title="isotope.port.isotope_port.IsotopePortContainer.__len__" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer.__len__">__len__</a></code>
116+
</p>
117+
<div class="desc inherited"><p>Get the number of ports …</p></div>
118+
</dd>
119+
</dl>
106120
</dd>
107121
<dt id="isotope.port.adc_input.ADCInputPort"><code class="flex name class">
108122
<span>class <span class="ident">ADCInputPort</span></span>
@@ -161,6 +175,17 @@ <h3>Ancestors</h3>
161175
<ul class="hlist">
162176
<li><a title="isotope.port.isotope_port.IsotopePort" href="isotope_port.html#isotope.port.isotope_port.IsotopePort">IsotopePort</a></li>
163177
</ul>
178+
<h3>Instance variables</h3>
179+
<dl>
180+
<dt id="isotope.port.adc_input.ADCInputPort.id"><code class="name">prop <span class="ident">id</span> : int</code></dt>
181+
<dd>
182+
<p class="inheritance">
183+
<em>Inherited from:</em>
184+
<code><a title="isotope.port.isotope_port.IsotopePort" href="isotope_port.html#isotope.port.isotope_port.IsotopePort">IsotopePort</a></code>.<code><a title="isotope.port.isotope_port.IsotopePort.id" href="isotope_port.html#isotope.port.isotope_port.IsotopePort.id">id</a></code>
185+
</p>
186+
<div class="desc inherited"><p>Get the ID of the port …</p></div>
187+
</dd>
188+
</dl>
164189
<h3>Methods</h3>
165190
<dl>
166191
<dt id="isotope.port.adc_input.ADCInputPort.get_value"><code class="name flex">
@@ -175,14 +200,6 @@ <h2 id="returns">Returns</h2>
175200
</dl></div>
176201
</dd>
177202
</dl>
178-
<h3>Inherited members</h3>
179-
<ul class="hlist">
180-
<li><code><b><a title="isotope.port.isotope_port.IsotopePort" href="isotope_port.html#isotope.port.isotope_port.IsotopePort">IsotopePort</a></b></code>:
181-
<ul class="hlist">
182-
<li><code><a title="isotope.port.isotope_port.IsotopePort.id" href="isotope_port.html#isotope.port.isotope_port.IsotopePort.id">id</a></code></li>
183-
</ul>
184-
</li>
185-
</ul>
186203
</dd>
187204
</dl>
188205
</section>
@@ -251,11 +268,16 @@ <h3>Inherited members</h3>
251268
<ul>
252269
<li>
253270
<h4><code><a title="isotope.port.adc_input.ADCInput" href="#isotope.port.adc_input.ADCInput">ADCInput</a></code></h4>
271+
<ul class="">
272+
<li><code><a title="isotope.port.adc_input.ADCInput.__getitem__" href="isotope_port.html#isotope.port.adc_input.ADCInput.__getitem__">__getitem__</a></code></li>
273+
<li><code><a title="isotope.port.adc_input.ADCInput.__len__" href="isotope_port.html#isotope.port.adc_input.ADCInput.__len__">__len__</a></code></li>
274+
</ul>
254275
</li>
255276
<li>
256277
<h4><code><a title="isotope.port.adc_input.ADCInputPort" href="#isotope.port.adc_input.ADCInputPort">ADCInputPort</a></code></h4>
257278
<ul class="">
258279
<li><code><a title="isotope.port.adc_input.ADCInputPort.get_value" href="#isotope.port.adc_input.ADCInputPort.get_value">get_value</a></code></li>
280+
<li><code><a title="isotope.port.adc_input.ADCInputPort.id" href="isotope_port.html#isotope.port.adc_input.ADCInputPort.id">id</a></code></li>
259281
</ul>
260282
</li>
261283
</ul>

docs/isotope/port/motor.html

Lines changed: 37 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ <h1 class="title">Module <code>isotope.port.motor</code></h1>
3030
while the <code><a title="isotope.port.motor.Motor" href="#isotope.port.motor.Motor">Motor</a></code> class inherits from the <code><a title="isotope.port.isotope_port.IsotopePortContainer" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer">IsotopePortContainer</a></code> class as a list-like container that holds <code><a title="isotope.port.motor.MotorPort" href="#isotope.port.motor.MotorPort">MotorPort</a></code>
3131
instances for all available MOT ports on the Isotope board.</p>
3232
<h2 id="notes">Notes</h2>
33-
<p>Users are encouraged to use the Isotope class to access the ports instead of creating their own instances of these
33+
<p>Users are encouraged to use the isotope.Isotope class to access the ports instead of creating their own instances of these
3434
class directly.</p>
3535
<h2 id="example">Example</h2>
3636
<pre><code>import isotope
@@ -116,15 +116,29 @@ <h3>Ancestors</h3>
116116
<li><a title="isotope.port.isotope_port.IsotopePortContainer" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer">IsotopePortContainer</a></li>
117117
<li>typing.Generic</li>
118118
</ul>
119-
<h3>Inherited members</h3>
120-
<ul class="hlist">
121-
<li><code><b><a title="isotope.port.isotope_port.IsotopePortContainer" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer">IsotopePortContainer</a></b></code>:
122-
<ul class="hlist">
123-
<li><code><a title="isotope.port.isotope_port.IsotopePortContainer.__getitem__" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer.__getitem__">__getitem__</a></code></li>
124-
<li><code><a title="isotope.port.isotope_port.IsotopePortContainer.__len__" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer.__len__">__len__</a></code></li>
125-
</ul>
126-
</li>
127-
</ul>
119+
<h3>Methods</h3>
120+
<dl>
121+
<dt id="isotope.port.motor.Motor.__getitem__"><code class="name flex">
122+
<span>def <span class="ident">__getitem__</span></span>(<span>self, key: int) ‑> ~T</span>
123+
</code></dt>
124+
<dd>
125+
<p class="inheritance">
126+
<em>Inherited from:</em>
127+
<code><a title="isotope.port.isotope_port.IsotopePortContainer" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer">IsotopePortContainer</a></code>.<code><a title="isotope.port.isotope_port.IsotopePortContainer.__getitem__" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer.__getitem__">__getitem__</a></code>
128+
</p>
129+
<div class="desc inherited"><p>Get the specific IsotopePort object by index …</p></div>
130+
</dd>
131+
<dt id="isotope.port.motor.Motor.__len__"><code class="name flex">
132+
<span>def <span class="ident">__len__</span></span>(<span>self) ‑> int</span>
133+
</code></dt>
134+
<dd>
135+
<p class="inheritance">
136+
<em>Inherited from:</em>
137+
<code><a title="isotope.port.isotope_port.IsotopePortContainer" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer">IsotopePortContainer</a></code>.<code><a title="isotope.port.isotope_port.IsotopePortContainer.__len__" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer.__len__">__len__</a></code>
138+
</p>
139+
<div class="desc inherited"><p>Get the number of ports …</p></div>
140+
</dd>
141+
</dl>
128142
</dd>
129143
<dt id="isotope.port.motor.MotorPort"><code class="flex name class">
130144
<span>class <span class="ident">MotorPort</span></span>
@@ -394,6 +408,14 @@ <h2 id="returns">Returns</h2>
394408
return self._current</code></pre>
395409
</details>
396410
</dd>
411+
<dt id="isotope.port.motor.MotorPort.id"><code class="name">prop <span class="ident">id</span> : int</code></dt>
412+
<dd>
413+
<p class="inheritance">
414+
<em>Inherited from:</em>
415+
<code><a title="isotope.port.isotope_port.IsotopePort" href="isotope_port.html#isotope.port.isotope_port.IsotopePort">IsotopePort</a></code>.<code><a title="isotope.port.isotope_port.IsotopePort.id" href="isotope_port.html#isotope.port.isotope_port.IsotopePort.id">id</a></code>
416+
</p>
417+
<div class="desc inherited"><p>Get the ID of the port …</p></div>
418+
</dd>
397419
<dt id="isotope.port.motor.MotorPort.resolution"><code class="name">prop <span class="ident">resolution</span> : int</code></dt>
398420
<dd>
399421
<div class="desc"><p>Get the configured step resolution of the motor in degrees.</p>
@@ -579,14 +601,6 @@ <h2 id="returns">Returns</h2>
579601
</dl></div>
580602
</dd>
581603
</dl>
582-
<h3>Inherited members</h3>
583-
<ul class="hlist">
584-
<li><code><b><a title="isotope.port.isotope_port.IsotopePort" href="isotope_port.html#isotope.port.isotope_port.IsotopePort">IsotopePort</a></b></code>:
585-
<ul class="hlist">
586-
<li><code><a title="isotope.port.isotope_port.IsotopePort.id" href="isotope_port.html#isotope.port.isotope_port.IsotopePort.id">id</a></code></li>
587-
</ul>
588-
</li>
589-
</ul>
590604
</dd>
591605
</dl>
592606
</section>
@@ -655,6 +669,10 @@ <h3>Inherited members</h3>
655669
<ul>
656670
<li>
657671
<h4><code><a title="isotope.port.motor.Motor" href="#isotope.port.motor.Motor">Motor</a></code></h4>
672+
<ul class="">
673+
<li><code><a title="isotope.port.motor.Motor.__getitem__" href="isotope_port.html#isotope.port.motor.Motor.__getitem__">__getitem__</a></code></li>
674+
<li><code><a title="isotope.port.motor.Motor.__len__" href="isotope_port.html#isotope.port.motor.Motor.__len__">__len__</a></code></li>
675+
</ul>
658676
</li>
659677
<li>
660678
<h4><code><a title="isotope.port.motor.MotorPort" href="#isotope.port.motor.MotorPort">MotorPort</a></code></h4>
@@ -663,6 +681,7 @@ <h4><code><a title="isotope.port.motor.MotorPort" href="#isotope.port.motor.Moto
663681
<li><code><a title="isotope.port.motor.MotorPort.current" href="#isotope.port.motor.MotorPort.current">current</a></code></li>
664682
<li><code><a title="isotope.port.motor.MotorPort.disable" href="#isotope.port.motor.MotorPort.disable">disable</a></code></li>
665683
<li><code><a title="isotope.port.motor.MotorPort.enable" href="#isotope.port.motor.MotorPort.enable">enable</a></code></li>
684+
<li><code><a title="isotope.port.motor.MotorPort.id" href="isotope_port.html#isotope.port.motor.MotorPort.id">id</a></code></li>
666685
<li><code><a title="isotope.port.motor.MotorPort.is_enabled" href="#isotope.port.motor.MotorPort.is_enabled">is_enabled</a></code></li>
667686
<li><code><a title="isotope.port.motor.MotorPort.resolution" href="#isotope.port.motor.MotorPort.resolution">resolution</a></code></li>
668687
<li><code><a title="isotope.port.motor.MotorPort.rotate_by_degrees" href="#isotope.port.motor.MotorPort.rotate_by_degrees">rotate_by_degrees</a></code></li>

docs/isotope/port/power_output.html

Lines changed: 38 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h1 class="title">Module <code>isotope.port.power_output</code></h1>
3232
while the <code><a title="isotope.port.power_output.PowerOutput" href="#isotope.port.power_output.PowerOutput">PowerOutput</a></code> class inherits from the <code><a title="isotope.port.isotope_port.IsotopePortContainer" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer">IsotopePortContainer</a></code> class as a list-like container that holds <code><a title="isotope.port.power_output.PowerOutputPort" href="#isotope.port.power_output.PowerOutputPort">PowerOutputPort</a></code>
3333
instances for all available Output ports on the Isotope board.</p>
3434
<h2 id="notes">Notes</h2>
35-
<p>Users are encouraged to use the Isotope class to access the ports instead of creating their own instances of these
35+
<p>Users are encouraged to use the isotope.Isotope class to access the ports instead of creating their own instances of these
3636
class directly.</p>
3737
<h2 id="example">Example</h2>
3838
<pre><code>import isotope
@@ -102,15 +102,29 @@ <h3>Ancestors</h3>
102102
<li><a title="isotope.port.isotope_port.IsotopePortContainer" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer">IsotopePortContainer</a></li>
103103
<li>typing.Generic</li>
104104
</ul>
105-
<h3>Inherited members</h3>
106-
<ul class="hlist">
107-
<li><code><b><a title="isotope.port.isotope_port.IsotopePortContainer" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer">IsotopePortContainer</a></b></code>:
108-
<ul class="hlist">
109-
<li><code><a title="isotope.port.isotope_port.IsotopePortContainer.__getitem__" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer.__getitem__">__getitem__</a></code></li>
110-
<li><code><a title="isotope.port.isotope_port.IsotopePortContainer.__len__" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer.__len__">__len__</a></code></li>
111-
</ul>
112-
</li>
113-
</ul>
105+
<h3>Methods</h3>
106+
<dl>
107+
<dt id="isotope.port.power_output.PowerOutput.__getitem__"><code class="name flex">
108+
<span>def <span class="ident">__getitem__</span></span>(<span>self, key: int) ‑> ~T</span>
109+
</code></dt>
110+
<dd>
111+
<p class="inheritance">
112+
<em>Inherited from:</em>
113+
<code><a title="isotope.port.isotope_port.IsotopePortContainer" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer">IsotopePortContainer</a></code>.<code><a title="isotope.port.isotope_port.IsotopePortContainer.__getitem__" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer.__getitem__">__getitem__</a></code>
114+
</p>
115+
<div class="desc inherited"><p>Get the specific IsotopePort object by index …</p></div>
116+
</dd>
117+
<dt id="isotope.port.power_output.PowerOutput.__len__"><code class="name flex">
118+
<span>def <span class="ident">__len__</span></span>(<span>self) ‑> int</span>
119+
</code></dt>
120+
<dd>
121+
<p class="inheritance">
122+
<em>Inherited from:</em>
123+
<code><a title="isotope.port.isotope_port.IsotopePortContainer" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer">IsotopePortContainer</a></code>.<code><a title="isotope.port.isotope_port.IsotopePortContainer.__len__" href="isotope_port.html#isotope.port.isotope_port.IsotopePortContainer.__len__">__len__</a></code>
124+
</p>
125+
<div class="desc inherited"><p>Get the number of ports …</p></div>
126+
</dd>
127+
</dl>
114128
</dd>
115129
<dt id="isotope.port.power_output.PowerOutputPort"><code class="flex name class">
116130
<span>class <span class="ident">PowerOutputPort</span></span>
@@ -266,6 +280,14 @@ <h2 id="returns">Returns</h2>
266280
return self._defaut_pwm</code></pre>
267281
</details>
268282
</dd>
283+
<dt id="isotope.port.power_output.PowerOutputPort.id"><code class="name">prop <span class="ident">id</span> : int</code></dt>
284+
<dd>
285+
<p class="inheritance">
286+
<em>Inherited from:</em>
287+
<code><a title="isotope.port.isotope_port.IsotopePort" href="isotope_port.html#isotope.port.isotope_port.IsotopePort">IsotopePort</a></code>.<code><a title="isotope.port.isotope_port.IsotopePort.id" href="isotope_port.html#isotope.port.isotope_port.IsotopePort.id">id</a></code>
288+
</p>
289+
<div class="desc inherited"><p>Get the ID of the port …</p></div>
290+
</dd>
269291
</dl>
270292
<h3>Methods</h3>
271293
<dl>
@@ -323,14 +345,6 @@ <h2 id="returns">Returns</h2>
323345
</dl></div>
324346
</dd>
325347
</dl>
326-
<h3>Inherited members</h3>
327-
<ul class="hlist">
328-
<li><code><b><a title="isotope.port.isotope_port.IsotopePort" href="isotope_port.html#isotope.port.isotope_port.IsotopePort">IsotopePort</a></b></code>:
329-
<ul class="hlist">
330-
<li><code><a title="isotope.port.isotope_port.IsotopePort.id" href="isotope_port.html#isotope.port.isotope_port.IsotopePort.id">id</a></code></li>
331-
</ul>
332-
</li>
333-
</ul>
334348
</dd>
335349
</dl>
336350
</section>
@@ -399,14 +413,19 @@ <h3>Inherited members</h3>
399413
<ul>
400414
<li>
401415
<h4><code><a title="isotope.port.power_output.PowerOutput" href="#isotope.port.power_output.PowerOutput">PowerOutput</a></code></h4>
416+
<ul class="">
417+
<li><code><a title="isotope.port.power_output.PowerOutput.__getitem__" href="isotope_port.html#isotope.port.power_output.PowerOutput.__getitem__">__getitem__</a></code></li>
418+
<li><code><a title="isotope.port.power_output.PowerOutput.__len__" href="isotope_port.html#isotope.port.power_output.PowerOutput.__len__">__len__</a></code></li>
419+
</ul>
402420
</li>
403421
<li>
404422
<h4><code><a title="isotope.port.power_output.PowerOutputPort" href="#isotope.port.power_output.PowerOutputPort">PowerOutputPort</a></code></h4>
405-
<ul class="">
423+
<ul class="two-column">
406424
<li><code><a title="isotope.port.power_output.PowerOutputPort.default_pwm" href="#isotope.port.power_output.PowerOutputPort.default_pwm">default_pwm</a></code></li>
407425
<li><code><a title="isotope.port.power_output.PowerOutputPort.disable" href="#isotope.port.power_output.PowerOutputPort.disable">disable</a></code></li>
408426
<li><code><a title="isotope.port.power_output.PowerOutputPort.enable" href="#isotope.port.power_output.PowerOutputPort.enable">enable</a></code></li>
409427
<li><code><a title="isotope.port.power_output.PowerOutputPort.get_pwm" href="#isotope.port.power_output.PowerOutputPort.get_pwm">get_pwm</a></code></li>
428+
<li><code><a title="isotope.port.power_output.PowerOutputPort.id" href="isotope_port.html#isotope.port.power_output.PowerOutputPort.id">id</a></code></li>
410429
<li><code><a title="isotope.port.power_output.PowerOutputPort.is_enabled" href="#isotope.port.power_output.PowerOutputPort.is_enabled">is_enabled</a></code></li>
411430
</ul>
412431
</li>

0 commit comments

Comments
 (0)