Update documentation

This commit is contained in:
Konstantin Lampalzer 2021-01-23 13:37:07 +01:00
parent f72550146d
commit a7f5dd13c4
No known key found for this signature in database
GPG key ID: 9A60A522835A2AD9
23 changed files with 541 additions and 189 deletions

View file

@ -3,9 +3,9 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Api &mdash; CompLib 0.0.2 documentation</title>
@ -16,13 +16,10 @@
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
@ -53,7 +50,7 @@
<a href="../index.html" class="icon icon-home"> CompLib
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
@ -101,6 +98,7 @@
<li class="toctree-l1"><a class="reference internal" href="Battery.html">Battery</a></li>
<li class="toctree-l1"><a class="reference internal" href="Buzzer.html">Buzzer</a></li>
<li class="toctree-l1"><a class="reference internal" href="IRSensor.html">Infrared Sensor</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="Servo.html">Servo</a></li>
<li class="toctree-l1"><a class="reference internal" href="Vision.html">Vision</a></li>
@ -144,8 +142,6 @@
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
@ -157,7 +153,7 @@
<li class="wy-breadcrumbs-aside">
<a href="../_sources/lib/Api.rst.txt" rel="nofollow"> View page source</a>
@ -305,14 +301,14 @@
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">compLib.Api</span> <span class="kn">import</span> <span class="n">Seeding</span>
<span class="n">park</span> <span class="o">=</span> <span class="n">Seeding</span><span class="o">.</span><span class="n">get_park</span><span class="p">()</span>
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;I should move to parking position: {park}&quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;I should move to parking position: </span><span class="si">{</span><span class="n">park</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">park</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;I can&#39;t move to this position yet :(&quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;I can&#39;t move to this position yet :(&quot;</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">park</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;Moving to position 1!&quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Moving to position 1!&quot;</span><span class="p">)</span>
<span class="c1"># drive to parking position using Motors module...</span>
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;Now hopefully at position 1&quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Now hopefully at position 1&quot;</span><span class="p">)</span>
<span class="c1"># drive back using Motors module...</span>
<span class="k">elif</span> <span class="n">park</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span>
<span class="c1"># do something similar to park == 1..</span>
@ -321,9 +317,9 @@
<span class="n">success</span> <span class="o">=</span> <span class="n">Seeding</span><span class="o">.</span><span class="n">pay_park</span><span class="p">()</span>
<span class="k">if</span> <span class="n">success</span><span class="p">:</span>
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;We scored some points!&quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;We scored some points!&quot;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;We failed :(&quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;We failed :(&quot;</span><span class="p">)</span>
</pre></div>
</div>
</div>
@ -332,10 +328,10 @@
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">compLib.Api</span> <span class="kn">import</span> <span class="n">DoubleElim</span>
<span class="n">position</span> <span class="o">=</span> <span class="n">DoubleElim</span><span class="o">.</span><span class="n">get_position</span><span class="p">()</span>
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;Position of my robot is: x={position.x}, y={position.y} and rotation is: {position.degrees}&quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Position of my robot is: x=</span><span class="si">{</span><span class="n">position</span><span class="o">.</span><span class="n">x</span><span class="si">}</span><span class="s2">, y=</span><span class="si">{</span><span class="n">position</span><span class="o">.</span><span class="n">y</span><span class="si">}</span><span class="s2"> and rotation is: </span><span class="si">{</span><span class="n">position</span><span class="o">.</span><span class="n">degrees</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="n">goal</span> <span class="o">=</span> <span class="n">DoubleElim</span><span class="o">.</span><span class="n">get_goal</span><span class="p">()</span>
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;Goal is at: x={goal.x}, y={goal.y}&quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Goal is at: x=</span><span class="si">{</span><span class="n">goal</span><span class="o">.</span><span class="n">x</span><span class="si">}</span><span class="s2">, y=</span><span class="si">{</span><span class="n">goal</span><span class="o">.</span><span class="n">y</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
</pre></div>
</div>
</div>
@ -347,29 +343,37 @@
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="Battery.html" class="btn btn-neutral float-right" title="Battery" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="../other/usage.html" class="btn btn-neutral float-left" title="Usage" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="Battery.html" class="btn btn-neutral float-right" title="Battery" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="../other/usage.html" class="btn btn-neutral float-left" title="Usage" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2021, robo4you.
&copy; Copyright 2021, robo4you
</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>

View file

@ -3,9 +3,9 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Battery &mdash; CompLib 0.0.2 documentation</title>
@ -16,13 +16,10 @@
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
@ -53,7 +50,7 @@
<a href="../index.html" class="icon icon-home"> CompLib
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
@ -98,6 +95,7 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="Buzzer.html">Buzzer</a></li>
<li class="toctree-l1"><a class="reference internal" href="IRSensor.html">Infrared Sensor</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="Servo.html">Servo</a></li>
<li class="toctree-l1"><a class="reference internal" href="Vision.html">Vision</a></li>
@ -141,8 +139,6 @@
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
@ -154,7 +150,7 @@
<li class="wy-breadcrumbs-aside">
<a href="../_sources/lib/Battery.rst.txt" rel="nofollow"> View page source</a>
@ -199,7 +195,7 @@
<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>
<span class="k">print</span><span class="p">(</span><span class="n">Battery</span><span class="o">.</span><span class="n">percent</span><span class="p">())</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>
</div>
</div>
@ -211,29 +207,37 @@
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="Buzzer.html" class="btn btn-neutral float-right" title="Buzzer" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="Api.html" class="btn btn-neutral float-left" title="Api" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="Buzzer.html" class="btn btn-neutral float-right" title="Buzzer" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="Api.html" class="btn btn-neutral float-left" title="Api" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2021, robo4you.
&copy; Copyright 2021, robo4you
</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>

View file

@ -3,9 +3,9 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Buzzer &mdash; CompLib 0.0.2 documentation</title>
@ -16,13 +16,10 @@
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
@ -53,7 +50,7 @@
<a href="../index.html" class="icon icon-home"> CompLib
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
@ -98,6 +95,7 @@
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="IRSensor.html">Infrared Sensor</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="Servo.html">Servo</a></li>
<li class="toctree-l1"><a class="reference internal" href="Vision.html">Vision</a></li>
@ -141,8 +139,6 @@
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
@ -154,7 +150,7 @@
<li class="wy-breadcrumbs-aside">
<a href="../_sources/lib/Buzzer.rst.txt" rel="nofollow"> View page source</a>
@ -197,9 +193,9 @@
<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="n">Buzzer</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="bp">True</span><span class="p">)</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>
<span class="n">Buzzer</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="bp">False</span><span class="p">)</span>
<span class="n">Buzzer</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="kc">False</span><span class="p">)</span>
</pre></div>
</div>
</div>
@ -211,29 +207,37 @@
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="IRSensor.html" class="btn btn-neutral float-right" title="Infrared Sensor" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="Battery.html" class="btn btn-neutral float-left" title="Battery" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="IRSensor.html" class="btn btn-neutral float-right" title="Infrared Sensor" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="Battery.html" class="btn btn-neutral float-left" title="Battery" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2021, robo4you.
&copy; Copyright 2021, robo4you
</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>

View file

@ -3,9 +3,9 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Infrared Sensor &mdash; CompLib 0.0.2 documentation</title>
@ -16,13 +16,10 @@
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
@ -38,7 +35,7 @@
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Motor" href="Motor.html" />
<link rel="next" title="Logging" href="Logging.html" />
<link rel="prev" title="Buzzer" href="Buzzer.html" />
</head>
@ -53,7 +50,7 @@
<a href="../index.html" class="icon icon-home"> CompLib
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
@ -91,6 +88,7 @@
<li class="toctree-l1"><a class="reference internal" href="Battery.html">Battery</a></li>
<li class="toctree-l1"><a class="reference internal" href="Buzzer.html">Buzzer</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Infrared Sensor</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="Servo.html">Servo</a></li>
<li class="toctree-l1"><a class="reference internal" href="Vision.html">Vision</a></li>
@ -134,8 +132,6 @@
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
@ -147,7 +143,7 @@
<li class="wy-breadcrumbs-aside">
<a href="../_sources/lib/IRSensor.rst.txt" rel="nofollow"> View page source</a>
@ -246,29 +242,37 @@
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="Motor.html" class="btn btn-neutral float-right" title="Motor" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="Buzzer.html" class="btn btn-neutral float-left" title="Buzzer" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="Logging.html" class="btn btn-neutral float-right" title="Logging" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="Buzzer.html" class="btn btn-neutral float-left" title="Buzzer" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2021, robo4you.
&copy; Copyright 2021, robo4you
</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>

268
lib/Logging.html Normal file
View file

@ -0,0 +1,268 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Logging &mdash; CompLib 0.0.2 documentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Motor" href="Motor.html" />
<link rel="prev" title="Infrared Sensor" href="IRSensor.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">Robo4you Competition Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="Api.html">Api</a></li>
<li class="toctree-l1"><a class="reference internal" href="Battery.html">Battery</a></li>
<li class="toctree-l1"><a class="reference internal" href="Buzzer.html">Buzzer</a></li>
<li class="toctree-l1"><a class="reference internal" href="IRSensor.html">Infrared Sensor</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Logging</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#class-documentation">Class Documentation</a></li>
<li class="toctree-l2"><a class="reference internal" href="#examples">Examples</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#turn-up-the-logging">Turn up the logging</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Motor.html">Motor</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>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">CompLib</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Logging</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/lib/Logging.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="logging">
<span id="lib-logging"></span><h1>Logging<a class="headerlink" href="#logging" title="Permalink to this headline"></a></h1>
<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.LogstashLogging.Logging">
<em class="property">class </em><code class="sig-prename descclassname">compLib.LogstashLogging.</code><code class="sig-name descname">Logging</code><a class="headerlink" href="#compLib.LogstashLogging.Logging" title="Permalink to this definition"></a></dt>
<dd><p>Can be used to manually use the logger or turn up the logging level used for debugging this library.</p>
<dl class="py method">
<dt id="compLib.LogstashLogging.Logging.get_logger">
<em class="property">static </em><code class="sig-name descname">get_logger</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; logging.Logger<a class="headerlink" href="#compLib.LogstashLogging.Logging.get_logger" title="Permalink to this definition"></a></dt>
<dd><p>Get the logger object used to communicate with logstash</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>Python logger</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>logging.Logger</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="compLib.LogstashLogging.Logging.set_debug">
<em class="property">static </em><code class="sig-name descname">set_debug</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.LogstashLogging.Logging.set_debug" title="Permalink to this definition"></a></dt>
<dd><p>Turns up the logging level of the library to debug. Should be used, when debugging with the
Competition organizers</p>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<div class="section" id="turn-up-the-logging">
<h3>Turn up the logging<a class="headerlink" href="#turn-up-the-logging" 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.LogstashLogging</span> <span class="kn">import</span> <span class="n">Logging</span>
<span class="n">Logging</span><span class="o">.</span><span class="n">set_debug</span><span class="p">()</span>
</pre></div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="Motor.html" class="btn btn-neutral float-right" title="Motor" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="IRSensor.html" class="btn btn-neutral float-left" title="Infrared Sensor" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2021, robo4you
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

View file

@ -3,9 +3,9 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Motor &mdash; CompLib 0.0.2 documentation</title>
@ -16,13 +16,10 @@
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
@ -39,7 +36,7 @@
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Servo" href="Servo.html" />
<link rel="prev" title="Infrared Sensor" href="IRSensor.html" />
<link rel="prev" title="Logging" href="Logging.html" />
</head>
<body class="wy-body-for-nav">
@ -53,7 +50,7 @@
<a href="../index.html" class="icon icon-home"> CompLib
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
@ -91,6 +88,7 @@
<li class="toctree-l1"><a class="reference internal" href="Battery.html">Battery</a></li>
<li class="toctree-l1"><a class="reference internal" href="Buzzer.html">Buzzer</a></li>
<li class="toctree-l1"><a class="reference internal" href="IRSensor.html">Infrared Sensor</a></li>
<li class="toctree-l1"><a class="reference internal" href="Logging.html">Logging</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Motor</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#class-documentation">Class Documentation</a></li>
<li class="toctree-l2"><a class="reference internal" href="#examples">Examples</a><ul>
@ -141,8 +139,6 @@
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
@ -154,7 +150,7 @@
<li class="wy-breadcrumbs-aside">
<a href="../_sources/lib/Motor.rst.txt" rel="nofollow"> View page source</a>
@ -184,7 +180,7 @@
<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>
<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">float</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>
@ -193,6 +189,9 @@
<li><p><strong>percent</strong> Percentage of max speed. between -100 and 100</p></li>
</ul>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><p>IndexError</p>
</dd>
</dl>
</dd></dl>
@ -218,29 +217,37 @@
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="Servo.html" class="btn btn-neutral float-right" title="Servo" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="IRSensor.html" class="btn btn-neutral float-left" title="Infrared Sensor" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="Servo.html" class="btn btn-neutral float-right" title="Servo" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="Logging.html" class="btn btn-neutral float-left" title="Logging" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2021, robo4you.
&copy; Copyright 2021, robo4you
</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>

View file

@ -3,9 +3,9 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Servo &mdash; CompLib 0.0.2 documentation</title>
@ -16,13 +16,10 @@
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
@ -53,7 +50,7 @@
<a href="../index.html" class="icon icon-home"> CompLib
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
@ -91,6 +88,7 @@
<li class="toctree-l1"><a class="reference internal" href="Battery.html">Battery</a></li>
<li class="toctree-l1"><a class="reference internal" href="Buzzer.html">Buzzer</a></li>
<li class="toctree-l1"><a class="reference internal" href="IRSensor.html">Infrared Sensor</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 current"><a class="current reference internal" href="#">Servo</a></li>
<li class="toctree-l1"><a class="reference internal" href="Vision.html">Vision</a></li>
@ -134,8 +132,6 @@
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
@ -147,7 +143,7 @@
<li class="wy-breadcrumbs-aside">
<a href="../_sources/lib/Servo.rst.txt" rel="nofollow"> View page source</a>
@ -196,29 +192,37 @@
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="Vision.html" class="btn btn-neutral float-right" title="Vision" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="Motor.html" class="btn btn-neutral float-left" title="Motor" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="Vision.html" class="btn btn-neutral float-right" title="Vision" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="Motor.html" class="btn btn-neutral float-left" title="Motor" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2021, robo4you.
&copy; Copyright 2021, robo4you
</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>

View file

@ -3,9 +3,9 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vision &mdash; CompLib 0.0.2 documentation</title>
@ -16,13 +16,10 @@
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
@ -52,7 +49,7 @@
<a href="../index.html" class="icon icon-home"> CompLib
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
@ -90,6 +87,7 @@
<li class="toctree-l1"><a class="reference internal" href="Battery.html">Battery</a></li>
<li class="toctree-l1"><a class="reference internal" href="Buzzer.html">Buzzer</a></li>
<li class="toctree-l1"><a class="reference internal" href="IRSensor.html">Infrared Sensor</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="Servo.html">Servo</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Vision</a><ul>
@ -141,8 +139,6 @@
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
@ -154,7 +150,7 @@
<li class="wy-breadcrumbs-aside">
<a href="../_sources/lib/Vision.rst.txt" rel="nofollow"> View page source</a>
@ -258,7 +254,7 @@ point your raspberry pi camera to a chessboard and it should be detected.</p>
<span class="n">gray</span> <span class="o">=</span> <span class="n">cv2</span><span class="o">.</span><span class="n">cvtColor</span><span class="p">(</span><span class="n">frame</span><span class="p">,</span> <span class="n">cv2</span><span class="o">.</span><span class="n">COLOR_BGR2GRAY</span><span class="p">)</span>
<span class="c1"># find the chessboard corners</span>
<span class="n">ret</span><span class="p">,</span> <span class="n">corners</span> <span class="o">=</span> <span class="n">cv2</span><span class="o">.</span><span class="n">findChessboardCorners</span><span class="p">(</span><span class="n">gray</span><span class="p">,</span> <span class="p">(</span><span class="mi">6</span><span class="p">,</span> <span class="mi">9</span><span class="p">),</span> <span class="bp">None</span><span class="p">)</span>
<span class="n">ret</span><span class="p">,</span> <span class="n">corners</span> <span class="o">=</span> <span class="n">cv2</span><span class="o">.</span><span class="n">findChessboardCorners</span><span class="p">(</span><span class="n">gray</span><span class="p">,</span> <span class="p">(</span><span class="mi">6</span><span class="p">,</span> <span class="mi">9</span><span class="p">),</span> <span class="kc">None</span><span class="p">)</span>
<span class="c1"># draw detected chessboard position onto the image</span>
<span class="n">cv2</span><span class="o">.</span><span class="n">drawChessboardCorners</span><span class="p">(</span><span class="n">frame</span><span class="p">,</span> <span class="p">(</span><span class="mi">6</span><span class="p">,</span> <span class="mi">9</span><span class="p">),</span> <span class="n">corners</span><span class="p">,</span> <span class="n">ret</span><span class="p">)</span>
@ -281,28 +277,35 @@ point your raspberry pi camera to a chessboard and it should be detected.</p>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="Servo.html" class="btn btn-neutral float-left" title="Servo" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="Servo.html" class="btn btn-neutral float-left" title="Servo" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2021, robo4you.
&copy; Copyright 2021, robo4you
</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>