Update documentation

This commit is contained in:
Konstantin Lampalzer 2021-10-14 15:17:49 +02:00
parent 0dc9e8e161
commit e855429a8f
27 changed files with 2505 additions and 672 deletions

View file

@ -21,18 +21,16 @@ Simple Linefollower
IRSensor.set(4, True)
IRSensor.set(5, True)
DRIVE_SPEED = 85
TURN_SPEED = 50
COLOR_BREAK = 750
KP = 50.0
DRIVE_SPEED = 75
COLOR_BREAK = 900
KP = 10.0
KD = 0.0
def drive(leftSpeed, rightSpeed):
leftSpeed *= -1
rightSpeed *= 0.906
rightSpeed *= -0.906
Motor.power(1, min(max(-100, leftSpeed), 100))
Motor.power(2, min(max(-100, rightSpeed), 100))
Motor.power(1, min(max(-100, rightSpeed), 100))
Motor.power(4, min(max(-100, leftSpeed), 100))
def follow(sleepTime = 0.1):
lastError = 0
@ -58,7 +56,7 @@ Simple Linefollower
error = 3
elif error == -1.5:
error = -3
lastError = error
adjustment = KP * error + KD * (error - lastError)

71
_sources/lib/QC.rst.txt Normal file
View file

@ -0,0 +1,71 @@
.. _lib_qc:
Quality Control
###############
Infrared Test
-------------------------
.. code-block:: python
from compLib.IRSensor import IRSensor
import time
IRSensor.set(1, True)
IRSensor.set(2, True)
IRSensor.set(3, True)
IRSensor.set(4, True)
IRSensor.set(5, True)
while True:
t = time.time()
for i in range(1, 6):
print(f"{i}: {IRSensor.read(i)}")
print("")
time.sleep(0.2)
Motor Test
-------------------------
.. code-block:: python
from compLib.Motor import Motor
from compLib.Encoder import Encoder
import time
Motor.power(1, -50)
Motor.power(4, 50)
while True:
print(f"L:{Encoder.read(4)} R:{Encoder.read(1)}")
time.sleep(0.1)
Servo Test
-------------------------
.. code-block:: python
from compLib.Servo import Servo
import time
for i in range(1, 8 + 1):
Servo.set_position(i, 45)
print(f"{i}")
time.sleep(1)
Servo.setup_position()
time.sleep(10)
Vision Test
-------------------------
.. code-block:: python
import cv2
from compLib import Vision
from compLib.Servo import Servo
while True:
frame = Vision.Streaming.get_frame()
Vision.Streaming.publish_frame(frame)
Servo.set_position(3, -45)

View file

@ -130,7 +130,7 @@ ul.search li a {
font-weight: bold;
}
ul.search li p.context {
ul.search li div.context {
color: #888;
margin: 2px 0 0 30px;
text-align: left;
@ -277,25 +277,25 @@ p.rubric {
font-weight: bold;
}
img.align-left, figure.align-left, .figure.align-left, object.align-left {
img.align-left, .figure.align-left, object.align-left {
clear: left;
float: left;
margin-right: 1em;
}
img.align-right, figure.align-right, .figure.align-right, object.align-right {
img.align-right, .figure.align-right, object.align-right {
clear: right;
float: right;
margin-left: 1em;
}
img.align-center, figure.align-center, .figure.align-center, object.align-center {
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
img.align-default, figure.align-default, .figure.align-default {
img.align-default, .figure.align-default {
display: block;
margin-left: auto;
margin-right: auto;
@ -319,8 +319,7 @@ img.align-default, figure.align-default, .figure.align-default {
/* -- sidebars -------------------------------------------------------------- */
div.sidebar,
aside.sidebar {
div.sidebar {
margin: 0 0 0.5em 1em;
border: 1px solid #ddb;
padding: 7px;
@ -378,14 +377,12 @@ div.body p.centered {
/* -- content of sidebars/topics/admonitions -------------------------------- */
div.sidebar > :last-child,
aside.sidebar > :last-child,
div.topic > :last-child,
div.admonition > :last-child {
margin-bottom: 0;
}
div.sidebar::after,
aside.sidebar::after,
div.topic::after,
div.admonition::after,
blockquote::after {
@ -458,22 +455,20 @@ td > :last-child {
/* -- figures --------------------------------------------------------------- */
div.figure, figure {
div.figure {
margin: 0.5em;
padding: 0.5em;
}
div.figure p.caption, figcaption {
div.figure p.caption {
padding: 0.3em;
}
div.figure p.caption span.caption-number,
figcaption span.caption-number {
div.figure p.caption span.caption-number {
font-style: italic;
}
div.figure p.caption span.caption-text,
figcaption span.caption-text {
div.figure p.caption span.caption-text {
}
/* -- field list styles ----------------------------------------------------- */
@ -508,63 +503,6 @@ table.hlist td {
vertical-align: top;
}
/* -- object description styles --------------------------------------------- */
.sig {
font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
}
.sig-name, code.descname {
background-color: transparent;
font-weight: bold;
}
.sig-name {
font-size: 1.1em;
}
code.descname {
font-size: 1.2em;
}
.sig-prename, code.descclassname {
background-color: transparent;
}
.optional {
font-size: 1.3em;
}
.sig-paren {
font-size: larger;
}
.sig-param.n {
font-style: italic;
}
/* C++ specific styling */
.sig-inline.c-texpr,
.sig-inline.cpp-texpr {
font-family: unset;
}
.sig.c .k, .sig.c .kt,
.sig.cpp .k, .sig.cpp .kt {
color: #0033B3;
}
.sig.c .m,
.sig.cpp .m {
color: #1750EB;
}
.sig.c .s, .sig.c .sc,
.sig.cpp .s, .sig.cpp .sc {
color: #067D17;
}
/* -- other body styles ----------------------------------------------------- */
@ -691,6 +629,14 @@ dl.glossary dt {
font-size: 1.1em;
}
.optional {
font-size: 1.3em;
}
.sig-paren {
font-size: larger;
}
.versionmodified {
font-style: italic;
}
@ -819,12 +765,8 @@ div.code-block-caption code {
table.highlighttable td.linenos,
span.linenos,
div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
-webkit-user-select: text; /* Safari fallback only */
-webkit-user-select: none; /* Chrome/Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+ */
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
}
div.code-block-caption span.caption-number {
@ -839,6 +781,16 @@ div.literal-block-wrapper {
margin: 1em 0;
}
code.descname {
background-color: transparent;
font-weight: bold;
font-size: 1.2em;
}
code.descclassname {
background-color: transparent;
}
code.xref, a code {
background-color: transparent;
font-weight: bold;

File diff suppressed because one or more lines are too long

View file

@ -29,14 +29,9 @@ if (!window.console || !console.firebug) {
/**
* small helper function to urldecode strings
*
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
*/
jQuery.urldecode = function(x) {
if (!x) {
return x
}
return decodeURIComponent(x.replace(/\+/g, ' '));
return decodeURIComponent(x).replace(/\+/g, ' ');
};
/**
@ -301,14 +296,12 @@ var Documentation = {
window.location.href = prevHref;
return false;
}
break;
case 39: // right
var nextHref = $('link[rel="next"]').prop('href');
if (nextHref) {
window.location.href = nextHref;
return false;
}
break;
}
}
});

File diff suppressed because one or more lines are too long

View file

@ -13,8 +13,7 @@
var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
/* Non-minified version is copied as a separate JS file, is available */
/* Non-minified version JS is _stemmer.js if file is provided */
/**
* Porter Stemmer
*/
@ -200,6 +199,7 @@ var Stemmer = function() {
var splitChars = (function() {
var result = {};
var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648,

View file

@ -1,7 +1,7 @@
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
td.linenos pre { color: #000000; background-color: #f0f0f0; padding-left: 5px; padding-right: 5px; }
span.linenos { color: #000000; background-color: #f0f0f0; padding-left: 5px; padding-right: 5px; }
td.linenos pre.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight { background: #f8f8f8; }

View file

@ -248,7 +248,7 @@ var Search = {
// results left, load the summary and display it
if (results.length) {
var item = results.pop();
var listItem = $('<li></li>');
var listItem = $('<li style="display:none"></li>');
var requestUrl = "";
var linkUrl = "";
if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') {
@ -273,31 +273,28 @@ var Search = {
if (item[3]) {
listItem.append($('<span> (' + item[3] + ')</span>'));
Search.output.append(listItem);
setTimeout(function() {
listItem.slideDown(5, function() {
displayNextItem();
}, 5);
});
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
$.ajax({url: requestUrl,
dataType: "text",
complete: function(jqxhr, textstatus) {
var data = jqxhr.responseText;
if (data !== '' && data !== undefined) {
var summary = Search.makeSearchSummary(data, searchterms, hlterms);
if (summary) {
listItem.append(summary);
}
listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
}
Search.output.append(listItem);
setTimeout(function() {
listItem.slideDown(5, function() {
displayNextItem();
}, 5);
});
}});
} else {
// no source available, just display title
Search.output.append(listItem);
setTimeout(function() {
listItem.slideDown(5, function() {
displayNextItem();
}, 5);
});
}
}
// search finished, update title and status message
@ -382,13 +379,6 @@ var Search = {
return results;
},
/**
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
*/
escapeRegExp : function(string) {
return string.replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
},
/**
* search for full-text terms in the index
*/
@ -412,14 +402,13 @@ var Search = {
];
// add support for partial matches
if (word.length > 2) {
var word_regex = this.escapeRegExp(word);
for (var w in terms) {
if (w.match(word_regex) && !terms[word]) {
if (w.match(word) && !terms[word]) {
_o.push({files: terms[w], score: Scorer.partialTerm})
}
}
for (var w in titleterms) {
if (w.match(word_regex) && !titleterms[word]) {
if (w.match(word) && !titleterms[word]) {
_o.push({files: titleterms[w], score: Scorer.partialTitle})
}
}
@ -501,9 +490,6 @@ var Search = {
*/
makeSearchSummary : function(htmlText, keywords, hlwords) {
var text = Search.htmlToText(htmlText);
if (text == "") {
return null;
}
var textLower = text.toLowerCase();
var start = 0;
$.each(keywords, function() {
@ -515,7 +501,7 @@ var Search = {
var excerpt = ((start > 0) ? '...' : '') +
$.trim(text.substr(start, 240)) +
((start + 240 - text.length) ? '...' : '');
var rv = $('<p class="context"></p>').text(excerpt);
var rv = $('<div class="context"></div>').text(excerpt);
$.each(hlwords, function() {
rv = rv.highlightText(this, 'highlighted');
});

File diff suppressed because one or more lines are too long

View file

@ -1,31 +1,65 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Index &mdash; CompLib 0.2.3 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<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 data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<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 src="_static/js/theme.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="#" />
<link rel="search" title="Search" href="search.html" />
</head>
<body class="wy-body-for-nav">
<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"> CompLib
<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" />
@ -33,7 +67,18 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="toctree-l1"><a class="reference internal" href="index.html">Competition Robot Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="other/usage.html">Usage</a></li>
@ -45,33 +90,72 @@
<li class="toctree-l1"><a class="reference internal" href="lib/Linefollower.html">Linefollower Examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/Logging.html">Logging</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/Motor.html">Motor</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/QC.html">Quality Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/Servo.html">Servo</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/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="Mobile navigation menu" >
<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="Page navigation">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Index</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1 id="index">Index</h1>
@ -276,30 +360,49 @@
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2021, robo4you.</p>
</div>
<p>
&copy; Copyright 2021, robo4you
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</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>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,33 +1,66 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Competition Robot Library &mdash; CompLib 0.2.3 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<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 data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<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 src="_static/js/theme.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="Usage" href="other/usage.html" />
</head>
<body class="wy-body-for-nav">
<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="#" class="icon icon-home"> CompLib
<a href="#" 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" />
@ -35,7 +68,18 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Competition Robot Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="other/usage.html">Usage</a></li>
@ -47,40 +91,80 @@
<li class="toctree-l1"><a class="reference internal" href="lib/Linefollower.html">Linefollower Examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/Logging.html">Logging</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/Motor.html">Motor</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/QC.html">Quality Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/Servo.html">Servo</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/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="Mobile navigation menu" >
<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="#">CompLib</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="#" class="icon icon-home"></a> &raquo;</li>
<li>Competition Robot Library</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/index.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">
<img alt="_images/compair-logo-white.svg" src="_images/compair-logo-white.svg" /><section id="competition-robot-library">
<h1>Competition Robot Library<a class="headerlink" href="#competition-robot-library" title="Permalink to this headline"></a></h1>
<img alt="_images/compair-logo-white.svg" src="_images/compair-logo-white.svg" /><div class="section" id="competition-robot-library">
<h1>Competition Robot Library<a class="headerlink" href="#competition-robot-library" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
</div>
<section id="contents">
<h2>Contents<a class="headerlink" href="#contents" title="Permalink to this headline"></a></h2>
<div class="section" id="contents">
<h2>Contents<a class="headerlink" href="#contents" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound">
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Competition Robot Library</a></li>
@ -142,6 +226,13 @@
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="lib/QC.html">Quality Control</a><ul>
<li class="toctree-l2"><a class="reference internal" href="lib/QC.html#infrared-test">Infrared Test</a></li>
<li class="toctree-l2"><a class="reference internal" href="lib/QC.html#motor-test">Motor Test</a></li>
<li class="toctree-l2"><a class="reference internal" href="lib/QC.html#servo-test">Servo Test</a></li>
<li class="toctree-l2"><a class="reference internal" href="lib/QC.html#vision-test">Vision Test</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="lib/Servo.html">Servo</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/Vision.html">Vision</a><ul>
<li class="toctree-l2"><a class="reference internal" href="lib/Vision.html#opencv-stream">Opencv Stream</a></li>
@ -154,37 +245,61 @@
</li>
</ul>
</div>
</section>
</section>
</div>
</div>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="other/usage.html" class="btn btn-neutral float-right" title="Usage" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="other/usage.html" class="btn btn-neutral float-right" title="Usage" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2021, robo4you.</p>
</div>
<p>
&copy; Copyright 2021, robo4you
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</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>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,34 +1,67 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Api &mdash; CompLib 0.2.3 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<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 data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<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 src="../_static/js/theme.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="Aruco" href="Aruco.html" />
<link rel="prev" title="Usage" href="../other/usage.html" />
</head>
<body class="wy-body-for-nav">
<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"> CompLib
<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" />
@ -36,7 +69,18 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
</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">Competition Robot Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Usage</a></li>
@ -58,45 +102,85 @@
<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="QC.html">Quality Control</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="Mobile navigation menu" >
<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="Page navigation">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Api</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/lib/Api.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">
<section id="api">
<span id="lib-api"></span><h1>Api<a class="headerlink" href="#api" title="Permalink to this headline"></a></h1>
<section id="seeding">
<h2>Seeding<a class="headerlink" href="#seeding" title="Permalink to this headline"></a></h2>
<div class="section" id="api">
<span id="lib-api"></span><h1>Api<a class="headerlink" href="#api" title="Permalink to this headline"></a></h1>
<div class="section" id="seeding">
<h2>Seeding<a class="headerlink" href="#seeding" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="compLib.Api.Seeding">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">compLib.Api.</span></span><span class="sig-name descname"><span class="pre">Seeding</span></span><a class="headerlink" href="#compLib.Api.Seeding" title="Permalink to this definition"></a></dt>
<dt id="compLib.Api.Seeding">
<em class="property">class </em><code class="sig-prename descclassname">compLib.Api.</code><code class="sig-name descname">Seeding</code><a class="headerlink" href="#compLib.Api.Seeding" title="Permalink to this definition"></a></dt>
<dd><p>Class used for communicating with seeding api</p>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Api.Seeding.get_cargo">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">get_cargo</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">color</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">Dict</span><span class="p"><span class="pre">,</span> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.Api.Seeding.get_cargo" title="Permalink to this definition"></a></dt>
<dt id="compLib.Api.Seeding.get_cargo">
<em class="property">static </em><code class="sig-name descname">get_cargo</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">color</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> &#x2192; Tuple<span class="p">[</span>Dict<span class="p">, </span>int<span class="p">]</span><a class="headerlink" href="#compLib.Api.Seeding.get_cargo" title="Permalink to this definition"></a></dt>
<dd><p>Makes the /api/listCargo call to the api.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -112,8 +196,8 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Api.Seeding.get_delivery">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">get_delivery</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">Dict</span><span class="p"><span class="pre">,</span> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.Api.Seeding.get_delivery" title="Permalink to this definition"></a></dt>
<dt id="compLib.Api.Seeding.get_delivery">
<em class="property">static </em><code class="sig-name descname">get_delivery</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; Tuple<span class="p">[</span>Dict<span class="p">, </span>int<span class="p">]</span><a class="headerlink" href="#compLib.Api.Seeding.get_delivery" title="Permalink to this definition"></a></dt>
<dd><p>Makes the /api/getDelivery call to the api.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
@ -126,8 +210,8 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Api.Seeding.get_garbage">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">get_garbage</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">Dict</span><span class="p"><span class="pre">,</span> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.Api.Seeding.get_garbage" title="Permalink to this definition"></a></dt>
<dt id="compLib.Api.Seeding.get_garbage">
<em class="property">static </em><code class="sig-name descname">get_garbage</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; Tuple<span class="p">[</span>Dict<span class="p">, </span>int<span class="p">]</span><a class="headerlink" href="#compLib.Api.Seeding.get_garbage" title="Permalink to this definition"></a></dt>
<dd><p>Makes the /api/getGarbage call to the api.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
@ -140,8 +224,8 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Api.Seeding.get_material">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">get_material</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">Dict</span><span class="p"><span class="pre">,</span> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.Api.Seeding.get_material" title="Permalink to this definition"></a></dt>
<dt id="compLib.Api.Seeding.get_material">
<em class="property">static </em><code class="sig-name descname">get_material</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; Tuple<span class="p">[</span>Dict<span class="p">, </span>int<span class="p">]</span><a class="headerlink" href="#compLib.Api.Seeding.get_material" title="Permalink to this definition"></a></dt>
<dd><p>Makes the /api/getMaterial call to the api.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
@ -154,8 +238,8 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Api.Seeding.list_cargo">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">list_cargo</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">Dict</span><span class="p"><span class="pre">,</span> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.Api.Seeding.list_cargo" title="Permalink to this definition"></a></dt>
<dt id="compLib.Api.Seeding.list_cargo">
<em class="property">static </em><code class="sig-name descname">list_cargo</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; Tuple<span class="p">[</span>Dict<span class="p">, </span>int<span class="p">]</span><a class="headerlink" href="#compLib.Api.Seeding.list_cargo" title="Permalink to this definition"></a></dt>
<dd><p>Makes the /api/listCargo call to the api.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
@ -169,16 +253,16 @@
</dd></dl>
</section>
<section id="double-elimination">
<h2>Double Elimination<a class="headerlink" href="#double-elimination" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="double-elimination">
<h2>Double Elimination<a class="headerlink" href="#double-elimination" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="compLib.Api.DoubleElim">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">compLib.Api.</span></span><span class="sig-name descname"><span class="pre">DoubleElim</span></span><a class="headerlink" href="#compLib.Api.DoubleElim" title="Permalink to this definition"></a></dt>
<dt id="compLib.Api.DoubleElim">
<em class="property">class </em><code class="sig-prename descclassname">compLib.Api.</code><code class="sig-name descname">DoubleElim</code><a class="headerlink" href="#compLib.Api.DoubleElim" title="Permalink to this definition"></a></dt>
<dd><p>Class used for communicating with double elimination api</p>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Api.DoubleElim.get_goal">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">get_goal</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#compLib.Api.Position" title="compLib.Api.Position"><span class="pre">compLib.Api.Position</span></a><span class="p"><span class="pre">,</span> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.Api.DoubleElim.get_goal" title="Permalink to this definition"></a></dt>
<dt id="compLib.Api.DoubleElim.get_goal">
<em class="property">static </em><code class="sig-name descname">get_goal</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; Tuple<span class="p">[</span><a class="reference internal" href="#compLib.Api.Position" title="compLib.Api.Position">compLib.Api.Position</a><span class="p">, </span>int<span class="p">]</span><a class="headerlink" href="#compLib.Api.DoubleElim.get_goal" title="Permalink to this definition"></a></dt>
<dd><p>Makes the /api/getGoal call to the api.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
@ -191,8 +275,8 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Api.DoubleElim.get_items">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">get_items</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">Dict</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">,</span> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.Api.DoubleElim.get_items" title="Permalink to this definition"></a></dt>
<dt id="compLib.Api.DoubleElim.get_items">
<em class="property">static </em><code class="sig-name descname">get_items</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; Tuple<span class="p">[</span>List<span class="p">[</span>Dict<span class="p">]</span><span class="p">, </span>int<span class="p">]</span><a class="headerlink" href="#compLib.Api.DoubleElim.get_items" title="Permalink to this definition"></a></dt>
<dd><p>Makes the /api/getItems call to the api.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
@ -205,8 +289,8 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Api.DoubleElim.get_meteoroids">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">get_meteoroids</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">Dict</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">,</span> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.Api.DoubleElim.get_meteoroids" title="Permalink to this definition"></a></dt>
<dt id="compLib.Api.DoubleElim.get_meteoroids">
<em class="property">static </em><code class="sig-name descname">get_meteoroids</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; Tuple<span class="p">[</span>List<span class="p">[</span>Dict<span class="p">]</span><span class="p">, </span>int<span class="p">]</span><a class="headerlink" href="#compLib.Api.DoubleElim.get_meteoroids" title="Permalink to this definition"></a></dt>
<dd><p>Makes the /api/getMeteoroids call to the api.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
@ -219,8 +303,8 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Api.DoubleElim.get_opponent">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">get_opponent</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#compLib.Api.Position" title="compLib.Api.Position"><span class="pre">compLib.Api.Position</span></a><span class="p"><span class="pre">,</span> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.Api.DoubleElim.get_opponent" title="Permalink to this definition"></a></dt>
<dt id="compLib.Api.DoubleElim.get_opponent">
<em class="property">static </em><code class="sig-name descname">get_opponent</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; Tuple<span class="p">[</span><a class="reference internal" href="#compLib.Api.Position" title="compLib.Api.Position">compLib.Api.Position</a><span class="p">, </span>int<span class="p">]</span><a class="headerlink" href="#compLib.Api.DoubleElim.get_opponent" title="Permalink to this definition"></a></dt>
<dd><p>Makes the /api/getOp call to the api.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
@ -233,8 +317,8 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Api.DoubleElim.get_position">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">get_position</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#compLib.Api.Position" title="compLib.Api.Position"><span class="pre">compLib.Api.Position</span></a><span class="p"><span class="pre">,</span> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.Api.DoubleElim.get_position" title="Permalink to this definition"></a></dt>
<dt id="compLib.Api.DoubleElim.get_position">
<em class="property">static </em><code class="sig-name descname">get_position</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; Tuple<span class="p">[</span><a class="reference internal" href="#compLib.Api.Position" title="compLib.Api.Position">compLib.Api.Position</a><span class="p">, </span>int<span class="p">]</span><a class="headerlink" href="#compLib.Api.DoubleElim.get_position" title="Permalink to this definition"></a></dt>
<dd><p>Makes the /api/getPos call to the api.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
@ -247,8 +331,8 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Api.DoubleElim.get_scores">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">get_scores</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">Dict</span><span class="p"><span class="pre">,</span> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.Api.DoubleElim.get_scores" title="Permalink to this definition"></a></dt>
<dt id="compLib.Api.DoubleElim.get_scores">
<em class="property">static </em><code class="sig-name descname">get_scores</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; Tuple<span class="p">[</span>Dict<span class="p">, </span>int<span class="p">]</span><a class="headerlink" href="#compLib.Api.DoubleElim.get_scores" title="Permalink to this definition"></a></dt>
<dd><p>Makes the /api/getScores call to the api.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
@ -262,20 +346,20 @@
</dd></dl>
</section>
<section id="position">
<h2>Position<a class="headerlink" href="#position" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="position">
<h2>Position<a class="headerlink" href="#position" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="compLib.Api.Position">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">compLib.Api.</span></span><span class="sig-name descname"><span class="pre">Position</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">degrees</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Api.Position" title="Permalink to this definition"></a></dt>
<dt id="compLib.Api.Position">
<em class="property">class </em><code class="sig-prename descclassname">compLib.Api.</code><code class="sig-name descname">Position</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">x</span></em>, <em class="sig-param"><span class="n">y</span></em>, <em class="sig-param"><span class="n">degrees</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Api.Position" title="Permalink to this definition"></a></dt>
<dd><p>Datastructure for holding a position</p>
</dd></dl>
</section>
<section id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<section id="calling-seeding-api">
<h3>Calling Seeding API<a class="headerlink" href="#calling-seeding-api" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<div class="section" id="calling-seeding-api">
<h3>Calling Seeding API<a class="headerlink" href="#calling-seeding-api" 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.Api</span> <span class="kn">import</span> <span class="n">Seeding</span>
<span class="n">zones</span><span class="p">,</span> <span class="n">code</span> <span class="o">=</span> <span class="n">Seeding</span><span class="o">.</span><span class="n">get_delivery</span><span class="p">()</span>
@ -304,9 +388,9 @@
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;The </span><span class="si">{</span><span class="n">package</span><span class="p">[</span><span class="s1">&#39;color&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2"> has been picked up!&quot;</span><span class="p">)</span>
</pre></div>
</div>
</section>
<section id="calling-double-elimination-api">
<h3>Calling Double Elimination API<a class="headerlink" href="#calling-double-elimination-api" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="calling-double-elimination-api">
<h3>Calling Double Elimination API<a class="headerlink" href="#calling-double-elimination-api" 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.Api</span> <span class="kn">import</span> <span class="n">DoubleElim</span>
<span class="n">position</span><span class="p">,</span> <span class="n">status</span> <span class="o">=</span> <span class="n">DoubleElim</span><span class="o">.</span><span class="n">get_position</span><span class="p">()</span>
@ -349,39 +433,64 @@
</pre></div>
</div>
<p>In this second example we wait until the game is started by the judges and then make all possible requests once. You should use the wait_for_start function in your double elimination program. If your robot starts too soon your run will not count!</p>
</section>
</section>
</section>
</div>
</div>
</div>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<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="Aruco.html" class="btn btn-neutral float-right" title="Aruco" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="Aruco.html" class="btn btn-neutral float-right" title="Aruco" 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.</p>
</div>
<p>
&copy; Copyright 2021, robo4you
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</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>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,34 +1,67 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Aruco &mdash; CompLib 0.2.3 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<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 data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<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 src="../_static/js/theme.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="Display" href="Display.html" />
<link rel="prev" title="Api" href="Api.html" />
</head>
<body class="wy-body-for-nav">
<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"> CompLib
<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" />
@ -36,7 +69,18 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
</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">Competition Robot Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Usage</a></li>
@ -54,40 +98,80 @@
<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="QC.html">Quality Control</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="Mobile navigation menu" >
<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="Page navigation">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Aruco</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/lib/Aruco.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">
<section id="aruco">
<span id="lib-vision"></span><h1>Aruco<a class="headerlink" href="#aruco" title="Permalink to this headline"></a></h1>
<section id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<section id="recognizing-aruco-tags">
<h3>Recognizing ArUco tags<a class="headerlink" href="#recognizing-aruco-tags" title="Permalink to this headline"></a></h3>
<div class="section" id="aruco">
<span id="lib-vision"></span><h1>Aruco<a class="headerlink" href="#aruco" title="Permalink to this headline"></a></h1>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<div class="section" id="recognizing-aruco-tags">
<h3>Recognizing ArUco tags<a class="headerlink" href="#recognizing-aruco-tags" 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">import</span> <span class="nn">cv2</span>
<span class="kn">from</span> <span class="nn">cv2</span> <span class="kn">import</span> <span class="n">aruco</span>
@ -158,39 +242,64 @@
You can specify an ID of the tag you want to use and if its found, the coordinates of the center are returned.
With the normalized function this is very easy: The x-coordinate is -1 on the left, 1 on the right and 0 in the center of the screen, same for y.
This way it is quite simple to act on the position of the tag.</p>
</section>
</section>
</section>
</div>
</div>
</div>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<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="Display.html" class="btn btn-neutral float-right" title="Display" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="Display.html" class="btn btn-neutral float-right" title="Display" 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.</p>
</div>
<p>
&copy; Copyright 2021, robo4you
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</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>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,34 +1,67 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Display &mdash; CompLib 0.2.3 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<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 data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<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 src="../_static/js/theme.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="Encoder" href="Encoder.html" />
<link rel="prev" title="Aruco" href="Aruco.html" />
</head>
<body class="wy-body-for-nav">
<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"> CompLib
<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" />
@ -36,7 +69,18 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
</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">Competition Robot Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Usage</a></li>
@ -55,52 +99,92 @@
<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="QC.html">Quality Control</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="Mobile navigation menu" >
<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="Page navigation">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Display</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/lib/Display.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">
<section id="display">
<span id="lib-display"></span><h1>Display<a class="headerlink" href="#display" title="Permalink to this headline"></a></h1>
<section id="class-documentation">
<h2>Class Documentation<a class="headerlink" href="#class-documentation" title="Permalink to this headline"></a></h2>
<div class="section" id="display">
<span id="lib-display"></span><h1>Display<a class="headerlink" href="#display" 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 class="sig sig-object py" id="compLib.Display.Display">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">compLib.Display.</span></span><span class="sig-name descname"><span class="pre">Display</span></span><a class="headerlink" href="#compLib.Display.Display" title="Permalink to this definition"></a></dt>
<dt id="compLib.Display.Display">
<em class="property">class </em><code class="sig-prename descclassname">compLib.Display.</code><code class="sig-name descname">Display</code><a class="headerlink" href="#compLib.Display.Display" title="Permalink to this definition"></a></dt>
<dd><p>Access the display on the robot.
The display is split into 4 Rows and 16 Columns. Each function call changes one line at a time.</p>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Display.Display.clear">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">clear</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Display.Display.clear" title="Permalink to this definition"></a></dt>
<dt id="compLib.Display.Display.clear">
<em class="property">static </em><code class="sig-name descname">clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Display.Display.clear" title="Permalink to this definition"></a></dt>
<dd><p>Clear the display</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Display.Display.write">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">write</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">line</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Display.Display.write" title="Permalink to this definition"></a></dt>
<dt id="compLib.Display.Display.write">
<em class="property">static </em><code class="sig-name descname">write</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">line</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">text</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Display.Display.write" title="Permalink to this definition"></a></dt>
<dd><p>Write a string of text to the integrated display.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -117,50 +201,75 @@ The display is split into 4 Rows and 16 Columns. Each function call changes one
</dd></dl>
</section>
<section id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<section id="write-a-line-to-the-display">
<h3>Write a line to the display<a class="headerlink" href="#write-a-line-to-the-display" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<div class="section" id="write-a-line-to-the-display">
<h3>Write a line to the display<a class="headerlink" href="#write-a-line-to-the-display" 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.Display</span> <span class="kn">import</span> <span class="n">Display</span>
<span class="n">Display</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="s2">&quot;Hello World!&quot;</span><span class="p">)</span>
</pre></div>
</div>
</section>
</section>
</section>
</div>
</div>
</div>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="Aruco.html" class="btn btn-neutral float-left" title="Aruco" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="Encoder.html" class="btn btn-neutral float-right" title="Encoder" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="Encoder.html" class="btn btn-neutral float-right" title="Encoder" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="Aruco.html" class="btn btn-neutral float-left" title="Aruco" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2021, robo4you.</p>
</div>
<p>
&copy; Copyright 2021, robo4you
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</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>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,34 +1,67 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Encoder &mdash; CompLib 0.2.3 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<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 data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<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 src="../_static/js/theme.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="Infrared Sensor" href="IRSensor.html" />
<link rel="prev" title="Display" href="Display.html" />
</head>
<body class="wy-body-for-nav">
<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"> CompLib
<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" />
@ -36,7 +69,18 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
</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">Competition Robot Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Usage</a></li>
@ -51,45 +95,85 @@
<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="QC.html">Quality Control</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="Mobile navigation menu" >
<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="Page navigation">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Encoder</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/lib/Encoder.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">
<section id="encoder">
<span id="lib-encoder"></span><h1>Encoder<a class="headerlink" href="#encoder" title="Permalink to this headline"></a></h1>
<section id="class-documentation">
<h2>Class Documentation<a class="headerlink" href="#class-documentation" title="Permalink to this headline"></a></h2>
<div class="section" id="encoder">
<span id="lib-encoder"></span><h1>Encoder<a class="headerlink" href="#encoder" 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 class="sig sig-object py" id="compLib.Encoder.Encoder">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">compLib.Encoder.</span></span><span class="sig-name descname"><span class="pre">Encoder</span></span><a class="headerlink" href="#compLib.Encoder.Encoder" title="Permalink to this definition"></a></dt>
<dt id="compLib.Encoder.Encoder">
<em class="property">class </em><code class="sig-prename descclassname">compLib.Encoder.</code><code class="sig-name descname">Encoder</code><a class="headerlink" href="#compLib.Encoder.Encoder" title="Permalink to this definition"></a></dt>
<dd><p>Class used to read the encoders</p>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Encoder.Encoder.clear">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">clear</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Encoder.Encoder.clear" title="Permalink to this definition"></a></dt>
<dt id="compLib.Encoder.Encoder.clear">
<em class="property">static </em><code class="sig-name descname">clear</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><a class="headerlink" href="#compLib.Encoder.Encoder.clear" title="Permalink to this definition"></a></dt>
<dd><p>Reset encoder position to 0</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -102,14 +186,14 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Encoder.Encoder.clear_all">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">clear_all</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Encoder.Encoder.clear_all" title="Permalink to this definition"></a></dt>
<dt id="compLib.Encoder.Encoder.clear_all">
<em class="property">static </em><code class="sig-name descname">clear_all</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Encoder.Encoder.clear_all" title="Permalink to this definition"></a></dt>
<dd><p>Reset all encoder positions to 0</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Encoder.Encoder.read">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">read</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">int</span></span></span><a class="headerlink" href="#compLib.Encoder.Encoder.read" title="Permalink to this definition"></a></dt>
<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>
<dd><p>Read encoder from a specified port</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -125,8 +209,8 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Encoder.Encoder.read_raw">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">read_raw</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">int</span></span></span><a class="headerlink" href="#compLib.Encoder.Encoder.read_raw" title="Permalink to this definition"></a></dt>
<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>
<dd><p>Read raw encoder from a specified port. Will not be reset to 0 at start.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -143,38 +227,63 @@
</dd></dl>
</section>
</section>
</div>
</div>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="Display.html" class="btn btn-neutral float-left" title="Display" 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" aria-hidden="true"></span></a>
<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"></span></a>
<a href="Display.html" class="btn btn-neutral float-left" title="Display" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2021, robo4you.</p>
</div>
<p>
&copy; Copyright 2021, robo4you
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</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>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,34 +1,67 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Infrared Sensor &mdash; CompLib 0.2.3 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<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 data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<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 src="../_static/js/theme.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="Linefollower Examples" href="Linefollower.html" />
<link rel="prev" title="Encoder" href="Encoder.html" />
</head>
<body class="wy-body-for-nav">
<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"> CompLib
<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" />
@ -36,7 +69,18 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
</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">Competition Robot Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Usage</a></li>
@ -54,43 +98,83 @@
<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="QC.html">Quality Control</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="Mobile navigation menu" >
<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="Page navigation">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Infrared Sensor</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/lib/IRSensor.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">
<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>
<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 class="sig sig-object py" id="compLib.IRSensor.IRSensor">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">compLib.IRSensor.</span></span><span class="sig-name descname"><span class="pre">IRSensor</span></span><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 of the robot</p>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.IRSensor.IRSensor.read">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">read</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sensor</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">int</span></span></span><a class="headerlink" href="#compLib.IRSensor.IRSensor.read" title="Permalink to this definition"></a></dt>
<dt id="compLib.IRSensor.IRSensor.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">sensor</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#compLib.IRSensor.IRSensor.read" title="Permalink to this definition"></a></dt>
<dd><p>Read one infrared sensor</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -109,8 +193,8 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.IRSensor.IRSensor.set">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">set</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sensor</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">on</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">bool</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.IRSensor.IRSensor.set" title="Permalink to this definition"></a></dt>
<dt id="compLib.IRSensor.IRSensor.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">sensor</span><span class="p">:</span> <span class="n">int</span></em>, <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.IRSensor.IRSensor.set" title="Permalink to this definition"></a></dt>
<dd><p>Turn on / off a IR emitter</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -124,49 +208,74 @@
</dd></dl>
<section id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<section id="testing-analog-sensors">
<h3>Testing analog sensors<a class="headerlink" href="#testing-analog-sensors" title="Permalink to this headline"></a></h3>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<div class="section" id="testing-analog-sensors">
<h3>Testing analog sensors<a class="headerlink" href="#testing-analog-sensors" 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</span> <span class="kn">import</span> <span class="n">IRSensor</span>
<span class="k">while</span> <span class="kc">True</span><span class="p">:</span>
<span class="nb">print</span> <span class="p">(</span><span class="s2">&quot;left: </span><span class="si">{}</span><span class="s2"> middle: </span><span class="si">{}</span><span class="s2"> right: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">IRSensor</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="mi">1</span><span class="p">),</span> <span class="n">IRSensor</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="mi">3</span><span class="p">),</span> <span class="n">IRSensor</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="mi">5</span><span class="p">)))</span>
</pre></div>
</div>
</section>
</section>
</section>
</div>
</div>
</div>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="Encoder.html" class="btn btn-neutral float-left" title="Encoder" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="Linefollower.html" class="btn btn-neutral float-right" title="Linefollower Examples" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="Linefollower.html" class="btn btn-neutral float-right" title="Linefollower Examples" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="Encoder.html" class="btn btn-neutral float-left" title="Encoder" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2021, robo4you.</p>
</div>
<p>
&copy; Copyright 2021, robo4you
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</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>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,34 +1,67 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Linefollower Examples &mdash; CompLib 0.2.3 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<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 data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<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 src="../_static/js/theme.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="Logging" href="Logging.html" />
<link rel="prev" title="Infrared Sensor" href="IRSensor.html" />
</head>
<body class="wy-body-for-nav">
<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"> CompLib
<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" />
@ -36,7 +69,18 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
</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">Competition Robot Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Usage</a></li>
@ -51,38 +95,78 @@
</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="QC.html">Quality Control</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="Mobile navigation menu" >
<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="Page navigation">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Linefollower Examples</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/lib/Linefollower.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">
<section id="linefollower-examples">
<span id="lib-linefollower"></span><h1>Linefollower Examples<a class="headerlink" href="#linefollower-examples" title="Permalink to this headline"></a></h1>
<section id="simple-linefollower">
<h2>Simple Linefollower<a class="headerlink" href="#simple-linefollower" title="Permalink to this headline"></a></h2>
<div class="section" id="linefollower-examples">
<span id="lib-linefollower"></span><h1>Linefollower Examples<a class="headerlink" href="#linefollower-examples" title="Permalink to this headline"></a></h1>
<div class="section" id="simple-linefollower">
<h2>Simple Linefollower<a class="headerlink" href="#simple-linefollower" title="Permalink to this headline"></a></h2>
<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="kn">from</span> <span class="nn">compLib.Display</span> <span class="kn">import</span> <span class="n">Display</span>
<span class="kn">from</span> <span class="nn">compLib.IRSensor</span> <span class="kn">import</span> <span class="n">IRSensor</span>
@ -96,18 +180,16 @@
<span class="n">IRSensor</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="kc">True</span><span class="p">)</span>
<span class="n">IRSensor</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="kc">True</span><span class="p">)</span>
<span class="n">DRIVE_SPEED</span> <span class="o">=</span> <span class="mi">85</span>
<span class="n">TURN_SPEED</span> <span class="o">=</span> <span class="mi">50</span>
<span class="n">COLOR_BREAK</span> <span class="o">=</span> <span class="mi">750</span>
<span class="n">KP</span> <span class="o">=</span> <span class="mf">50.0</span>
<span class="n">DRIVE_SPEED</span> <span class="o">=</span> <span class="mi">75</span>
<span class="n">COLOR_BREAK</span> <span class="o">=</span> <span class="mi">900</span>
<span class="n">KP</span> <span class="o">=</span> <span class="mf">10.0</span>
<span class="n">KD</span> <span class="o">=</span> <span class="mf">0.0</span>
<span class="k">def</span> <span class="nf">drive</span><span class="p">(</span><span class="n">leftSpeed</span><span class="p">,</span> <span class="n">rightSpeed</span><span class="p">):</span>
<span class="n">leftSpeed</span> <span class="o">*=</span> <span class="o">-</span><span class="mi">1</span>
<span class="n">rightSpeed</span> <span class="o">*=</span> <span class="mf">0.906</span>
<span class="n">rightSpeed</span> <span class="o">*=</span> <span class="o">-</span><span class="mf">0.906</span>
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="nb">min</span><span class="p">(</span><span class="nb">max</span><span class="p">(</span><span class="o">-</span><span class="mi">100</span><span class="p">,</span> <span class="n">leftSpeed</span><span class="p">),</span> <span class="mi">100</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="mi">2</span><span class="p">,</span> <span class="nb">min</span><span class="p">(</span><span class="nb">max</span><span class="p">(</span><span class="o">-</span><span class="mi">100</span><span class="p">,</span> <span class="n">rightSpeed</span><span class="p">),</span> <span class="mi">100</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="mi">1</span><span class="p">,</span> <span class="nb">min</span><span class="p">(</span><span class="nb">max</span><span class="p">(</span><span class="o">-</span><span class="mi">100</span><span class="p">,</span> <span class="n">rightSpeed</span><span class="p">),</span> <span class="mi">100</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="mi">4</span><span class="p">,</span> <span class="nb">min</span><span class="p">(</span><span class="nb">max</span><span class="p">(</span><span class="o">-</span><span class="mi">100</span><span class="p">,</span> <span class="n">leftSpeed</span><span class="p">),</span> <span class="mi">100</span><span class="p">))</span>
<span class="k">def</span> <span class="nf">follow</span><span class="p">(</span><span class="n">sleepTime</span> <span class="o">=</span> <span class="mf">0.1</span><span class="p">):</span>
<span class="n">lastError</span> <span class="o">=</span> <span class="mi">0</span>
@ -156,38 +238,63 @@
<span class="n">main</span><span class="p">()</span>
</pre></div>
</div>
</section>
</section>
</div>
</div>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<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="Logging.html" class="btn btn-neutral float-right" title="Logging" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<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="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>&#169; Copyright 2021, robo4you.</p>
</div>
<p>
&copy; Copyright 2021, robo4you
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</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>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,34 +1,67 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Logging &mdash; CompLib 0.2.3 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<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 data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<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 src="../_static/js/theme.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="Linefollower Examples" href="Linefollower.html" />
</head>
<body class="wy-body-for-nav">
<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"> CompLib
<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" />
@ -36,7 +69,18 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
</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">Competition Robot Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Usage</a></li>
@ -55,45 +99,85 @@
</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="QC.html">Quality Control</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="Mobile navigation menu" >
<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="Page navigation">
<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">
<section id="logging">
<span id="lib-logging"></span><h1>Logging<a class="headerlink" href="#logging" title="Permalink to this headline"></a></h1>
<section id="class-documentation">
<h2>Class Documentation<a class="headerlink" href="#class-documentation" title="Permalink to this headline"></a></h2>
<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 class="sig sig-object py" id="compLib.LogstashLogging.Logging">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">compLib.LogstashLogging.</span></span><span class="sig-name descname"><span class="pre">Logging</span></span><a class="headerlink" href="#compLib.LogstashLogging.Logging" title="Permalink to this definition"></a></dt>
<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 class="sig sig-object py" id="compLib.LogstashLogging.Logging.get_logger">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">get_logger</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">logging.Logger</span></span></span><a class="headerlink" href="#compLib.LogstashLogging.Logging.get_logger" title="Permalink to this definition"></a></dt>
<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>
@ -106,57 +190,82 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.LogstashLogging.Logging.set_debug">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">set_debug</span></span><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>
<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>
</section>
<section id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<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>
<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>
</section>
</section>
</section>
</div>
</div>
</div>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="Linefollower.html" class="btn btn-neutral float-left" title="Linefollower Examples" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<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>
<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="Linefollower.html" class="btn btn-neutral float-left" title="Linefollower Examples" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2021, robo4you.</p>
</div>
<p>
&copy; Copyright 2021, robo4you
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</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>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,34 +1,67 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Motor &mdash; CompLib 0.2.3 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<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 data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<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 src="../_static/js/theme.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="Servo" href="Servo.html" />
<link rel="next" title="Quality Control" href="QC.html" />
<link rel="prev" title="Logging" href="Logging.html" />
</head>
<body class="wy-body-for-nav">
<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"> CompLib
<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" />
@ -36,7 +69,18 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
</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">Competition Robot Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Usage</a></li>
@ -55,45 +99,85 @@
</li>
</ul>
</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="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="Mobile navigation menu" >
<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="Page navigation">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Motor</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/lib/Motor.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">
<section id="motor">
<span id="lib-motor"></span><h1>Motor<a class="headerlink" href="#motor" title="Permalink to this headline"></a></h1>
<section id="class-documentation">
<h2>Class Documentation<a class="headerlink" href="#class-documentation" title="Permalink to this headline"></a></h2>
<div class="section" id="motor">
<span id="lib-motor"></span><h1>Motor<a class="headerlink" href="#motor" 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 class="sig sig-object py" id="compLib.Motor.Motor">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">compLib.Motor.</span></span><span class="sig-name descname"><span class="pre">Motor</span></span><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 class="sig sig-object py" id="compLib.Motor.Motor.active_break">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">active_break</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.active_break" title="Permalink to this definition"></a></dt>
<dt id="compLib.Motor.Motor.active_break">
<em class="property">static </em><code class="sig-name descname">active_break</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><a class="headerlink" href="#compLib.Motor.Motor.active_break" title="Permalink to this definition"></a></dt>
<dd><p>Actively break with a specific motor</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -103,14 +187,14 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Motor.Motor.all_off">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">all_off</span></span><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 class="sig sig-object py" id="compLib.Motor.Motor.get_motor_curve">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">get_motor_curve</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.get_motor_curve" title="Permalink to this definition"></a></dt>
<dt id="compLib.Motor.Motor.get_motor_curve">
<em class="property">static </em><code class="sig-name descname">get_motor_curve</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.get_motor_curve" title="Permalink to this definition"></a></dt>
<dd><p>Get the currently active motor curve. Check set_motor_curve() for more info.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
@ -120,8 +204,8 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Motor.Motor.power">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">power</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">percent</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">float</span></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">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, percentage is linearized
so that its roughly proportional to the speed</p>
<dl class="field-list simple">
@ -138,8 +222,8 @@ so that its roughly proportional to the speed</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Motor.Motor.power_raw">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">power_raw</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">percent</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">float</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">log_metric</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.power_raw" title="Permalink to this definition"></a></dt>
<dt id="compLib.Motor.Motor.power_raw">
<em class="property">static </em><code class="sig-name descname">power_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>, <em class="sig-param"><span class="n">percent</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">log_metric</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.power_raw" 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>
@ -155,8 +239,8 @@ so that its roughly proportional to the speed</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Motor.Motor.pwm">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">pwm</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pwm</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mode</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">compLib.Motor.MotorMode</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.pwm" title="Permalink to this definition"></a></dt>
<dt id="compLib.Motor.Motor.pwm">
<em class="property">static </em><code class="sig-name descname">pwm</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">pwm</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">mode</span><span class="p">:</span> <span class="n">compLib.Motor.MotorMode</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.pwm" title="Permalink to this definition"></a></dt>
<dd><p>Set specified motor to a specific pwm value and motor mode</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -173,8 +257,8 @@ so that its roughly proportional to the speed</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Motor.Motor.set_motor_curve">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">set_motor_curve</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">curve</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.set_motor_curve" title="Permalink to this definition"></a></dt>
<dt id="compLib.Motor.Motor.set_motor_curve">
<em class="property">static </em><code class="sig-name descname">set_motor_curve</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">curve</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.set_motor_curve" title="Permalink to this definition"></a></dt>
<dd><p>Set the global motor curve, must be a float array with exactly 21 elements.
[0] = x ticks/s (0% power)
[1] = x ticks/s (5% power)
@ -193,50 +277,75 @@ so that its roughly proportional to the speed</p>
</dd></dl>
</section>
<section id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<section id="driving-straight-maybe">
<h3>Driving straight (maybe)<a class="headerlink" href="#driving-straight-maybe" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="examples">
<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>
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">50</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="mi">2</span><span class="p">,</span> <span class="mi">50</span><span class="p">)</span>
</pre></div>
</div>
</section>
</section>
</section>
</div>
</div>
</div>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="Logging.html" class="btn btn-neutral float-left" title="Logging" 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" aria-hidden="true"></span></a>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="QC.html" class="btn btn-neutral float-right" title="Quality Control" 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.</p>
</div>
<p>
&copy; Copyright 2021, robo4you
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</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>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

292
lib/QC.html Normal file
View file

@ -0,0 +1,292 @@
<!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>Quality Control &mdash; CompLib 0.2.3 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="Servo" href="Servo.html" />
<link rel="prev" title="Motor" href="Motor.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">Competition Robot 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="Aruco.html">Aruco</a></li>
<li class="toctree-l1"><a class="reference internal" href="Display.html">Display</a></li>
<li class="toctree-l1"><a class="reference internal" href="Encoder.html">Encoder</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="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 current"><a class="current reference internal" href="#">Quality Control</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#infrared-test">Infrared Test</a></li>
<li class="toctree-l2"><a class="reference internal" href="#motor-test">Motor Test</a></li>
<li class="toctree-l2"><a class="reference internal" href="#servo-test">Servo Test</a></li>
<li class="toctree-l2"><a class="reference internal" href="#vision-test">Vision Test</a></li>
</ul>
</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>Quality Control</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/lib/QC.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="quality-control">
<span id="lib-qc"></span><h1>Quality Control<a class="headerlink" href="#quality-control" title="Permalink to this headline"></a></h1>
<div class="section" id="infrared-test">
<h2>Infrared Test<a class="headerlink" href="#infrared-test" title="Permalink to this headline"></a></h2>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">compLib.IRSensor</span> <span class="kn">import</span> <span class="n">IRSensor</span>
<span class="kn">import</span> <span class="nn">time</span>
<span class="n">IRSensor</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="kc">True</span><span class="p">)</span>
<span class="n">IRSensor</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="kc">True</span><span class="p">)</span>
<span class="n">IRSensor</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="kc">True</span><span class="p">)</span>
<span class="n">IRSensor</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="kc">True</span><span class="p">)</span>
<span class="n">IRSensor</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="kc">True</span><span class="p">)</span>
<span class="k">while</span> <span class="kc">True</span><span class="p">:</span>
<span class="n">t</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">6</span><span class="p">):</span>
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">i</span><span class="si">}</span><span class="s2">: </span><span class="si">{</span><span class="n">IRSensor</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="n">i</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;&quot;</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="mf">0.2</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="section" id="motor-test">
<h2>Motor Test<a class="headerlink" href="#motor-test" title="Permalink to this headline"></a></h2>
<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="kn">from</span> <span class="nn">compLib.Encoder</span> <span class="kn">import</span> <span class="n">Encoder</span>
<span class="kn">import</span> <span class="nn">time</span>
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="o">-</span><span class="mi">50</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="mi">4</span><span class="p">,</span> <span class="mi">50</span><span class="p">)</span>
<span class="k">while</span> <span class="kc">True</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;L:</span><span class="si">{</span><span class="n">Encoder</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="mi">4</span><span class="p">)</span><span class="si">}</span><span class="s2"> R:</span><span class="si">{</span><span class="n">Encoder</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</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="mf">0.1</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="section" id="servo-test">
<h2>Servo Test<a class="headerlink" href="#servo-test" title="Permalink to this headline"></a></h2>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">compLib.Servo</span> <span class="kn">import</span> <span class="n">Servo</span>
<span class="kn">import</span> <span class="nn">time</span>
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">8</span> <span class="o">+</span> <span class="mi">1</span><span class="p">):</span>
<span class="n">Servo</span><span class="o">.</span><span class="n">set_position</span><span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="mi">45</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">i</span><span class="si">}</span><span class="s2">&quot;</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">Servo</span><span class="o">.</span><span class="n">setup_position</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">10</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="section" id="vision-test">
<h2>Vision Test<a class="headerlink" href="#vision-test" title="Permalink to this headline"></a></h2>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">cv2</span>
<span class="kn">from</span> <span class="nn">compLib</span> <span class="kn">import</span> <span class="n">Vision</span>
<span class="kn">from</span> <span class="nn">compLib.Servo</span> <span class="kn">import</span> <span class="n">Servo</span>
<span class="k">while</span> <span class="kc">True</span><span class="p">:</span>
<span class="n">frame</span> <span class="o">=</span> <span class="n">Vision</span><span class="o">.</span><span class="n">Streaming</span><span class="o">.</span><span class="n">get_frame</span><span class="p">()</span>
<span class="n">Vision</span><span class="o">.</span><span class="n">Streaming</span><span class="o">.</span><span class="n">publish_frame</span><span class="p">(</span><span class="n">frame</span><span class="p">)</span>
<span class="n">Servo</span><span class="o">.</span><span class="n">set_position</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="o">-</span><span class="mi">45</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
</div>
</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"></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>
&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

@ -1,34 +1,67 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Servo &mdash; CompLib 0.2.3 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<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 data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<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 src="../_static/js/theme.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="Vision" href="Vision.html" />
<link rel="prev" title="Motor" href="Motor.html" />
<link rel="prev" title="Quality Control" href="QC.html" />
</head>
<body class="wy-body-for-nav">
<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"> CompLib
<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" />
@ -36,7 +69,18 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
</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">Competition Robot Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Usage</a></li>
@ -48,43 +92,83 @@
<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="QC.html">Quality Control</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>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<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="Page navigation">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Servo</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/lib/Servo.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">
<section id="servo">
<span id="lib-servo"></span><h1>Servo<a class="headerlink" href="#servo" title="Permalink to this headline"></a></h1>
<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 class="sig sig-object py" id="compLib.Servo.Servo">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">compLib.Servo.</span></span><span class="sig-name descname"><span class="pre">Servo</span></span><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 class="sig sig-object py" id="compLib.Servo.Servo.set_position">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">set_position</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">float</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">offset</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">float</span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">90.0</span></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">port</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">float</span></em>, <em class="sig-param"><span class="n">offset</span><span class="p">:</span> <span class="n">float</span> <span class="o">=</span> <span class="default_value">90.0</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>
@ -97,44 +181,69 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Servo.Servo.setup_position">
<em class="property"><span class="pre">static</span> </em><span class="sig-name descname"><span class="pre">setup_position</span></span><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>
</dd></dl>
</section>
</div>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<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" aria-hidden="true"></span></a>
<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"></span></a>
<a href="QC.html" class="btn btn-neutral float-left" title="Quality Control" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2021, robo4you.</p>
</div>
<p>
&copy; Copyright 2021, robo4you
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</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>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,33 +1,66 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vision &mdash; CompLib 0.2.3 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<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 data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<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 src="../_static/js/theme.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="prev" title="Servo" href="Servo.html" />
</head>
<body class="wy-body-for-nav">
<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"> CompLib
<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" />
@ -35,7 +68,18 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
</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">Competition Robot Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Usage</a></li>
@ -47,6 +91,7 @@
<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="QC.html">Quality Control</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>
<li class="toctree-l2"><a class="reference internal" href="#opencv-stream">Opencv Stream</a></li>
@ -59,32 +104,71 @@
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<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="Page navigation">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Vision</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/lib/Vision.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">
<section id="vision">
<span id="lib-vision"></span><h1>Vision<a class="headerlink" href="#vision" title="Permalink to this headline"></a></h1>
<div class="section" id="vision">
<span id="lib-vision"></span><h1>Vision<a class="headerlink" href="#vision" title="Permalink to this headline"></a></h1>
<p>This module provides an interface for grabbing an rtmp stream and using the images to do some processing in opencv.</p>
<p>How do I use this module?</p>
<ol class="arabic simple">
@ -93,21 +177,21 @@
<li><p>Publish the processed frames on an http server</p></li>
<li><p>You can view the http stream of your processed images in a web browser</p></li>
</ol>
<section id="opencv-stream">
<h2>Opencv Stream<a class="headerlink" href="#opencv-stream" title="Permalink to this headline"></a></h2>
<div class="section" id="opencv-stream">
<h2>Opencv Stream<a class="headerlink" href="#opencv-stream" title="Permalink to this headline"></a></h2>
<p>Because of the rtmp stream needing to buffer some frames and waiting for P-Frames, importing this module might take up
to 5 Seconds.</p>
<dl class="py class">
<dt class="sig sig-object py" id="compLib.Vision.__Streaming">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">compLib.Vision.</span></span><span class="sig-name descname"><span class="pre">__Streaming</span></span><a class="headerlink" href="#compLib.Vision.__Streaming" title="Permalink to this definition"></a></dt>
<dt id="compLib.Vision.__Streaming">
<em class="property">class </em><code class="sig-prename descclassname">compLib.Vision.</code><code class="sig-name descname">__Streaming</code><a class="headerlink" href="#compLib.Vision.__Streaming" title="Permalink to this definition"></a></dt>
<dd><p>Class that handles rtmp streaming for opencv.</p>
<p>DO NOT CREATE AN INSTANCE OF THIS CLASS YOURSELF!</p>
<p>This is automatically done when importing this module. Use Vision.Streaming which is
an instance of this class!</p>
<p>grab frames -&gt; do your own processing -&gt; publish frame -&gt; view on http server</p>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Vision.__Streaming.get_frame">
<span class="sig-name descname"><span class="pre">get_frame</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Vision.__Streaming.get_frame" title="Permalink to this definition"></a></dt>
<dt id="compLib.Vision.__Streaming.get_frame">
<code class="sig-name descname">get_frame</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Vision.__Streaming.get_frame" title="Permalink to this definition"></a></dt>
<dd><p>Grab the newest frame from the rtmp stream.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
@ -117,8 +201,8 @@ an instance of this class!</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Vision.__Streaming.publish_frame">
<span class="sig-name descname"><span class="pre">publish_frame</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">image</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Vision.__Streaming.publish_frame" title="Permalink to this definition"></a></dt>
<dt id="compLib.Vision.__Streaming.publish_frame">
<code class="sig-name descname">publish_frame</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">image</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Vision.__Streaming.publish_frame" title="Permalink to this definition"></a></dt>
<dd><p>Publish an opencv frame to the http webserver.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -132,11 +216,11 @@ an instance of this class!</p>
</dd></dl>
</section>
<section id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<section id="using-the-vision-module">
<h3>Using the Vision Module<a class="headerlink" href="#using-the-vision-module" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<div class="section" id="using-the-vision-module">
<h3>Using the Vision Module<a class="headerlink" href="#using-the-vision-module" 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">cv2</span>
<span class="kn">from</span> <span class="nn">compLib</span> <span class="kn">import</span> <span class="n">Vision</span>
@ -155,9 +239,9 @@ your raspberry pi camera. Note: the stream will lag a little bit BUT the process
realtime.</p>
<p>The output on the website should show whatever your raspberry pi cam records:</p>
<a class="reference internal image-reference" href="../_images/opencv_http_stream.png"><img alt="Processed frames from opencv" src="../_images/opencv_http_stream.png" style="width: 680px;" /></a>
</section>
<section id="chessboard-detection">
<h3>Chessboard Detection<a class="headerlink" href="#chessboard-detection" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="chessboard-detection">
<h3>Chessboard Detection<a class="headerlink" href="#chessboard-detection" title="Permalink to this headline"></a></h3>
<p>In this example we process the captured stream of images and want to detect chessboards. Run this example and
point your raspberry pi camera to a chessboard and it should be detected.</p>
<p>For testing you can point it at this image:</p>
@ -189,38 +273,62 @@ point your raspberry pi camera to a chessboard and it should be detected.</p>
<a class="reference internal image-reference" href="../_images/chessboard_detected.jpg"><img alt="Processed frames from opencv" src="../_images/chessboard_detected.jpg" style="width: 680px;" /></a>
<p>Here is a screenshot of the stream website while viewing the chessboard in this documentation.</p>
<a class="reference internal image-reference" href="../_images/opencv_processed.png"><img alt="Processed frames from opencv" src="../_images/opencv_processed.png" style="width: 680px;" /></a>
</section>
</section>
</section>
</div>
</div>
</div>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<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>
<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"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2021, robo4you.</p>
</div>
<p>
&copy; Copyright 2021, robo4you
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</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>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

Binary file not shown.

View file

@ -1,34 +1,67 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Usage &mdash; CompLib 0.2.3 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<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 data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<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 src="../_static/js/theme.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="Api" href="../lib/Api.html" />
<link rel="prev" title="Competition Robot Library" href="../index.html" />
</head>
<body class="wy-body-for-nav">
<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"> CompLib
<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" />
@ -36,7 +69,18 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
</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">Competition Robot Library</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Usage</a></li>
@ -48,36 +92,76 @@
<li class="toctree-l1"><a class="reference internal" href="../lib/Linefollower.html">Linefollower Examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lib/Logging.html">Logging</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lib/Motor.html">Motor</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lib/QC.html">Quality Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lib/Servo.html">Servo</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lib/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="Mobile navigation menu" >
<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="Page navigation">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Usage</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/other/usage.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">
<section id="usage">
<span id="other-usage"></span><h1>Usage<a class="headerlink" href="#usage" title="Permalink to this headline"></a></h1>
<div class="section" id="usage">
<span id="other-usage"></span><h1>Usage<a class="headerlink" href="#usage" title="Permalink to this headline"></a></h1>
<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.Motor</span> <span class="kn">import</span> <span class="o">*</span>
@ -102,37 +186,62 @@
<span class="n">main</span><span class="p">()</span>
</pre></div>
</div>
</section>
</div>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="../index.html" class="btn btn-neutral float-left" title="Competition Robot Library" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="../lib/Api.html" class="btn btn-neutral float-right" title="Api" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../lib/Api.html" class="btn btn-neutral float-right" title="Api" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="../index.html" class="btn btn-neutral float-left" title="Competition Robot Library" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2021, robo4you.</p>
</div>
<p>
&copy; Copyright 2021, robo4you
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</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>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,34 +1,67 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Search &mdash; CompLib 0.2.3 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<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 data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<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 src="_static/js/theme.js"></script>
<script src="_static/searchtools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript" src="_static/searchtools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="#" />
</head>
<body class="wy-body-for-nav">
<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"> CompLib
<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="#" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -36,7 +69,18 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="toctree-l1"><a class="reference internal" href="index.html">Competition Robot Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="other/usage.html">Usage</a></li>
@ -48,33 +92,72 @@
<li class="toctree-l1"><a class="reference internal" href="lib/Linefollower.html">Linefollower Examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/Logging.html">Logging</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/Motor.html">Motor</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/QC.html">Quality Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/Servo.html">Servo</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/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="Mobile navigation menu" >
<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="Page navigation">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Search</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<noscript>
<div id="fallback" class="admonition warning">
<p class="last">
@ -89,35 +172,54 @@
</div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2021, robo4you.</p>
</div>
<p>
&copy; Copyright 2021, robo4you
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</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>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
<script>
<script type="text/javascript">
jQuery(function() { Search.loadIndex("searchindex.js"); });
</script>
<script id="searchindexloader"></script>
<script type="text/javascript" id="searchindexloader"></script>

File diff suppressed because one or more lines are too long