Update documentation

This commit is contained in:
Konstantin Lampalzer 2022-01-09 18:41:17 +01:00
parent e9d663963d
commit 16a3609f9f
21 changed files with 854 additions and 28 deletions

View file

@ -95,7 +95,9 @@
<li class="toctree-l1"><a class="reference internal" href="Linefollower.html">Linefollower Examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="Logging.html">Logging</a></li>
<li class="toctree-l1"><a class="reference internal" href="Motor.html">Motor</a></li>
<li class="toctree-l1"><a class="reference internal" href="Odom.html">Odometry</a></li>
<li class="toctree-l1"><a class="reference internal" href="QC.html">Quality Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="Robot.html">Robot</a></li>
<li class="toctree-l1"><a class="reference internal" href="Servo.html">Servo</a></li>
<li class="toctree-l1"><a class="reference internal" href="Vision.html">Vision</a></li>
</ul>
@ -191,6 +193,26 @@
<dd><p>Reset all encoder positions to 0</p>
</dd></dl>
<dl class="py method">
<dt id="compLib.Encoder.Encoder.handle_wrap">
<em class="property">static </em><code class="sig-name descname">handle_wrap</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">raw_value</span></em>, <em class="sig-param"><span class="n">port</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Encoder.Encoder.handle_wrap" title="Permalink to this definition"></a></dt>
<dd><p>Handle overflow and underflow of int for encoders.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>raw_value</strong> Raw value which was read on port</p></li>
<li><p><strong>port</strong> Port, which the motor is connected to. Between 1 and 4</p></li>
</ul>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><p>IndexError</p>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>Current encoder position</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="compLib.Encoder.Encoder.read">
<em class="property">static </em><code class="sig-name descname">read</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">port</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#compLib.Encoder.Encoder.read" title="Permalink to this definition"></a></dt>
@ -208,6 +230,30 @@
</dl>
</dd></dl>
<dl class="py method">
<dt id="compLib.Encoder.Encoder.read_all">
<em class="property">static </em><code class="sig-name descname">read_all</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Encoder.Encoder.read_all" title="Permalink to this definition"></a></dt>
<dd><p>Read all encoders at once.
This is faster than read as it only uses one SPI call for all encoders!</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>Tuple of all current encoder positions</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="compLib.Encoder.Encoder.read_all_raw">
<em class="property">static </em><code class="sig-name descname">read_all_raw</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Encoder.Encoder.read_all_raw" title="Permalink to this definition"></a></dt>
<dd><p>Read all encoders at once.
This is faster than read_raw as it only uses one SPI call for all encoders!</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>Tuple of all current raw encoder positions</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="compLib.Encoder.Encoder.read_raw">
<em class="property">static </em><code class="sig-name descname">read_raw</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">port</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#compLib.Encoder.Encoder.read_raw" title="Permalink to this definition"></a></dt>
@ -251,7 +297,7 @@
<div role="contentinfo">
<p>
&copy; Copyright 2021, robo4you
&copy; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
</p>
</div>