Update documentation
This commit is contained in:
parent
d555d55b2c
commit
f7a7dd37ed
13 changed files with 60 additions and 60 deletions
|
@ -165,12 +165,12 @@
|
|||
<div class="section" id="class-documentation">
|
||||
<h2>Class Documentation<a class="headerlink" href="#class-documentation" title="Permalink to this headline">¶</a></h2>
|
||||
<dl class="py class">
|
||||
<dt id="compLIB.Battery.Battery">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">compLIB.Battery.</code><code class="sig-name descname">Battery</code><a class="headerlink" href="#compLIB.Battery.Battery" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="compLib.Battery.Battery">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">compLib.Battery.</code><code class="sig-name descname">Battery</code><a class="headerlink" href="#compLib.Battery.Battery" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Used to interact with the battery</p>
|
||||
<dl class="py method">
|
||||
<dt id="compLIB.Battery.Battery.percent">
|
||||
<em class="property">static </em><code class="sig-name descname">percent</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → int<a class="headerlink" href="#compLIB.Battery.Battery.percent" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="compLib.Battery.Battery.percent">
|
||||
<em class="property">static </em><code class="sig-name descname">percent</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → int<a class="headerlink" href="#compLib.Battery.Battery.percent" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get battery percentage</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
|
@ -189,7 +189,7 @@
|
|||
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="section" id="printing-percentage">
|
||||
<h3>Printing percentage<a class="headerlink" href="#printing-percentage" title="Permalink to this headline">¶</a></h3>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">compLIB.Battery</span> <span class="kn">import</span> <span class="n">Battery</span>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">compLib.Battery</span> <span class="kn">import</span> <span class="n">Battery</span>
|
||||
|
||||
<span class="nb">print</span><span class="p">(</span><span class="n">Battery</span><span class="o">.</span><span class="n">percent</span><span class="p">())</span>
|
||||
</pre></div>
|
||||
|
|
|
@ -165,12 +165,12 @@
|
|||
<div class="section" id="class-documentation">
|
||||
<h2>Class Documentation<a class="headerlink" href="#class-documentation" title="Permalink to this headline">¶</a></h2>
|
||||
<dl class="py class">
|
||||
<dt id="compLIB.Buzzer.Buzzer">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">compLIB.Buzzer.</code><code class="sig-name descname">Buzzer</code><a class="headerlink" href="#compLIB.Buzzer.Buzzer" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="compLib.Buzzer.Buzzer">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">compLib.Buzzer.</code><code class="sig-name descname">Buzzer</code><a class="headerlink" href="#compLib.Buzzer.Buzzer" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Used to interact with the buzzer</p>
|
||||
<dl class="py method">
|
||||
<dt id="compLIB.Buzzer.Buzzer.set">
|
||||
<em class="property">static </em><code class="sig-name descname">set</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">on</span><span class="p">:</span> <span class="n">bool</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLIB.Buzzer.Buzzer.set" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="compLib.Buzzer.Buzzer.set">
|
||||
<em class="property">static </em><code class="sig-name descname">set</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">on</span><span class="p">:</span> <span class="n">bool</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Buzzer.Buzzer.set" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Turn the buzzer on / off</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
|
@ -187,7 +187,7 @@
|
|||
<div class="section" id="turning-buzzer-on-and-off">
|
||||
<h3>Turning buzzer on and off<a class="headerlink" href="#turning-buzzer-on-and-off" title="Permalink to this headline">¶</a></h3>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">time</span>
|
||||
<span class="kn">from</span> <span class="nn">compLIB.Buzzer</span> <span class="kn">import</span> <span class="n">Buzzer</span>
|
||||
<span class="kn">from</span> <span class="nn">compLib.Buzzer</span> <span class="kn">import</span> <span class="n">Buzzer</span>
|
||||
|
||||
<span class="n">Buzzer</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="kc">True</span><span class="p">)</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
|
||||
|
|
|
@ -156,12 +156,12 @@
|
|||
<div class="section" id="infrared-sensor">
|
||||
<span id="lib-irsensor"></span><h1>Infrared Sensor<a class="headerlink" href="#infrared-sensor" title="Permalink to this headline">¶</a></h1>
|
||||
<dl class="py class">
|
||||
<dt id="compLIB.IRSensor.IRSensor">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">compLIB.IRSensor.</code><code class="sig-name descname">IRSensor</code><a class="headerlink" href="#compLIB.IRSensor.IRSensor" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="compLib.IRSensor.IRSensor">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">compLib.IRSensor.</code><code class="sig-name descname">IRSensor</code><a class="headerlink" href="#compLib.IRSensor.IRSensor" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Access the different IR Sensors at top / bottom of the robot</p>
|
||||
<dl class="py method">
|
||||
<dt id="compLIB.IRSensor.IRSensor.bottom_left">
|
||||
<em class="property">static </em><code class="sig-name descname">bottom_left</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → bool<a class="headerlink" href="#compLIB.IRSensor.IRSensor.bottom_left" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="compLib.IRSensor.IRSensor.bottom_left">
|
||||
<em class="property">static </em><code class="sig-name descname">bottom_left</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → bool<a class="headerlink" href="#compLib.IRSensor.IRSensor.bottom_left" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get bottom left infrared sensor status</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
|
@ -174,8 +174,8 @@
|
|||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="compLIB.IRSensor.IRSensor.bottom_middle">
|
||||
<em class="property">static </em><code class="sig-name descname">bottom_middle</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → bool<a class="headerlink" href="#compLIB.IRSensor.IRSensor.bottom_middle" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="compLib.IRSensor.IRSensor.bottom_middle">
|
||||
<em class="property">static </em><code class="sig-name descname">bottom_middle</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → bool<a class="headerlink" href="#compLib.IRSensor.IRSensor.bottom_middle" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get bottom middle infrared sensor status</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
|
@ -188,8 +188,8 @@
|
|||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="compLIB.IRSensor.IRSensor.bottom_right">
|
||||
<em class="property">static </em><code class="sig-name descname">bottom_right</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → bool<a class="headerlink" href="#compLIB.IRSensor.IRSensor.bottom_right" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="compLib.IRSensor.IRSensor.bottom_right">
|
||||
<em class="property">static </em><code class="sig-name descname">bottom_right</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → bool<a class="headerlink" href="#compLib.IRSensor.IRSensor.bottom_right" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get bottom right infrared sensor status</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
|
@ -202,8 +202,8 @@
|
|||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="compLIB.IRSensor.IRSensor.top_left_percent">
|
||||
<em class="property">static </em><code class="sig-name descname">top_left_percent</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → int<a class="headerlink" href="#compLIB.IRSensor.IRSensor.top_left_percent" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="compLib.IRSensor.IRSensor.top_left_percent">
|
||||
<em class="property">static </em><code class="sig-name descname">top_left_percent</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → int<a class="headerlink" href="#compLib.IRSensor.IRSensor.top_left_percent" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get top left infrared sensor percentage</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
|
@ -216,8 +216,8 @@
|
|||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="compLIB.IRSensor.IRSensor.top_right_percent">
|
||||
<em class="property">static </em><code class="sig-name descname">top_right_percent</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → int<a class="headerlink" href="#compLIB.IRSensor.IRSensor.top_right_percent" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="compLib.IRSensor.IRSensor.top_right_percent">
|
||||
<em class="property">static </em><code class="sig-name descname">top_right_percent</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → int<a class="headerlink" href="#compLib.IRSensor.IRSensor.top_right_percent" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get top right infrared sensor percentage</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
|
|
|
@ -165,18 +165,18 @@
|
|||
<div class="section" id="class-documentation">
|
||||
<h2>Class Documentation<a class="headerlink" href="#class-documentation" title="Permalink to this headline">¶</a></h2>
|
||||
<dl class="py class">
|
||||
<dt id="compLIB.Motor.Motor">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">compLIB.Motor.</code><code class="sig-name descname">Motor</code><a class="headerlink" href="#compLIB.Motor.Motor" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="compLib.Motor.Motor">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">compLib.Motor.</code><code class="sig-name descname">Motor</code><a class="headerlink" href="#compLib.Motor.Motor" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Class used to control the motors</p>
|
||||
<dl class="py method">
|
||||
<dt id="compLIB.Motor.Motor.all_off">
|
||||
<em class="property">static </em><code class="sig-name descname">all_off</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLIB.Motor.Motor.all_off" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="compLib.Motor.Motor.all_off">
|
||||
<em class="property">static </em><code class="sig-name descname">all_off</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.all_off" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Turns of all motors</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="compLIB.Motor.Motor.power">
|
||||
<em class="property">static </em><code class="sig-name descname">power</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>, <em class="sig-param"><span class="n">percent</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLIB.Motor.Motor.power" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="compLib.Motor.Motor.power">
|
||||
<em class="property">static </em><code class="sig-name descname">power</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>, <em class="sig-param"><span class="n">percent</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.power" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Set specified motor to percentage power</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
|
@ -195,7 +195,7 @@
|
|||
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="section" id="driving-straight-maybe">
|
||||
<h3>Driving straight (maybe)<a class="headerlink" href="#driving-straight-maybe" title="Permalink to this headline">¶</a></h3>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">compLIB.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
|
||||
|
||||
<span class="k">for</span> <span class="n">port</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">4</span><span class="p">):</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="n">port</span><span class="p">,</span> <span class="mi">50</span><span class="p">)</span>
|
||||
|
|
|
@ -155,12 +155,12 @@
|
|||
<div class="section" id="servo">
|
||||
<span id="lib-servo"></span><h1>Servo<a class="headerlink" href="#servo" title="Permalink to this headline">¶</a></h1>
|
||||
<dl class="py class">
|
||||
<dt id="compLIB.Servo.Servo">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">compLIB.Servo.</code><code class="sig-name descname">Servo</code><a class="headerlink" href="#compLIB.Servo.Servo" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="compLib.Servo.Servo">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">compLib.Servo.</code><code class="sig-name descname">Servo</code><a class="headerlink" href="#compLib.Servo.Servo" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Control the servo ports on the robot</p>
|
||||
<dl class="py method">
|
||||
<dt id="compLIB.Servo.Servo.set_position">
|
||||
<em class="property">static </em><code class="sig-name descname">set_position</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">channel</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">angle</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLIB.Servo.Servo.set_position" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="compLib.Servo.Servo.set_position">
|
||||
<em class="property">static </em><code class="sig-name descname">set_position</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">channel</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">angle</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Servo.Servo.set_position" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Set position of servo connected to port</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
|
@ -173,8 +173,8 @@
|
|||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="compLIB.Servo.Servo.setup_position">
|
||||
<em class="property">static </em><code class="sig-name descname">setup_position</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLIB.Servo.Servo.setup_position" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="compLib.Servo.Servo.setup_position">
|
||||
<em class="property">static </em><code class="sig-name descname">setup_position</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Servo.Servo.setup_position" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Set position of servos to the position used during the setup process</p>
|
||||
</dd></dl>
|
||||
|
||||
|
|
Reference in a new issue