Update documentation

This commit is contained in:
Joel Klimont 2022-11-18 16:46:58 +01:00
parent 64ff14b9b1
commit 75185f19b6
36 changed files with 14537 additions and 3800 deletions

View file

@ -0,0 +1,13 @@
.. _lib_camera:
Camera und OpenCV
*******************
Dokumentation des Camera Moduls
================================
.. autoclass:: compLib.Camera.Marker
:members:
.. autoclass:: compLib.Camera.Camera
:members:

View file

@ -9,3 +9,4 @@ compLib
classes/IRSensor
classes/Seeding
classes/DoubleElimination
classes/Opencv

View file

@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@ -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;
@ -222,7 +222,7 @@ table.modindextable td {
/* -- general body styles --------------------------------------------------- */
div.body {
min-width: 360px;
min-width: 450px;
max-width: 800px;
}
@ -236,6 +236,7 @@ div.body p, div.body dd, div.body li, div.body blockquote {
a.headerlink {
visibility: hidden;
}
a.brackets:before,
span.brackets > a:before{
content: "[";
@ -246,7 +247,6 @@ span.brackets > a:after {
content: "]";
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
@ -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;
@ -334,11 +333,13 @@ aside.sidebar {
p.sidebar-title {
font-weight: bold;
}
div.admonition, div.topic, blockquote {
clear: left;
}
/* -- topics ---------------------------------------------------------------- */
div.topic {
border: 1px solid #ccc;
padding: 7px;
@ -376,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 {
@ -426,6 +425,10 @@ table.docutils td, table.docutils th {
border-bottom: 1px solid #aaa;
}
table.footnote td, table.footnote th {
border: 0 !important;
}
th {
text-align: left;
padding-right: 5px;
@ -452,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 ----------------------------------------------------- */
@ -502,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 ----------------------------------------------------- */
@ -608,6 +552,7 @@ ol.simple p,
ul.simple p {
margin-bottom: 0;
}
dl.footnote > dt,
dl.citation > dt {
float: left;
@ -636,11 +581,11 @@ dl.field-list > dt {
padding-left: 0.5em;
padding-right: 5px;
}
dl.field-list > dt:after {
content: ":";
}
dl.field-list > dd {
padding-left: 0.5em;
margin-top: 0em;
@ -684,6 +629,14 @@ dl.glossary dt {
font-size: 1.1em;
}
.optional {
font-size: 1.3em;
}
.sig-paren {
font-size: larger;
}
.versionmodified {
font-style: italic;
}
@ -724,9 +677,8 @@ dl.glossary dt {
.classifier:before {
font-style: normal;
margin: 0 0.5em;
margin: 0.5em;
content: ":";
display: inline-block;
}
abbr, acronym {
@ -750,7 +702,6 @@ span.pre {
-ms-hyphens: none;
-webkit-hyphens: none;
hyphens: none;
white-space: nowrap;
}
div[class*="highlight-"] {
@ -814,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 {
@ -834,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

@ -2,155 +2,315 @@
* doctools.js
* ~~~~~~~~~~~
*
* Base JavaScript utilities for all Sphinx HTML documentation.
* Sphinx JavaScript utilities for all documentation.
*
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
"use strict";
const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([
"TEXTAREA",
"INPUT",
"SELECT",
"BUTTON",
]);
/**
* select a different prefix for underscore
*/
$u = _.noConflict();
const _ready = (callback) => {
if (document.readyState !== "loading") {
callback();
} else {
document.addEventListener("DOMContentLoaded", callback);
}
/**
* make the code below compatible with browsers without
* an installed firebug like debugger
if (!window.console || !console.firebug) {
var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
"dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
"profile", "profileEnd"];
window.console = {};
for (var i = 0; i < names.length; ++i)
window.console[names[i]] = function() {};
}
*/
/**
* small helper function to urldecode strings
*/
jQuery.urldecode = function(x) {
return decodeURIComponent(x).replace(/\+/g, ' ');
};
/**
* small helper function to urlencode strings
*/
jQuery.urlencode = encodeURIComponent;
/**
* This function returns the parsed url parameters of the
* current request. Multiple values per key are supported,
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s === 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
for (var i = 0; i < parts.length; i++) {
var tmp = parts[i].split('=', 2);
var key = jQuery.urldecode(tmp[0]);
var value = jQuery.urldecode(tmp[1]);
if (key in result)
result[key].push(value);
else
result[key] = [value];
}
return result;
};
/**
* highlight a given string on a jquery object by wrapping it in
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node, addItems) {
if (node.nodeType === 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 &&
!jQuery(node.parentNode).hasClass(className) &&
!jQuery(node.parentNode).hasClass("nohighlight")) {
var span;
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.className = className;
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
var bbox = node.parentElement.getBBox();
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute('class', className);
addItems.push({
"parent": node.parentNode,
"target": rect});
}
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this, addItems);
});
}
}
var addItems = [];
var result = this.each(function() {
highlight(this, addItems);
});
for (var i = 0; i < addItems.length; ++i) {
jQuery(addItems[i].parent).before(addItems[i].target);
}
return result;
};
/*
* backward compatibility for jQuery.browser
* This will be supported until firefox bug is fixed.
*/
if (!jQuery.browser) {
jQuery.uaMatch = function(ua) {
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];
return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
jQuery.browser = {};
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
}
/**
* Small JavaScript module for the documentation.
*/
const Documentation = {
init: () => {
Documentation.initDomainIndexTable();
Documentation.initOnKeyListeners();
var Documentation = {
init : function() {
this.fixFirefoxAnchorBug();
this.highlightSearchWords();
this.initIndexTable();
if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
this.initOnKeyListeners();
}
},
/**
* i18n support
*/
TRANSLATIONS: {},
PLURAL_EXPR: (n) => (n === 1 ? 0 : 1),
LOCALE: "unknown",
TRANSLATIONS : {},
PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; },
LOCALE : 'unknown',
// gettext and ngettext don't access this so that the functions
// can safely bound to a different name (_ = Documentation.gettext)
gettext: (string) => {
const translated = Documentation.TRANSLATIONS[string];
switch (typeof translated) {
case "undefined":
return string; // no translation
case "string":
return translated; // translation exists
default:
return translated[0]; // (singular, plural) translation tuple exists
gettext : function(string) {
var translated = Documentation.TRANSLATIONS[string];
if (typeof translated === 'undefined')
return string;
return (typeof translated === 'string') ? translated : translated[0];
},
ngettext : function(singular, plural, n) {
var translated = Documentation.TRANSLATIONS[singular];
if (typeof translated === 'undefined')
return (n == 1) ? singular : plural;
return translated[Documentation.PLURALEXPR(n)];
},
addTranslations : function(catalog) {
for (var key in catalog.messages)
this.TRANSLATIONS[key] = catalog.messages[key];
this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
this.LOCALE = catalog.locale;
},
/**
* add context elements like header anchor links
*/
addContextElements : function() {
$('div[id] > :header:first').each(function() {
$('<a class="headerlink">\u00B6</a>').
attr('href', '#' + this.id).
attr('title', _('Permalink to this headline')).
appendTo(this);
});
$('dt[id]').each(function() {
$('<a class="headerlink">\u00B6</a>').
attr('href', '#' + this.id).
attr('title', _('Permalink to this definition')).
appendTo(this);
});
},
/**
* workaround a firefox stupidity
* see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
*/
fixFirefoxAnchorBug : function() {
if (document.location.hash && $.browser.mozilla)
window.setTimeout(function() {
document.location.href += '';
}, 10);
},
/**
* highlight the search words provided in the url in the text
*/
highlightSearchWords : function() {
var params = $.getQueryParameters();
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
if (terms.length) {
var body = $('div.body');
if (!body.length) {
body = $('body');
}
window.setTimeout(function() {
$.each(terms, function() {
body.highlightText(this.toLowerCase(), 'highlighted');
});
}, 10);
$('<p class="highlight-link"><a href="javascript:Documentation.' +
'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
.appendTo($('#searchbox'));
}
},
ngettext: (singular, plural, n) => {
const translated = Documentation.TRANSLATIONS[singular];
if (typeof translated !== "undefined")
return translated[Documentation.PLURAL_EXPR(n)];
return n === 1 ? singular : plural;
},
addTranslations: (catalog) => {
Object.assign(Documentation.TRANSLATIONS, catalog.messages);
Documentation.PLURAL_EXPR = new Function(
"n",
`return (${catalog.plural_expr})`
);
Documentation.LOCALE = catalog.locale;
/**
* init the domain index toggle buttons
*/
initIndexTable : function() {
var togglers = $('img.toggler').click(function() {
var src = $(this).attr('src');
var idnum = $(this).attr('id').substr(7);
$('tr.cg-' + idnum).toggle();
if (src.substr(-9) === 'minus.png')
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
else
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
}).css('display', '');
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
togglers.click();
}
},
/**
* helper function to focus on search bar
* helper function to hide the search marks again
*/
focusSearchBar: () => {
document.querySelectorAll("input[name=q]")[0]?.focus();
hideSearchWords : function() {
$('#searchbox .highlight-link').fadeOut(300);
$('span.highlighted').removeClass('highlighted');
},
/**
* Initialise the domain index toggle buttons
* make the url absolute
*/
initDomainIndexTable: () => {
const toggler = (el) => {
const idNumber = el.id.substr(7);
const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`);
if (el.src.substr(-9) === "minus.png") {
el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`;
toggledRows.forEach((el) => (el.style.display = "none"));
} else {
el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`;
toggledRows.forEach((el) => (el.style.display = ""));
}
};
const togglerElements = document.querySelectorAll("img.toggler");
togglerElements.forEach((el) =>
el.addEventListener("click", (event) => toggler(event.currentTarget))
);
togglerElements.forEach((el) => (el.style.display = ""));
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler);
makeURL : function(relativeURL) {
return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
},
initOnKeyListeners: () => {
// only install a listener if it is really needed
if (
!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
)
return;
/**
* get the current relative url
*/
getCurrentURL : function() {
var path = document.location.pathname;
var parts = path.split(/\//);
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
if (this === '..')
parts.pop();
});
var url = parts.join('/');
return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
},
document.addEventListener("keydown", (event) => {
// bail for input elements
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
// bail with special keys
if (event.altKey || event.ctrlKey || event.metaKey) return;
if (!event.shiftKey) {
switch (event.key) {
case "ArrowLeft":
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
const prevLink = document.querySelector('link[rel="prev"]');
if (prevLink && prevLink.href) {
window.location.href = prevLink.href;
event.preventDefault();
initOnKeyListeners: function() {
$(document).keydown(function(event) {
var activeElementType = document.activeElement.tagName;
// don't navigate when in search box, textarea, dropdown or button
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
&& activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey
&& !event.shiftKey) {
switch (event.keyCode) {
case 37: // left
var prevHref = $('link[rel="prev"]').prop('href');
if (prevHref) {
window.location.href = prevHref;
return false;
}
break;
case "ArrowRight":
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
const nextLink = document.querySelector('link[rel="next"]');
if (nextLink && nextLink.href) {
window.location.href = nextLink.href;
event.preventDefault();
case 39: // right
var nextHref = $('link[rel="next"]').prop('href');
if (nextHref) {
window.location.href = nextHref;
return false;
}
break;
}
}
// some keyboard layouts may need Shift to get /
switch (event.key) {
case "/":
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
Documentation.focusSearchBar();
event.preventDefault();
}
});
},
}
};
// quick alias for translations
const _ = Documentation.gettext;
_ = Documentation.gettext;
_ready(Documentation.init);
$(document).ready(function() {
Documentation.init();
});

View file

@ -8,7 +8,5 @@ var DOCUMENTATION_OPTIONS = {
LINK_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt',
NAVIGATION_WITH_KEYS: false,
SHOW_SEARCH_SUMMARY: true,
ENABLE_SEARCH_SHORTCUTS: true,
NAVIGATION_WITH_KEYS: false
};

10872
_static/jquery.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,26 +1,26 @@
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; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
pre { line-height: 125%; margin: 0; }
td.linenos pre { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; }
span.linenos { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; }
td.linenos pre.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight { background: #f8f8f8; }
.highlight .c { color: #3D7B7B; font-style: italic } /* Comment */
.highlight .c { color: #408080; font-style: italic } /* Comment */
.highlight .err { border: 1px solid #FF0000 } /* Error */
.highlight .k { color: #008000; font-weight: bold } /* Keyword */
.highlight .o { color: #666666 } /* Operator */
.highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #9C6500 } /* Comment.Preproc */
.highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */
.highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
.highlight .ch { color: #408080; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #BC7A00 } /* Comment.Preproc */
.highlight .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */
.highlight .cs { color: #408080; font-style: italic } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #E40000 } /* Generic.Error */
.highlight .gr { color: #FF0000 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #008400 } /* Generic.Inserted */
.highlight .go { color: #717171 } /* Generic.Output */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
@ -33,15 +33,15 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
.highlight .kt { color: #B00040 } /* Keyword.Type */
.highlight .m { color: #666666 } /* Literal.Number */
.highlight .s { color: #BA2121 } /* Literal.String */
.highlight .na { color: #687822 } /* Name.Attribute */
.highlight .na { color: #7D9029 } /* Name.Attribute */
.highlight .nb { color: #008000 } /* Name.Builtin */
.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
.highlight .no { color: #880000 } /* Name.Constant */
.highlight .nd { color: #AA22FF } /* Name.Decorator */
.highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */
.highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */
.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0000FF } /* Name.Function */
.highlight .nl { color: #767600 } /* Name.Label */
.highlight .nl { color: #A0A000 } /* Name.Label */
.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #19177C } /* Name.Variable */
@ -58,11 +58,11 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */
.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #BA2121 } /* Literal.String.Double */
.highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */
.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
.highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */
.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
.highlight .sx { color: #008000 } /* Literal.String.Other */
.highlight .sr { color: #A45A77 } /* Literal.String.Regex */
.highlight .sr { color: #BB6688 } /* Literal.String.Regex */
.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
.highlight .ss { color: #19177C } /* Literal.String.Symbol */
.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */

View file

@ -4,24 +4,22 @@
*
* Sphinx JavaScript utilities for the full-text search.
*
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
"use strict";
/**
* Simple result scoring code.
*/
if (typeof Scorer === "undefined") {
if (!Scorer) {
/**
* Simple result scoring code.
*/
var Scorer = {
// Implement the following function to further tweak the score for each result
// The function takes a result array [docname, title, anchor, descr, score, filename]
// The function takes a result array [filename, title, anchor, descr, score]
// and returns the new score.
/*
score: result => {
const [docname, title, anchor, descr, score, filename] = result
return score
score: function(result) {
return result[4];
},
*/
@ -30,11 +28,9 @@ if (typeof Scorer === "undefined") {
// or matches in the last dotted part of the object name
objPartialMatch: 6,
// Additive scores depending on the priority of the object
objPrio: {
0: 15, // used to be importantResults
1: 5, // used to be objectResults
2: -5, // used to be unimportantResults
},
objPrio: {0: 15, // used to be importantResults
1: 5, // used to be objectResults
2: -5}, // used to be unimportantResults
// Used when the priority is not in the mapping.
objPrioDefault: 0,
@ -43,495 +39,444 @@ if (typeof Scorer === "undefined") {
partialTitle: 7,
// query found in terms
term: 5,
partialTerm: 2,
partialTerm: 2
};
}
const _removeChildren = (element) => {
while (element && element.lastChild) element.removeChild(element.lastChild);
};
/**
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping
*/
const _escapeRegExp = (string) =>
string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
const _displayItem = (item, searchTerms) => {
const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT;
const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
const [docName, title, anchor, descr, score, _filename] = item;
let listItem = document.createElement("li");
let requestUrl;
let linkUrl;
if (docBuilder === "dirhtml") {
// dirhtml builder
let dirname = docName + "/";
if (dirname.match(/\/index\/$/))
dirname = dirname.substring(0, dirname.length - 6);
else if (dirname === "index/") dirname = "";
requestUrl = docUrlRoot + dirname;
linkUrl = requestUrl;
} else {
// normal html builders
requestUrl = docUrlRoot + docName + docFileSuffix;
linkUrl = docName + docLinkSuffix;
if (!splitQuery) {
function splitQuery(query) {
return query.split(/\s+/);
}
let linkEl = listItem.appendChild(document.createElement("a"));
linkEl.href = linkUrl + anchor;
linkEl.dataset.score = score;
linkEl.innerHTML = title;
if (descr)
listItem.appendChild(document.createElement("span")).innerHTML =
" (" + descr + ")";
else if (showSearchSummary)
fetch(requestUrl)
.then((responseData) => responseData.text())
.then((data) => {
if (data)
listItem.appendChild(
Search.makeSearchSummary(data, searchTerms)
);
});
Search.output.appendChild(listItem);
};
const _finishSearch = (resultCount) => {
Search.stopPulse();
Search.title.innerText = _("Search Results");
if (!resultCount)
Search.status.innerText = Documentation.gettext(
"Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories."
);
else
Search.status.innerText = _(
`Search finished, found ${resultCount} page(s) matching the search query.`
);
};
const _displayNextItem = (
results,
resultCount,
searchTerms
) => {
// results left, load the summary and display it
// this is intended to be dynamic (don't sub resultsCount)
if (results.length) {
_displayItem(results.pop(), searchTerms);
setTimeout(
() => _displayNextItem(results, resultCount, searchTerms),
5
);
}
// search finished, update title and status message
else _finishSearch(resultCount);
};
/**
* Default splitQuery function. Can be overridden in ``sphinx.search`` with a
* custom function per language.
*
* The regular expression works by splitting the string on consecutive characters
* that are not Unicode letters, numbers, underscores, or emoji characters.
* This is the same as ``\W+`` in Python, preserving the surrogate pair area.
*/
if (typeof splitQuery === "undefined") {
var splitQuery = (query) => query
.split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu)
.filter(term => term) // remove remaining empty strings
}
/**
* Search Module
*/
const Search = {
_index: null,
_queued_query: null,
_pulse_status: -1,
var Search = {
htmlToText: (htmlString) => {
const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() });
const docContent = htmlElement.querySelector('[role="main"]');
if (docContent !== undefined) return docContent.textContent;
console.warn(
"Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template."
);
return "";
_index : null,
_queued_query : null,
_pulse_status : -1,
htmlToText : function(htmlString) {
var virtualDocument = document.implementation.createHTMLDocument('virtual');
var htmlElement = $(htmlString, virtualDocument);
htmlElement.find('.headerlink').remove();
docContent = htmlElement.find('[role=main]')[0];
if(docContent === undefined) {
console.warn("Content block not found. Sphinx search tries to obtain it " +
"via '[role=main]'. Could you check your theme or template.");
return "";
}
return docContent.textContent || docContent.innerText;
},
init: () => {
const query = new URLSearchParams(window.location.search).get("q");
document
.querySelectorAll('input[name="q"]')
.forEach((el) => (el.value = query));
if (query) Search.performSearch(query);
init : function() {
var params = $.getQueryParameters();
if (params.q) {
var query = params.q[0];
$('input[name="q"]')[0].value = query;
this.performSearch(query);
}
},
loadIndex: (url) =>
(document.body.appendChild(document.createElement("script")).src = url),
loadIndex : function(url) {
$.ajax({type: "GET", url: url, data: null,
dataType: "script", cache: true,
complete: function(jqxhr, textstatus) {
if (textstatus != "success") {
document.getElementById("searchindexloader").src = url;
}
}});
},
setIndex: (index) => {
Search._index = index;
if (Search._queued_query !== null) {
const query = Search._queued_query;
Search._queued_query = null;
Search.query(query);
setIndex : function(index) {
var q;
this._index = index;
if ((q = this._queued_query) !== null) {
this._queued_query = null;
Search.query(q);
}
},
hasIndex: () => Search._index !== null,
hasIndex : function() {
return this._index !== null;
},
deferQuery: (query) => (Search._queued_query = query),
deferQuery : function(query) {
this._queued_query = query;
},
stopPulse: () => (Search._pulse_status = -1),
stopPulse : function() {
this._pulse_status = 0;
},
startPulse: () => {
if (Search._pulse_status >= 0) return;
const pulse = () => {
startPulse : function() {
if (this._pulse_status >= 0)
return;
function pulse() {
var i;
Search._pulse_status = (Search._pulse_status + 1) % 4;
Search.dots.innerText = ".".repeat(Search._pulse_status);
if (Search._pulse_status >= 0) window.setTimeout(pulse, 500);
};
var dotString = '';
for (i = 0; i < Search._pulse_status; i++)
dotString += '.';
Search.dots.text(dotString);
if (Search._pulse_status > -1)
window.setTimeout(pulse, 500);
}
pulse();
},
/**
* perform a search for something (or wait until index is loaded)
*/
performSearch: (query) => {
performSearch : function(query) {
// create the required interface elements
const searchText = document.createElement("h2");
searchText.textContent = _("Searching");
const searchSummary = document.createElement("p");
searchSummary.classList.add("search-summary");
searchSummary.innerText = "";
const searchList = document.createElement("ul");
searchList.classList.add("search");
this.out = $('#search-results');
this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
this.dots = $('<span></span>').appendTo(this.title);
this.status = $('<p class="search-summary">&nbsp;</p>').appendTo(this.out);
this.output = $('<ul class="search"/>').appendTo(this.out);
const out = document.getElementById("search-results");
Search.title = out.appendChild(searchText);
Search.dots = Search.title.appendChild(document.createElement("span"));
Search.status = out.appendChild(searchSummary);
Search.output = out.appendChild(searchList);
const searchProgress = document.getElementById("search-progress");
// Some themes don't use the search progress node
if (searchProgress) {
searchProgress.innerText = _("Preparing search...");
}
Search.startPulse();
$('#search-progress').text(_('Preparing search...'));
this.startPulse();
// index already loaded, the browser was quick!
if (Search.hasIndex()) Search.query(query);
else Search.deferQuery(query);
if (this.hasIndex())
this.query(query);
else
this.deferQuery(query);
},
/**
* execute search (requires search index to be loaded)
*/
query: (query) => {
const filenames = Search._index.filenames;
const docNames = Search._index.docnames;
const titles = Search._index.titles;
const allTitles = Search._index.alltitles;
const indexEntries = Search._index.indexentries;
query : function(query) {
var i;
// stem the search terms and add them to the correct list
const stemmer = new Stemmer();
const searchTerms = new Set();
const excludedTerms = new Set();
const highlightTerms = new Set();
const objectTerms = new Set(splitQuery(query.toLowerCase().trim()));
splitQuery(query.trim()).forEach((queryTerm) => {
const queryTermLower = queryTerm.toLowerCase();
// maybe skip this "word"
// stopwords array is from language_data.js
if (
stopwords.indexOf(queryTermLower) !== -1 ||
queryTerm.match(/^\d+$/)
)
return;
// stem the searchterms and add them to the correct list
var stemmer = new Stemmer();
var searchterms = [];
var excluded = [];
var hlterms = [];
var tmp = splitQuery(query);
var objectterms = [];
for (i = 0; i < tmp.length; i++) {
if (tmp[i] !== "") {
objectterms.push(tmp[i].toLowerCase());
}
if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i] === "") {
// skip this "word"
continue;
}
// stem the word
let word = stemmer.stemWord(queryTermLower);
var word = stemmer.stemWord(tmp[i].toLowerCase());
// prevent stemmer from cutting word smaller than two chars
if(word.length < 3 && tmp[i].length >= 3) {
word = tmp[i];
}
var toAppend;
// select the correct list
if (word[0] === "-") excludedTerms.add(word.substr(1));
if (word[0] == '-') {
toAppend = excluded;
word = word.substr(1);
}
else {
searchTerms.add(word);
highlightTerms.add(queryTermLower);
toAppend = searchterms;
hlterms.push(tmp[i].toLowerCase());
}
});
if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js
localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" "))
// only add if not already in the list
if (!$u.contains(toAppend, word))
toAppend.push(word);
}
var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
// console.debug("SEARCH: searching for:");
// console.info("required: ", [...searchTerms]);
// console.info("excluded: ", [...excludedTerms]);
// console.debug('SEARCH: searching for:');
// console.info('required: ', searchterms);
// console.info('excluded: ', excluded);
// array of [docname, title, anchor, descr, score, filename]
let results = [];
_removeChildren(document.getElementById("search-progress"));
// prepare search
var terms = this._index.terms;
var titleterms = this._index.titleterms;
const queryLower = query.toLowerCase();
for (const [title, foundTitles] of Object.entries(allTitles)) {
if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) {
for (const [file, id] of foundTitles) {
let score = Math.round(100 * queryLower.length / title.length)
results.push([
docNames[file],
titles[file] !== title ? `${titles[file]} > ${title}` : title,
id !== null ? "#" + id : "",
null,
score,
filenames[file],
]);
}
}
}
// search for explicit entries in index directives
for (const [entry, foundEntries] of Object.entries(indexEntries)) {
if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) {
for (const [file, id] of foundEntries) {
let score = Math.round(100 * queryLower.length / entry.length)
results.push([
docNames[file],
titles[file],
id ? "#" + id : "",
null,
score,
filenames[file],
]);
}
}
}
// array of [filename, title, anchor, descr, score]
var results = [];
$('#search-progress').empty();
// lookup as object
objectTerms.forEach((term) =>
results.push(...Search.performObjectSearch(term, objectTerms))
);
for (i = 0; i < objectterms.length; i++) {
var others = [].concat(objectterms.slice(0, i),
objectterms.slice(i+1, objectterms.length));
results = results.concat(this.performObjectSearch(objectterms[i], others));
}
// lookup as search terms in fulltext
results.push(...Search.performTermsSearch(searchTerms, excludedTerms));
results = results.concat(this.performTermsSearch(searchterms, excluded, terms, titleterms));
// let the scorer override scores with a custom scoring function
if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item)));
if (Scorer.score) {
for (i = 0; i < results.length; i++)
results[i][4] = Scorer.score(results[i]);
}
// now sort the results by score (in opposite order of appearance, since the
// display function below uses pop() to retrieve items) and then
// alphabetically
results.sort((a, b) => {
const leftScore = a[4];
const rightScore = b[4];
if (leftScore === rightScore) {
results.sort(function(a, b) {
var left = a[4];
var right = b[4];
if (left > right) {
return 1;
} else if (left < right) {
return -1;
} else {
// same score: sort alphabetically
const leftTitle = a[1].toLowerCase();
const rightTitle = b[1].toLowerCase();
if (leftTitle === rightTitle) return 0;
return leftTitle > rightTitle ? -1 : 1; // inverted is intentional
left = a[1].toLowerCase();
right = b[1].toLowerCase();
return (left > right) ? -1 : ((left < right) ? 1 : 0);
}
return leftScore > rightScore ? 1 : -1;
});
// remove duplicate search results
// note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept
let seen = new Set();
results = results.reverse().reduce((acc, result) => {
let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(',');
if (!seen.has(resultStr)) {
acc.push(result);
seen.add(resultStr);
}
return acc;
}, []);
results = results.reverse();
// for debugging
//Search.lastresults = results.slice(); // a copy
// console.info("search results:", Search.lastresults);
//console.info('search results:', Search.lastresults);
// print the results
_displayNextItem(results, results.length, searchTerms);
var resultCount = results.length;
function displayNextItem() {
// results left, load the summary and display it
if (results.length) {
var item = results.pop();
var listItem = $('<li style="display:none"></li>');
var requestUrl = "";
var linkUrl = "";
if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') {
// dirhtml builder
var dirname = item[0] + '/';
if (dirname.match(/\/index\/$/)) {
dirname = dirname.substring(0, dirname.length-6);
} else if (dirname == 'index/') {
dirname = '';
}
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + dirname;
linkUrl = requestUrl;
} else {
// normal html builders
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX;
linkUrl = item[0] + DOCUMENTATION_OPTIONS.LINK_SUFFIX;
}
listItem.append($('<a/>').attr('href',
linkUrl +
highlightstring + item[2]).html(item[1]));
if (item[3]) {
listItem.append($('<span> (' + item[3] + ')</span>'));
Search.output.append(listItem);
listItem.slideDown(5, function() {
displayNextItem();
});
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
$.ajax({url: requestUrl,
dataType: "text",
complete: function(jqxhr, textstatus) {
var data = jqxhr.responseText;
if (data !== '' && data !== undefined) {
listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
}
Search.output.append(listItem);
listItem.slideDown(5, function() {
displayNextItem();
});
}});
} else {
// no source available, just display title
Search.output.append(listItem);
listItem.slideDown(5, function() {
displayNextItem();
});
}
}
// search finished, update title and status message
else {
Search.stopPulse();
Search.title.text(_('Search Results'));
if (!resultCount)
Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
else
Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
Search.status.fadeIn(500);
}
}
displayNextItem();
},
/**
* search for object names
*/
performObjectSearch: (object, objectTerms) => {
const filenames = Search._index.filenames;
const docNames = Search._index.docnames;
const objects = Search._index.objects;
const objNames = Search._index.objnames;
const titles = Search._index.titles;
performObjectSearch : function(object, otherterms) {
var filenames = this._index.filenames;
var docnames = this._index.docnames;
var objects = this._index.objects;
var objnames = this._index.objnames;
var titles = this._index.titles;
const results = [];
var i;
var results = [];
const objectSearchCallback = (prefix, match) => {
const name = match[4]
const fullname = (prefix ? prefix + "." : "") + name;
const fullnameLower = fullname.toLowerCase();
if (fullnameLower.indexOf(object) < 0) return;
for (var prefix in objects) {
for (var name in objects[prefix]) {
var fullname = (prefix ? prefix + '.' : '') + name;
var fullnameLower = fullname.toLowerCase()
if (fullnameLower.indexOf(object) > -1) {
var score = 0;
var parts = fullnameLower.split('.');
// check for different match types: exact matches of full name or
// "last name" (i.e. last dotted part)
if (fullnameLower == object || parts[parts.length - 1] == object) {
score += Scorer.objNameMatch;
// matches in last name
} else if (parts[parts.length - 1].indexOf(object) > -1) {
score += Scorer.objPartialMatch;
}
var match = objects[prefix][name];
var objname = objnames[match[1]][2];
var title = titles[match[0]];
// If more than one term searched for, we require other words to be
// found in the name/title/description
if (otherterms.length > 0) {
var haystack = (prefix + ' ' + name + ' ' +
objname + ' ' + title).toLowerCase();
var allfound = true;
for (i = 0; i < otherterms.length; i++) {
if (haystack.indexOf(otherterms[i]) == -1) {
allfound = false;
break;
}
}
if (!allfound) {
continue;
}
}
var descr = objname + _(', in ') + title;
let score = 0;
const parts = fullnameLower.split(".");
// check for different match types: exact matches of full name or
// "last name" (i.e. last dotted part)
if (fullnameLower === object || parts.slice(-1)[0] === object)
score += Scorer.objNameMatch;
else if (parts.slice(-1)[0].indexOf(object) > -1)
score += Scorer.objPartialMatch; // matches in last name
const objName = objNames[match[1]][2];
const title = titles[match[0]];
// If more than one term searched for, we require other words to be
// found in the name/title/description
const otherTerms = new Set(objectTerms);
otherTerms.delete(object);
if (otherTerms.size > 0) {
const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase();
if (
[...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0)
)
return;
var anchor = match[3];
if (anchor === '')
anchor = fullname;
else if (anchor == '-')
anchor = objnames[match[1]][1] + '-' + fullname;
// add custom score for some objects according to scorer
if (Scorer.objPrio.hasOwnProperty(match[2])) {
score += Scorer.objPrio[match[2]];
} else {
score += Scorer.objPrioDefault;
}
results.push([docnames[match[0]], fullname, '#'+anchor, descr, score, filenames[match[0]]]);
}
}
}
let anchor = match[3];
if (anchor === "") anchor = fullname;
else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname;
const descr = objName + _(", in ") + title;
// add custom score for some objects according to scorer
if (Scorer.objPrio.hasOwnProperty(match[2]))
score += Scorer.objPrio[match[2]];
else score += Scorer.objPrioDefault;
results.push([
docNames[match[0]],
fullname,
"#" + anchor,
descr,
score,
filenames[match[0]],
]);
};
Object.keys(objects).forEach((prefix) =>
objects[prefix].forEach((array) =>
objectSearchCallback(prefix, array)
)
);
return results;
},
/**
* search for full-text terms in the index
*/
performTermsSearch: (searchTerms, excludedTerms) => {
// prepare search
const terms = Search._index.terms;
const titleTerms = Search._index.titleterms;
const filenames = Search._index.filenames;
const docNames = Search._index.docnames;
const titles = Search._index.titles;
performTermsSearch : function(searchterms, excluded, terms, titleterms) {
var docnames = this._index.docnames;
var filenames = this._index.filenames;
var titles = this._index.titles;
const scoreMap = new Map();
const fileMap = new Map();
var i, j, file;
var fileMap = {};
var scoreMap = {};
var results = [];
// perform the search on the required terms
searchTerms.forEach((word) => {
const files = [];
const arr = [
{ files: terms[word], score: Scorer.term },
{ files: titleTerms[word], score: Scorer.title },
for (i = 0; i < searchterms.length; i++) {
var word = searchterms[i];
var files = [];
var _o = [
{files: terms[word], score: Scorer.term},
{files: titleterms[word], score: Scorer.title}
];
// add support for partial matches
if (word.length > 2) {
const escapedWord = _escapeRegExp(word);
Object.keys(terms).forEach((term) => {
if (term.match(escapedWord) && !terms[word])
arr.push({ files: terms[term], score: Scorer.partialTerm });
});
Object.keys(titleTerms).forEach((term) => {
if (term.match(escapedWord) && !titleTerms[word])
arr.push({ files: titleTerms[word], score: Scorer.partialTitle });
});
for (var w in terms) {
if (w.match(word) && !terms[word]) {
_o.push({files: terms[w], score: Scorer.partialTerm})
}
}
for (var w in titleterms) {
if (w.match(word) && !titleterms[word]) {
_o.push({files: titleterms[w], score: Scorer.partialTitle})
}
}
}
// no match but word was a required one
if (arr.every((record) => record.files === undefined)) return;
if ($u.every(_o, function(o){return o.files === undefined;})) {
break;
}
// found search word in contents
arr.forEach((record) => {
if (record.files === undefined) return;
$u.each(_o, function(o) {
var _files = o.files;
if (_files === undefined)
return
let recordFiles = record.files;
if (recordFiles.length === undefined) recordFiles = [recordFiles];
files.push(...recordFiles);
if (_files.length === undefined)
_files = [_files];
files = files.concat(_files);
// set score for the word in each file
recordFiles.forEach((file) => {
if (!scoreMap.has(file)) scoreMap.set(file, {});
scoreMap.get(file)[word] = record.score;
});
// set score for the word in each file to Scorer.term
for (j = 0; j < _files.length; j++) {
file = _files[j];
if (!(file in scoreMap))
scoreMap[file] = {};
scoreMap[file][word] = o.score;
}
});
// create the mapping
files.forEach((file) => {
if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1)
fileMap.get(file).push(word);
else fileMap.set(file, [word]);
});
});
for (j = 0; j < files.length; j++) {
file = files[j];
if (file in fileMap && fileMap[file].indexOf(word) === -1)
fileMap[file].push(word);
else
fileMap[file] = [word];
}
}
// now check if the files don't contain excluded terms
const results = [];
for (const [file, wordList] of fileMap) {
// check if all requirements are matched
for (file in fileMap) {
var valid = true;
// as search terms with length < 3 are discarded
const filteredTermCount = [...searchTerms].filter(
(term) => term.length > 2
).length;
// check if all requirements are matched
var filteredTermCount = // as search terms with length < 3 are discarded: ignore
searchterms.filter(function(term){return term.length > 2}).length
if (
wordList.length !== searchTerms.size &&
wordList.length !== filteredTermCount
)
continue;
fileMap[file].length != searchterms.length &&
fileMap[file].length != filteredTermCount
) continue;
// ensure that none of the excluded terms is in the search result
if (
[...excludedTerms].some(
(term) =>
terms[term] === file ||
titleTerms[term] === file ||
(terms[term] || []).includes(file) ||
(titleTerms[term] || []).includes(file)
)
)
break;
for (i = 0; i < excluded.length; i++) {
if (terms[excluded[i]] == file ||
titleterms[excluded[i]] == file ||
$u.contains(terms[excluded[i]] || [], file) ||
$u.contains(titleterms[excluded[i]] || [], file)) {
valid = false;
break;
}
}
// select one (max) score for the file.
const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w]));
// add result to the result list
results.push([
docNames[file],
titles[file],
"",
null,
score,
filenames[file],
]);
// if we have still a valid result we can add it to the result list
if (valid) {
// select one (max) score for the file.
// for better ranking, we should calculate ranking by using words statistics like basic tf-idf...
var score = $u.max($u.map(fileMap[file], function(w){return scoreMap[file][w]}));
results.push([docnames[file], titles[file], '', null, score, filenames[file]]);
}
}
return results;
},
@ -539,28 +484,31 @@ const Search = {
/**
* helper function to return a node containing the
* search summary for a given text. keywords is a list
* of stemmed words.
* of stemmed words, hlwords is the list of normal, unstemmed
* words. the first one is used to find the occurrence, the
* latter for highlighting it.
*/
makeSearchSummary: (htmlText, keywords) => {
const text = Search.htmlToText(htmlText);
if (text === "") return null;
const textLower = text.toLowerCase();
const actualStartPosition = [...keywords]
.map((k) => textLower.indexOf(k.toLowerCase()))
.filter((i) => i > -1)
.slice(-1)[0];
const startWithContext = Math.max(actualStartPosition - 120, 0);
const top = startWithContext === 0 ? "" : "...";
const tail = startWithContext + 240 < text.length ? "..." : "";
let summary = document.createElement("p");
summary.classList.add("context");
summary.textContent = top + text.substr(startWithContext, 240).trim() + tail;
return summary;
},
makeSearchSummary : function(htmlText, keywords, hlwords) {
var text = Search.htmlToText(htmlText);
var textLower = text.toLowerCase();
var start = 0;
$.each(keywords, function() {
var i = textLower.indexOf(this.toLowerCase());
if (i > -1)
start = i;
});
start = Math.max(start - 120, 0);
var excerpt = ((start > 0) ? '...' : '') +
$.trim(text.substr(start, 240)) +
((start + 240 - text.length) ? '...' : '');
var rv = $('<div class="context"></div>').text(excerpt);
$.each(hlwords, function() {
rv = rv.highlightText(this, 'highlighted');
});
return rv;
}
};
_ready(Search.init);
$(document).ready(function() {
Search.init();
});

View file

@ -13,7 +13,7 @@ Documentation.addTranslations({
"Complete Table of Contents": "Vollst\u00e4ndiges Inhaltsverzeichnis",
"Contents": "Inhalt",
"Copyright": "Copyright",
"Created using <a href=\"https://www.sphinx-doc.org/\">Sphinx</a> %(sphinx_version)s.": "",
"Created using <a href=\"http://sphinx-doc.org/\">Sphinx</a> %(sphinx_version)s.": "Mit <a href=\"http://sphinx-doc.org/\">Sphinx</a> %(sphinx_version)s erstellt.",
"Expand sidebar": "Seitenleiste ausklappen",
"Full index on one page": "Gesamtes Stichwortverzeichnis auf einer Seite",
"General Index": "Stichwortverzeichnis",
@ -30,6 +30,8 @@ Documentation.addTranslations({
"Next topic": "N\u00e4chstes Thema",
"Other changes": "Andere \u00c4nderungen",
"Overview": "\u00dcbersicht",
"Permalink to this definition": "Link zu dieser Definition",
"Permalink to this headline": "Link zu dieser \u00dcberschrift",
"Please activate JavaScript to enable the search\n functionality.": "Bitte aktivieren Sie JavaScript, wenn Sie die Suchfunktion nutzen wollen.",
"Preparing search...": "Suche wird vorbereitet...",
"Previous topic": "Vorheriges Thema",
@ -37,7 +39,7 @@ Documentation.addTranslations({
"Search": "Suche",
"Search Page": "Suche",
"Search Results": "Suchergebnisse",
"Search finished, found ${resultCount} page(s) matching the search query.": "",
"Search finished, found %s page(s) matching the search query.": "Die Suche ist fertig, es wurde(n) %s Seite(n) mit Treffern gefunden.",
"Search within %(docstitle)s": "Suche in %(docstitle)s",
"Searching": "Suchen",
"Searching for multiple words only shows matches that contain\n all words.": "",

File diff suppressed because one or more lines are too long

174
faq.html
View file

@ -1,73 +1,32 @@
<!DOCTYPE html>
<html class="writer-html5" lang="de" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FAQ &mdash; CompLib 0.2.3 Dokumentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>FAQ &mdash; CompLib 0.2.3 Dokumentation</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 data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script 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/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/translations.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Stichwortverzeichnis" href="genindex.html" />
<link rel="search" title="Suche" href="search.html" />
<link rel="next" title="Beispiele" href="other/usage.html" />
<link rel="prev" title="Installationsanweisungen" href="software/installation.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">
<img src="_static/compair-logo-white.svg" class="logo" alt="Logo"/>
<a href="index.html"><img src="_static/compair-logo-white.svg" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
@ -75,18 +34,7 @@
<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">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="gettingStarted/index.html">Erste Schritte</a></li>
<li class="toctree-l1"><a class="reference internal" href="software/installation.html">Installationsanweisungen</a></li>
@ -103,85 +51,46 @@
<li class="toctree-l1"><a class="reference internal" href="other/hardware.html">Hardware</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">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<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">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>FAQ</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/faq.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="faq">
<h1>FAQ<a class="headerlink" href="#faq" title="Permalink to this heading"></a></h1>
<h1>FAQ<a class="headerlink" href="#faq" title="Link zu dieser Überschrift"></a></h1>
<div class="section" id="was-ist-das-passwort-fur-die-entwicklungsumgebung">
<h2>Was ist das Passwort für die Entwicklungsumgebung?<a class="headerlink" href="#was-ist-das-passwort-fur-die-entwicklungsumgebung" title="Permalink to this heading"></a></h2>
<h2>Was ist das Passwort für die Entwicklungsumgebung?<a class="headerlink" href="#was-ist-das-passwort-fur-die-entwicklungsumgebung" title="Link zu dieser Überschrift"></a></h2>
<p><code class="docutils literal notranslate"><span class="pre">compair</span></code></p>
</div>
<div class="section" id="wie-verbinde-ich-mich-zur-entwicklungsumgebung">
<h2>Wie verbinde ich mich zur Entwicklungsumgebung?<a class="headerlink" href="#wie-verbinde-ich-mich-zur-entwicklungsumgebung" title="Permalink to this heading"></a></h2>
<h2>Wie verbinde ich mich zur Entwicklungsumgebung?<a class="headerlink" href="#wie-verbinde-ich-mich-zur-entwicklungsumgebung" title="Link zu dieser Überschrift"></a></h2>
<p>See <a class="reference internal" href="gettingStarted/codeServer.html#gettingstarted-codeserver"><span class="std std-ref">Programmierumgebung</span></a></p>
</div>
<div class="section" id="was-ist-der-benutzername-und-das-passwort-fur-den-raspberry-pi">
<h2>Was ist der Benutzername und das Passwort für den Raspberry Pi?<a class="headerlink" href="#was-ist-der-benutzername-und-das-passwort-fur-den-raspberry-pi" title="Permalink to this heading"></a></h2>
<h2>Was ist der Benutzername und das Passwort für den Raspberry Pi?<a class="headerlink" href="#was-ist-der-benutzername-und-das-passwort-fur-den-raspberry-pi" title="Link zu dieser Überschrift"></a></h2>
<p><code class="docutils literal notranslate"><span class="pre">compair</span></code> <code class="docutils literal notranslate"><span class="pre">compair</span></code></p>
</div>
<div class="section" id="wie-aktualisiere-ich-meine-software">
<h2>Wie aktualisiere ich meine Software?<a class="headerlink" href="#wie-aktualisiere-ich-meine-software" title="Permalink to this heading"></a></h2>
<h2>Wie aktualisiere ich meine Software?<a class="headerlink" href="#wie-aktualisiere-ich-meine-software" title="Link zu dieser Überschrift"></a></h2>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo apt update
sudo apt upgrade
sudo update-firmware
@ -189,7 +98,7 @@ sudo update-firmware
</div>
</div>
<div class="section" id="wie-kann-ich-die-sd-karte-neu-beschreiben">
<h2>Wie kann ich die SD-Karte neu beschreiben?<a class="headerlink" href="#wie-kann-ich-die-sd-karte-neu-beschreiben" title="Permalink to this heading"></a></h2>
<h2>Wie kann ich die SD-Karte neu beschreiben?<a class="headerlink" href="#wie-kann-ich-die-sd-karte-neu-beschreiben" title="Link zu dieser Überschrift"></a></h2>
<p><a class="reference external" href="https://drive.google.com/drive/folders/16lMe-yGphk947L4WPjd4oD8ndY9R1WbA?usp=share_link">SD-Karten Image</a></p>
<p>Software zum Schreiben der SD-Karte <a class="reference external" href="https://www.balena.io/etcher/">balenaEtcher</a></p>
</div>
@ -197,58 +106,33 @@ sudo update-firmware
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="other/usage.html" class="btn btn-neutral float-right" title="Beispiele" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
<a href="software/installation.html" class="btn btn-neutral float-left" title="Installationsanweisungen" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="software/installation.html" class="btn btn-neutral float-left" title="Installationsanweisungen" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Zurück</a>
<a href="other/usage.html" class="btn btn-neutral float-right" title="Beispiele" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
</p>
<p>&#169; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS).</p>
</div>
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
Erstellt mit <a href="https://www.sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,71 +1,30 @@
<!DOCTYPE html>
<html class="writer-html5" lang="de" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Stichwortverzeichnis &mdash; CompLib 0.2.3 Dokumentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Stichwortverzeichnis &mdash; CompLib 0.2.3 Dokumentation</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 data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script 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/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/translations.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Stichwortverzeichnis" href="#" />
<link rel="search" title="Suche" 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">
<img src="_static/compair-logo-white.svg" class="logo" alt="Logo"/>
<a href="index.html"><img src="_static/compair-logo-white.svg" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
@ -73,18 +32,7 @@
<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">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="gettingStarted/index.html">Erste Schritte</a></li>
<li class="toctree-l1"><a class="reference internal" href="software/installation.html">Installationsanweisungen</a></li>
@ -94,72 +42,35 @@
<li class="toctree-l1"><a class="reference internal" href="other/hardware.html">Hardware</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">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<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">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Stichwortverzeichnis</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">Stichwortverzeichnis</h1>
<div class="genindex-jumpbox">
<a href="#D"><strong>D</strong></a>
<a href="#C"><strong>C</strong></a>
| <a href="#D"><strong>D</strong></a>
| <a href="#E"><strong>E</strong></a>
| <a href="#G"><strong>G</strong></a>
| <a href="#I"><strong>I</strong></a>
@ -169,14 +80,28 @@
| <a href="#S"><strong>S</strong></a>
</div>
<h2 id="C">C</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="lib/classes/Opencv.html#compLib.Camera.Camera">Camera (Klasse in compLib.Camera)</a>
</li>
</ul></td>
</tr></table>
<h2 id="D">D</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="lib/classes/IRSensor.html#compLib.IRSensor.IRSensor.disable">disable() (statische Methode von compLib.IRSensor.IRSensor)</a>
<li><a href="lib/classes/Opencv.html#compLib.Camera.Camera.detect_markers">detect_markers() (Methode von compLib.Camera.Camera)</a>
</li>
<li><a href="lib/classes/Opencv.html#compLib.Camera.Camera.detect_markers_midpoint">detect_markers_midpoint() (Methode von compLib.Camera.Camera)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="lib/classes/IRSensor.html#compLib.IRSensor.IRSensor.disable">disable() (statische Methode von compLib.IRSensor.IRSensor)</a>
</li>
<li><a href="lib/classes/DoubleElimination.html#compLib.DoubleElimination.DoubleElim">DoubleElim (Klasse in compLib.DoubleElimination)</a>
</li>
<li><a href="lib/classes/Opencv.html#compLib.Camera.Camera.draw_markers">draw_markers() (Methode von compLib.Camera.Camera)</a>
</li>
</ul></td>
</tr></table>
@ -197,6 +122,8 @@
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="lib/classes/Seeding.html#compLib.Seeding.Gamestate">Gamestate (Klasse in compLib.Seeding)</a>
</li>
<li><a href="lib/classes/Opencv.html#compLib.Camera.Camera.get_frame">get_frame() (Methode von compLib.Camera.Camera)</a>
</li>
<li><a href="lib/classes/DoubleElimination.html#compLib.DoubleElimination.DoubleElim.get_goal">get_goal() (statische Methode von compLib.DoubleElimination.DoubleElim)</a>
</li>
@ -230,12 +157,14 @@
<h2 id="M">M</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="lib/classes/Motor.html#compLib.Motor.Motor">Motor (Klasse in compLib.Motor)</a>
<li><a href="lib/classes/Opencv.html#compLib.Camera.Marker">Marker (Klasse in compLib.Camera)</a>
</li>
<li><a href="lib/classes/Motor.html#compLib.Motor.Motor.multiple_power">multiple_power() (statische Methode von compLib.Motor.Motor)</a>
<li><a href="lib/classes/Motor.html#compLib.Motor.Motor">Motor (Klasse in compLib.Motor)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="lib/classes/Motor.html#compLib.Motor.Motor.multiple_power">multiple_power() (statische Methode von compLib.Motor.Motor)</a>
</li>
<li><a href="lib/classes/Motor.html#compLib.Motor.Motor.multiple_pulse_width">multiple_pulse_width() (statische Methode von compLib.Motor.Motor)</a>
</li>
<li><a href="lib/classes/Motor.html#compLib.Motor.Motor.multiple_speed">multiple_speed() (statische Methode von compLib.Motor.Motor)</a>
@ -247,10 +176,12 @@
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="lib/classes/DoubleElimination.html#compLib.DoubleElimination.Position">Position (Klasse in compLib.DoubleElimination)</a>
</li>
<li><a href="lib/classes/Motor.html#compLib.Motor.Motor.power">power() (statische Methode von compLib.Motor.Motor)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="lib/classes/Motor.html#compLib.Motor.Motor.power">power() (statische Methode von compLib.Motor.Motor)</a>
<li><a href="lib/classes/Opencv.html#compLib.Camera.Camera.publish_frame">publish_frame() (Methode von compLib.Camera.Camera)</a>
</li>
<li><a href="lib/classes/Motor.html#compLib.Motor.Motor.pulse_width">pulse_width() (statische Methode von compLib.Motor.Motor)</a>
</li>
@ -282,49 +213,30 @@
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
</p>
<p>&#169; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS).</p>
</div>
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
Erstellt mit <a href="https://www.sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,73 +1,32 @@
<!DOCTYPE html>
<html class="writer-html5" lang="de" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Programmierumgebung &mdash; CompLib 0.2.3 Dokumentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Programmierumgebung &mdash; CompLib 0.2.3 Dokumentation</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 data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script 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/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Stichwortverzeichnis" href="../genindex.html" />
<link rel="search" title="Suche" href="../search.html" />
<link rel="next" title="Mein erstes Programm" href="firstProgram.html" />
<link rel="prev" title="WLAN-Verbindung herstellen" href="wifi.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">
<img src="../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
<a href="../index.html"><img src="../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
@ -75,18 +34,7 @@
<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">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Erste Schritte</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="wifi.html">WLAN-Verbindung herstellen</a></li>
@ -107,76 +55,36 @@
<li class="toctree-l1"><a class="reference internal" href="../other/hardware.html">Hardware</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">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<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">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="index.html">Erste Schritte</a> &raquo;</li>
<li>Programmierumgebung</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/gettingStarted/codeServer.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="programmierumgebung">
<span id="gettingstarted-codeserver"></span><h1>Programmierumgebung<a class="headerlink" href="#programmierumgebung" title="Permalink to this heading"></a></h1>
<span id="gettingstarted-codeserver"></span><h1>Programmierumgebung<a class="headerlink" href="#programmierumgebung" title="Link zu dieser Überschrift"></a></h1>
<p>Als Umgebung zur Programmierung des Roboters wird <a class="reference external" href="https://github.com/coder/code-server">code-server</a> eingesetzt, welche bereits am Roboter vorinstalliert ist.</p>
<div class="section" id="verbindung-zur-entwicklungsumgebung-herstellen">
<h2>Verbindung zur Entwicklungsumgebung herstellen<a class="headerlink" href="#verbindung-zur-entwicklungsumgebung-herstellen" title="Permalink to this heading"></a></h2>
<h2>Verbindung zur Entwicklungsumgebung herstellen<a class="headerlink" href="#verbindung-zur-entwicklungsumgebung-herstellen" title="Link zu dieser Überschrift"></a></h2>
<p>Am Roboter wird die IP-Adresse des Raspberry Pi angezeigt. Um nun die Verbindung herzustellen, muss man in einem Web-Browser einfach <code class="docutils literal notranslate"><span class="pre">&lt;roboter_ip&gt;:8080</span></code> eingeben.
Das Passwort für Visual Studio Code im Browser ist <code class="docutils literal notranslate"><span class="pre">compair</span></code>!</p>
</div>
@ -184,58 +92,33 @@ Das Passwort für Visual Studio Code im Browser ist <code class="docutils litera
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="firstProgram.html" class="btn btn-neutral float-right" title="Mein erstes Programm" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
<a href="wifi.html" class="btn btn-neutral float-left" title="WLAN-Verbindung herstellen" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="wifi.html" class="btn btn-neutral float-left" title="WLAN-Verbindung herstellen" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Zurück</a>
<a href="firstProgram.html" class="btn btn-neutral float-right" title="Mein erstes Programm" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
</p>
<p>&#169; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS).</p>
</div>
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
Erstellt mit <a href="https://www.sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,73 +1,32 @@
<!DOCTYPE html>
<html class="writer-html5" lang="de" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mein erstes Programm &mdash; CompLib 0.2.3 Dokumentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Mein erstes Programm &mdash; CompLib 0.2.3 Dokumentation</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 data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script 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/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Stichwortverzeichnis" href="../genindex.html" />
<link rel="search" title="Suche" href="../search.html" />
<link rel="next" title="Software Updaten" href="update.html" />
<link rel="prev" title="Programmierumgebung" href="codeServer.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">
<img src="../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
<a href="../index.html"><img src="../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
@ -75,18 +34,7 @@
<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">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Erste Schritte</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="wifi.html">WLAN-Verbindung herstellen</a></li>
@ -104,73 +52,33 @@
<li class="toctree-l1"><a class="reference internal" href="../other/hardware.html">Hardware</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">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<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">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="index.html">Erste Schritte</a> &raquo;</li>
<li>Mein erstes Programm</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/gettingStarted/firstProgram.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="mein-erstes-programm">
<h1>Mein erstes Programm<a class="headerlink" href="#mein-erstes-programm" title="Permalink to this heading"></a></h1>
<h1>Mein erstes Programm<a class="headerlink" href="#mein-erstes-programm" title="Link zu dieser Überschrift"></a></h1>
<p>Um mit der Programmierung zu beginnen, müssen wir zunächst einen neuen Ordner erstellen, in dem alle unsere Python-Dateien gespeichert werden.
<img alt="codeServerFolder" src="../_images/06_codeServerFolder.png" /></p>
<p>Sie können diesen Ordner nennen, wie Sie wollen, für dieses Beispiel heißt er <code class="docutils literal notranslate"><span class="pre">compAIR</span></code>.
@ -188,58 +96,33 @@ Im nächsten Schritt erstellen wir unsere Datei <code class="docutils literal no
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="update.html" class="btn btn-neutral float-right" title="Software Updaten" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
<a href="codeServer.html" class="btn btn-neutral float-left" title="Programmierumgebung" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="codeServer.html" class="btn btn-neutral float-left" title="Programmierumgebung" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Zurück</a>
<a href="update.html" class="btn btn-neutral float-right" title="Software Updaten" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
</p>
<p>&#169; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS).</p>
</div>
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
Erstellt mit <a href="https://www.sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,73 +1,32 @@
<!DOCTYPE html>
<html class="writer-html5" lang="de" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Erste Schritte &mdash; CompLib 0.2.3 Dokumentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Erste Schritte &mdash; CompLib 0.2.3 Dokumentation</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 data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script 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/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Stichwortverzeichnis" href="../genindex.html" />
<link rel="search" title="Suche" href="../search.html" />
<link rel="next" title="WLAN-Verbindung herstellen" href="wifi.html" />
<link rel="prev" title="Dokumentation des Roboters" 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">
<img src="../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
<a href="../index.html"><img src="../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
@ -75,18 +34,7 @@
<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">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Erste Schritte</a><ul>
<li class="toctree-l2"><a class="reference internal" href="wifi.html">WLAN-Verbindung herstellen</a></li>
@ -104,71 +52,32 @@
<li class="toctree-l1"><a class="reference internal" href="../other/hardware.html">Hardware</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">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<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">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Erste Schritte</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/gettingStarted/index.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="erste-schritte">
<h1>Erste Schritte<a class="headerlink" href="#erste-schritte" title="Permalink to this heading"></a></h1>
<h1>Erste Schritte<a class="headerlink" href="#erste-schritte" title="Link zu dieser Überschrift"></a></h1>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="wifi.html">WLAN-Verbindung herstellen</a><ul>
@ -199,58 +108,33 @@
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="wifi.html" class="btn btn-neutral float-right" title="WLAN-Verbindung herstellen" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
<a href="../index.html" class="btn btn-neutral float-left" title="Dokumentation des Roboters" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="../index.html" class="btn btn-neutral float-left" title="Dokumentation des Roboters" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Zurück</a>
<a href="wifi.html" class="btn btn-neutral float-right" title="WLAN-Verbindung herstellen" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
</p>
<p>&#169; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS).</p>
</div>
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
Erstellt mit <a href="https://www.sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,73 +1,32 @@
<!DOCTYPE html>
<html class="writer-html5" lang="de" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mein zweites Programm &mdash; CompLib 0.2.3 Dokumentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Mein zweites Programm &mdash; CompLib 0.2.3 Dokumentation</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 data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script 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/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Stichwortverzeichnis" href="../genindex.html" />
<link rel="search" title="Suche" href="../search.html" />
<link rel="next" title="Mein drittes Programm" href="thridProgram.html" />
<link rel="prev" title="Software Updaten" href="update.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">
<img src="../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
<a href="../index.html"><img src="../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
@ -75,18 +34,7 @@
<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">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Erste Schritte</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="wifi.html">WLAN-Verbindung herstellen</a></li>
@ -111,101 +59,72 @@
<li class="toctree-l1"><a class="reference internal" href="../other/hardware.html">Hardware</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">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<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">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="index.html">Erste Schritte</a> &raquo;</li>
<li>Mein zweites Programm</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/gettingStarted/secondProgram.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="mein-zweites-programm">
<h1>Mein zweites Programm<a class="headerlink" href="#mein-zweites-programm" title="Permalink to this heading"></a></h1>
<h1>Mein zweites Programm<a class="headerlink" href="#mein-zweites-programm" title="Link zu dieser Überschrift"></a></h1>
<div class="section" id="motoren-ansteuern">
<h2>Motoren ansteuern<a class="headerlink" href="#motoren-ansteuern" title="Permalink to this heading"></a></h2>
<h2>Motoren ansteuern<a class="headerlink" href="#motoren-ansteuern" title="Link zu dieser Überschrift"></a></h2>
<p>Um die Motoren des Roboters zu steuern, müssen wir zunächst das entsprechende Python-Modul am Anfang der Datei importieren. Dann können wir Motor.power(port, power) verwenden, um den Motor zu steuern.
Dies ist auch ein guter Punkt, um sich mit der Dokumentation vertraut zu machen: Besuchen wir <a class="reference external" href="https://lib.comp-air.at/lib/Motor.html#compLib.Motor.Motor.power">https://lib.comp-air.at/lib/Motor.html#compLib.Motor.Motor.power</a>. Hier werden die beiden relevanten Parameter beschrieben.</p>
<p>Als Beispiel wollen wir den rechten Motor für fünf Sekunden auf volle Geschwindigkeit setzen:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos">1</span><span class="c1"># motor.py</span>
<span class="linenos">2</span><span class="kn">import</span> <span class="nn">time</span>
<span class="linenos">3</span><span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
<span class="linenos">4</span>
<span class="linenos">5</span><span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
<span class="linenos">6</span><span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">5</span><span class="p">)</span>
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5
6</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="c1"># motor.py</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="n">Motor</span>
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">100</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">5</span><span class="p">)</span>
</pre></div>
</div>
</td></tr></table></div>
</div>
<div class="section" id="gerade-fahren">
<h2>Gerade fahren<a class="headerlink" href="#gerade-fahren" title="Permalink to this heading"></a></h2>
<h2>Gerade fahren<a class="headerlink" href="#gerade-fahren" title="Link zu dieser Überschrift"></a></h2>
<p>Um geradeaus zu fahren, müssen wir beide Motoren auf dieselbe Geschwindigkeit einstellen.
Aber Achtung! Der rechte Motor muss umgedreht werden! Das liegt daran, dass einer nach rechts und einer nach links zeigt, sie sind also technisch gesehen gespiegelt.
Wenn wir nun diesen Code ausführen, wird der Roboter 5 Sekunden lang vorwärts fahren:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos">1</span><span class="c1"># motor.py</span>
<span class="linenos">2</span><span class="kn">import</span> <span class="nn">time</span>
<span class="linenos">3</span><span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
<span class="linenos">4</span>
<span class="linenos">5</span><span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
<span class="linenos">6</span><span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
<span class="linenos">7</span><span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">5</span><span class="p">)</span>
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5
6
7</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="c1"># motor.py</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="n">Motor</span>
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</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">3</span><span class="p">,</span> <span class="mi">100</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">5</span><span class="p">)</span>
</pre></div>
</div>
</td></tr></table></div>
<p><strong>Erläuterung</strong></p>
<div class="line-block">
<div class="line">In <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">2</span></code> wird das python-Paket <code class="docutils literal notranslate"><span class="pre">time</span></code> importiert. Wir brauchen es später, um auf die Fahrt des Roboters zu warten. Z.B.: <code class="docutils literal notranslate"><span class="pre">time.sleep(5)</span></code></div>
@ -216,73 +135,119 @@ Wenn wir nun diesen Code ausführen, wird der Roboter 5 Sekunden lang vorwärts
</div>
<p>Danach wird das Programm beendet und der Roboter bleibt stehen.</p>
<div class="section" id="mehr-fahren">
<h3>Mehr fahren<a class="headerlink" href="#mehr-fahren" title="Permalink to this heading"></a></h3>
<h3>Mehr fahren<a class="headerlink" href="#mehr-fahren" title="Link zu dieser Überschrift"></a></h3>
<p>Jetzt ist es Zeit für einige komplexere Bewegungen. Um unseren Code modular und leicht lesbar zu halten, werden wir jede Aktion in eine eigene Funktion packen.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos">1</span><span class="kn">import</span> <span class="nn">time</span>
<span class="linenos">2</span><span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
<span class="linenos">3</span>
<span class="linenos">4</span><span class="k">def</span> <span class="nf">driveForward</span><span class="p">():</span>
<span class="linenos">5</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
<span class="linenos">6</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
<span class="linenos">7</span> <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5
6
7</pre></div></td><td class="code"><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="n">Motor</span>
<span class="k">def</span> <span class="nf">driveForward</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">0</span><span class="p">,</span> <span class="o">-</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">3</span><span class="p">,</span> <span class="mi">100</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">2</span><span class="p">)</span>
</pre></div>
</div>
</td></tr></table></div>
<p>In <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">4</span></code> definieren wir die Funktion <code class="docutils literal notranslate"><span class="pre">driveForward()</span></code>, die den Roboter mit voller Geschwindigkeit zwei Sekunden vorwärts bewegt.</p>
<p>Jetzt werden wir eine Funktion für das Rückwärtsfahren definieren:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos"> 1</span><span class="kn">import</span> <span class="nn">time</span>
<span class="linenos"> 2</span><span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
<span class="linenos"> 3</span>
<span class="linenos"> 4</span><span class="k">def</span> <span class="nf">driveForward</span><span class="p">():</span>
<span class="linenos"> 5</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
<span class="linenos"> 6</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
<span class="linenos"> 7</span> <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="linenos"> 8</span>
<span class="linenos"> 9</span><span class="k">def</span> <span class="nf">driveBackward</span><span class="p">():</span>
<span class="linenos">10</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
<span class="linenos">11</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
<span class="linenos">12</span> <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
2
3
4
5
6
7
8
9
10
11
12</pre></div></td><td class="code"><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="n">Motor</span>
<span class="k">def</span> <span class="nf">driveForward</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">0</span><span class="p">,</span> <span class="o">-</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">3</span><span class="p">,</span> <span class="mi">100</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">2</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">driveBackward</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">0</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">3</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</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">2</span><span class="p">)</span>
</pre></div>
</div>
</td></tr></table></div>
<p>In <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">9</span></code> haben wir die Funktion <code class="docutils literal notranslate"><span class="pre">driveBackward()</span></code> definiert, die den Roboter zwei Sekunden lang rückwärts fahren lässt.</p>
<p>Jetzt können wir diese beiden Funktionen aufrufen und vorwärts und dann wieder rückwärts fahren:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos"> 1</span><span class="kn">import</span> <span class="nn">time</span>
<span class="linenos"> 2</span><span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
<span class="linenos"> 3</span>
<span class="linenos"> 4</span><span class="k">def</span> <span class="nf">driveForward</span><span class="p">():</span>
<span class="linenos"> 5</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
<span class="linenos"> 6</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
<span class="linenos"> 7</span> <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="linenos"> 8</span>
<span class="linenos"> 9</span><span class="k">def</span> <span class="nf">driveBackward</span><span class="p">():</span>
<span class="linenos">10</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
<span class="linenos">11</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
<span class="linenos">12</span> <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="linenos">13</span>
<span class="linenos">14</span><span class="n">driveForward</span><span class="p">()</span>
<span class="linenos">15</span><span class="n">driveBackward</span><span class="p">()</span>
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15</pre></div></td><td class="code"><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="n">Motor</span>
<span class="k">def</span> <span class="nf">driveForward</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">0</span><span class="p">,</span> <span class="o">-</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">3</span><span class="p">,</span> <span class="mi">100</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">2</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">driveBackward</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">0</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">3</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</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">2</span><span class="p">)</span>
<span class="n">driveForward</span><span class="p">()</span>
<span class="n">driveBackward</span><span class="p">()</span>
</pre></div>
</div>
</td></tr></table></div>
<p>Wenn wir diesen Code ausführen, sollte der Roboter zunächst zwei Sekunden vorwärts und dann wieder zwei Sekunden rückwärts fahren und ungefähr an der gleichen Position wie beim Start anhalten.</p>
<p>Zwischen den Zeilen <code class="docutils literal notranslate"><span class="pre">14</span></code> und <code class="docutils literal notranslate"><span class="pre">15</span></code> brauchen wir kein <code class="docutils literal notranslate"><span class="pre">time.sleep(2)</span></code>, da der sleep-Befehl bereits in den Funktionen integriert ist.</p>
<p>Jetzt wollen wir, dass der Roboter erst vorwärts fährt, dann zwei Sekunden stillsteht und dann wieder rückwärts in seine Ausgangsposition fährt.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos"> 1</span><span class="kn">import</span> <span class="nn">time</span>
<span class="linenos"> 2</span><span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
<span class="linenos"> 3</span>
<span class="linenos"> 4</span><span class="k">def</span> <span class="nf">driveForward</span><span class="p">():</span>
<span class="linenos"> 5</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
<span class="linenos"> 6</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
<span class="linenos"> 7</span> <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="linenos"> 8</span>
<span class="linenos"> 9</span><span class="k">def</span> <span class="nf">driveBackward</span><span class="p">():</span>
<span class="linenos">10</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
<span class="linenos">11</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
<span class="linenos">12</span> <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="linenos">13</span>
<span class="linenos">14</span><span class="n">driveForward</span><span class="p">()</span>
<span class="linenos">15</span><span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="linenos">16</span><span class="n">driveBackward</span><span class="p">()</span>
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16</pre></div></td><td class="code"><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="n">Motor</span>
<span class="k">def</span> <span class="nf">driveForward</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">0</span><span class="p">,</span> <span class="o">-</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">3</span><span class="p">,</span> <span class="mi">100</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">2</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">driveBackward</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">0</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">3</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</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">2</span><span class="p">)</span>
<span class="n">driveForward</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">2</span><span class="p">)</span>
<span class="n">driveBackward</span><span class="p">()</span>
</pre></div>
</div>
</td></tr></table></div>
<p>Wenn wir den obigen Code ausführen, bleibt der Roboter nicht zwei Sekunden lang stehen, sondern fährt nach der Funktion <code class="docutils literal notranslate"><span class="pre">driveForward()</span></code> noch zwei Sekunden lang weiter. Warum passiert das? Um das zu verstehen, müssen wir wie der Roboter denken!</p>
<p><strong>Erläuterung</strong></p>
<div class="line-block">
@ -308,94 +273,155 @@ Wenn wir nun diesen Code ausführen, wird der Roboter 5 Sekunden lang vorwärts
<div class="line">4. Das Programm ist beendet, und alle Motordrehzahlen werden auf 0 gesetzt.</div>
</div>
<p>Wir sehen also, dass wir die Motoren nach der Vorwärts- oder Rückwärtsfunktion wieder auf Geschwindigkeit <code class="docutils literal notranslate"><span class="pre">0</span></code> setzen müssen, wenn wir den Roboter anhalten wollen. Für diesen Anwendungsfall können wir eine neue Funktion <code class="docutils literal notranslate"><span class="pre">stopMotors()</span></code> schreiben, die die Geschwindigkeit für Motor <code class="docutils literal notranslate"><span class="pre">0</span></code> und <code class="docutils literal notranslate"><span class="pre">3</span></code> auf <code class="docutils literal notranslate"><span class="pre">0</span></code> setzt:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos"> 1</span><span class="kn">import</span> <span class="nn">time</span>
<span class="linenos"> 2</span><span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
<span class="linenos"> 3</span>
<span class="linenos"> 4</span><span class="k">def</span> <span class="nf">driveForward</span><span class="p">():</span>
<span class="linenos"> 5</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
<span class="linenos"> 6</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
<span class="linenos"> 7</span> <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="linenos"> 8</span>
<span class="linenos"> 9</span><span class="k">def</span> <span class="nf">driveBackward</span><span class="p">():</span>
<span class="linenos">10</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
<span class="linenos">11</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
<span class="linenos">12</span> <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="linenos">13</span>
<span class="linenos">14</span><span class="k">def</span> <span class="nf">stopMotors</span><span class="p">():</span>
<span class="linenos">15</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="linenos">16</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16</pre></div></td><td class="code"><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="n">Motor</span>
<span class="k">def</span> <span class="nf">driveForward</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">0</span><span class="p">,</span> <span class="o">-</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">3</span><span class="p">,</span> <span class="mi">100</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">2</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">driveBackward</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">0</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">3</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</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">2</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">stopMotors</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">0</span><span class="p">,</span> <span class="mi">0</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">3</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
</pre></div>
</div>
</td></tr></table></div>
<p>Wenn wir nun vorwärts fahren, dann zwei Sekunden warten und dann wieder rückwärts fahren wollen, können wir die Funktionen wie folgt aufrufen:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos"> 1</span><span class="kn">import</span> <span class="nn">time</span>
<span class="linenos"> 2</span><span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
<span class="linenos"> 3</span>
<span class="linenos"> 4</span><span class="k">def</span> <span class="nf">driveForward</span><span class="p">():</span>
<span class="linenos"> 5</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
<span class="linenos"> 6</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
<span class="linenos"> 7</span> <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="linenos"> 8</span>
<span class="linenos"> 9</span><span class="k">def</span> <span class="nf">driveBackward</span><span class="p">():</span>
<span class="linenos">10</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
<span class="linenos">11</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
<span class="linenos">12</span> <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="linenos">13</span>
<span class="linenos">14</span><span class="k">def</span> <span class="nf">stopMotors</span><span class="p">():</span>
<span class="linenos">15</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="linenos">16</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="linenos">17</span>
<span class="linenos">18</span><span class="n">driveForward</span><span class="p">()</span>
<span class="linenos">19</span><span class="n">stopMotors</span><span class="p">()</span>
<span class="linenos">20</span><span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="linenos">21</span><span class="n">driveBackward</span><span class="p">()</span>
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21</pre></div></td><td class="code"><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="n">Motor</span>
<span class="k">def</span> <span class="nf">driveForward</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">0</span><span class="p">,</span> <span class="o">-</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">3</span><span class="p">,</span> <span class="mi">100</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">2</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">driveBackward</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">0</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">3</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</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">2</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">stopMotors</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">0</span><span class="p">,</span> <span class="mi">0</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">3</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="n">driveForward</span><span class="p">()</span>
<span class="n">stopMotors</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">2</span><span class="p">)</span>
<span class="n">driveBackward</span><span class="p">()</span>
</pre></div>
</div>
</td></tr></table></div>
<p>Und endlich bekommen wir die Bewegung, die wir uns wünschen.</p>
<p><strong>More Optimizations</strong></p>
<p>Während der Code für sehr einfache Bewegungen funktioniert, wollen wir normalerweise nicht, dass unsere Funktionen entscheiden, wie lange wir vorwärts fahren. Vielleicht müssen wir manchmal vier Sekunden vorwärts fahren, und manchmal nur eine Sekunde.</p>
<p>Nehmen wir an, wir wollen vier Sekunden vorwärts fahren. Wir wissen, dass <code class="docutils literal notranslate"><span class="pre">driveForward()</span></code> den Roboter zwei Sekunden vorwärts bewegen wird. Also können wir die Funktion einfach zwei Mal aufrufen!</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos"> 1</span><span class="kn">import</span> <span class="nn">time</span>
<span class="linenos"> 2</span><span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
<span class="linenos"> 3</span>
<span class="linenos"> 4</span><span class="k">def</span> <span class="nf">driveForward</span><span class="p">():</span>
<span class="linenos"> 5</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
<span class="linenos"> 6</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
<span class="linenos"> 7</span> <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="linenos"> 8</span>
<span class="linenos"> 9</span><span class="n">driveForward</span><span class="p">()</span>
<span class="linenos">10</span><span class="n">driveForward</span><span class="p">()</span>
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
2
3
4
5
6
7
8
9
10</pre></div></td><td class="code"><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="n">Motor</span>
<span class="k">def</span> <span class="nf">driveForward</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">0</span><span class="p">,</span> <span class="o">-</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">3</span><span class="p">,</span> <span class="mi">100</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">2</span><span class="p">)</span>
<span class="n">driveForward</span><span class="p">()</span>
<span class="n">driveForward</span><span class="p">()</span>
</pre></div>
</div>
</td></tr></table></div>
<p>Was aber, wenn wir uns nur eine Sekunde vorwärts bewegen wollen? Oder vielleicht drei Sekunden? Mit der Funktion <code class="docutils literal notranslate"><span class="pre">driveForward()</span></code> können wir das im Moment nicht machen.</p>
<p>Stattdessen werden wir die Funktion so umschreiben, dass sie einen Parameter akzeptiert, der die Zeit angibt.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos">1</span><span class="kn">import</span> <span class="nn">time</span>
<span class="linenos">2</span><span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
<span class="linenos">3</span>
<span class="linenos">4</span><span class="k">def</span> <span class="nf">driveForward</span><span class="p">(</span><span class="n">seconds</span><span class="p">):</span>
<span class="linenos">5</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
<span class="linenos">6</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
<span class="linenos">7</span> <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="n">seconds</span><span class="p">)</span>
<span class="linenos">8</span>
<span class="linenos">9</span><span class="n">driveForward</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span>
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5
6
7
8
9</pre></div></td><td class="code"><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="n">Motor</span>
<span class="k">def</span> <span class="nf">driveForward</span><span class="p">(</span><span class="n">seconds</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">0</span><span class="p">,</span> <span class="o">-</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">3</span><span class="p">,</span> <span class="mi">100</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="n">seconds</span><span class="p">)</span>
<span class="n">driveForward</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span>
</pre></div>
</div>
</td></tr></table></div>
<p>Und mit dieser neuen Funktion können wir drei Sekunden lang vorwärts fahren.
Wie funktioniert das nun?</p>
<p>In <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">4</span></code> definieren wir die Funktion <code class="docutils literal notranslate"><span class="pre">driveForward</span></code> und sagen, dass sie einen Parameter <code class="docutils literal notranslate"><span class="pre">seconds</span></code> benötigt. Dieser Parameter ist im Grunde eine Variable, die wir uns zum Zeitpunkt der Definition wie einen Platzhalter vorstellen können. Wenn wir die Funktion definieren, wissen wir noch nicht, welchen Wert <code class="docutils literal notranslate"><span class="pre">seconds</span></code> haben wird.</p>
<p>Später in <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">9</span></code>, wenn wir die Funktion aufrufen, übergeben wir den Wert <code class="docutils literal notranslate"><span class="pre">3</span></code> an die Funktion und unser Platzhalter <code class="docutils literal notranslate"><span class="pre">seconds</span></code> wird den Wert <code class="docutils literal notranslate"><span class="pre">3</span></code> haben. Der Roboter wird also drei Sekunden vorwärts fahren.</p>
<p>Vielleicht wollen wir auch, dass der Roboter mit verschiedenen Geschwindigkeiten fahren kann. Wir können also einen weiteren Parameter mit dem Namen <code class="docutils literal notranslate"><span class="pre">speed</span></code> anlegen. Dann werden wir ein Programm schreiben, das den Roboter drei Sekunden mit voller Geschwindigkeit und dann fünf Sekunden mit halber Geschwindigkeit fahren lässt.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos"> 1</span><span class="kn">import</span> <span class="nn">time</span>
<span class="linenos"> 2</span><span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
<span class="linenos"> 3</span>
<span class="linenos"> 4</span><span class="k">def</span> <span class="nf">driveForward</span><span class="p">(</span><span class="n">seconds</span><span class="p">,</span> <span class="n">speed</span><span class="p">):</span>
<span class="linenos"> 5</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="n">speed</span><span class="p">)</span>
<span class="linenos"> 6</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="n">speed</span><span class="p">)</span>
<span class="linenos"> 7</span> <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="n">seconds</span><span class="p">)</span>
<span class="linenos"> 8</span>
<span class="linenos"> 9</span><span class="n">driveForward</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
<span class="linenos">10</span><span class="n">driveForward</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="mi">50</span><span class="p">)</span>
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
2
3
4
5
6
7
8
9
10</pre></div></td><td class="code"><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="n">Motor</span>
<span class="k">def</span> <span class="nf">driveForward</span><span class="p">(</span><span class="n">seconds</span><span class="p">,</span> <span class="n">speed</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">0</span><span class="p">,</span> <span class="o">-</span><span class="n">speed</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">3</span><span class="p">,</span> <span class="n">speed</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="n">seconds</span><span class="p">)</span>
<span class="n">driveForward</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
<span class="n">driveForward</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="mi">50</span><span class="p">)</span>
</pre></div>
</div>
</td></tr></table></div>
<p>In <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">9</span></code> wird der Platzhalter <code class="docutils literal notranslate"><span class="pre">seconds</span></code> auf <code class="docutils literal notranslate"><span class="pre">3</span></code> und die <code class="docutils literal notranslate"><span class="pre">Geschwindigkeit</span></code> auf <code class="docutils literal notranslate"><span class="pre">100</span></code> gesetzt.
In <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">10</span></code> wird der Platzhalter <code class="docutils literal notranslate"><span class="pre">seconds</span></code> auf <code class="docutils literal notranslate"><span class="pre">5</span></code> und die <code class="docutils literal notranslate"><span class="pre">Geschwindigkeit</span></code> auf <code class="docutils literal notranslate"><span class="pre">50</span></code> gesetzt.</p>
<p><strong>Bewährte Praktiken</strong>
@ -403,32 +429,55 @@ Nun werden wir uns einige weitere Optimierungen und bewährte Verfahren ansehen.
<p><strong>1. Wir sollten den Schlafbefehl nicht in die Fahrfunktion einbauen.</strong></p>
<p>Wir haben das bis jetzt getan, um ein Gefühl dafür zu bekommen, wie Funktionen funktionieren, und der Einfachheit halber. Später, wenn Sie anfangen, komplexere Programme zu schreiben, sollten Sie dies vermeiden.</p>
<p>Das Beispiel von oben, in dem wir vorwärts und rückwärts gefahren sind und zwei Sekunden gewartet haben, sollte also wie folgt aussehen:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos"> 1</span><span class="kn">import</span> <span class="nn">time</span>
<span class="linenos"> 2</span><span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
<span class="linenos"> 3</span>
<span class="linenos"> 4</span><span class="k">def</span> <span class="nf">driveForward</span><span class="p">(</span><span class="n">speed</span><span class="p">):</span>
<span class="linenos"> 5</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="n">speed</span><span class="p">)</span>
<span class="linenos"> 6</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="n">speed</span><span class="p">)</span>
<span class="linenos"> 7</span>
<span class="linenos"> 8</span><span class="k">def</span> <span class="nf">driveBackward</span><span class="p">(</span><span class="n">speed</span><span class="p">):</span>
<span class="linenos"> 9</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">speed</span><span class="p">)</span>
<span class="linenos">10</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="o">-</span><span class="n">speed</span><span class="p">)</span>
<span class="linenos">11</span>
<span class="linenos">12</span><span class="k">def</span> <span class="nf">stopMotors</span><span class="p">():</span>
<span class="linenos">13</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="linenos">14</span> <span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="linenos">15</span>
<span class="linenos">16</span><span class="n">driveForward</span><span class="p">(</span><span class="mi">100</span><span class="p">)</span> <span class="c1"># Set the motors to forward</span>
<span class="linenos">17</span><span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> <span class="c1"># Let the robot drive for 2 seconds</span>
<span class="linenos">18</span><span class="n">stopMotors</span><span class="p">()</span> <span class="c1"># Now stop the robot</span>
<span class="linenos">19</span>
<span class="linenos">20</span><span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> <span class="c1"># Wait another 2 seconds, robot is not moving</span>
<span class="linenos">21</span>
<span class="linenos">22</span><span class="n">driveBackward</span><span class="p">(</span><span class="mi">100</span><span class="p">)</span> <span class="c1"># Now set the motors to a backwards speed</span>
<span class="linenos">23</span><span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> <span class="c1"># Let the robot continue driving for 2 seconds</span>
<span class="linenos">24</span><span class="n">stopMotors</span><span class="p">()</span> <span class="c1"># And finally stop it again</span>
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24</pre></div></td><td class="code"><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="n">Motor</span>
<span class="k">def</span> <span class="nf">driveForward</span><span class="p">(</span><span class="n">speed</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">0</span><span class="p">,</span> <span class="o">-</span><span class="n">speed</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">3</span><span class="p">,</span> <span class="n">speed</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">driveBackward</span><span class="p">(</span><span class="n">speed</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">0</span><span class="p">,</span> <span class="n">speed</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">3</span><span class="p">,</span> <span class="o">-</span><span class="n">speed</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">stopMotors</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">0</span><span class="p">,</span> <span class="mi">0</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">3</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="n">driveForward</span><span class="p">(</span><span class="mi">100</span><span class="p">)</span> <span class="c1"># Set the motors to forward</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> <span class="c1"># Let the robot drive for 2 seconds</span>
<span class="n">stopMotors</span><span class="p">()</span> <span class="c1"># Now stop the robot</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> <span class="c1"># Wait another 2 seconds, robot is not moving</span>
<span class="n">driveBackward</span><span class="p">(</span><span class="mi">100</span><span class="p">)</span> <span class="c1"># Now set the motors to a backwards speed</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> <span class="c1"># Let the robot continue driving for 2 seconds</span>
<span class="n">stopMotors</span><span class="p">()</span> <span class="c1"># And finally stop it again</span>
</pre></div>
</div>
</td></tr></table></div>
<p><strong>Warum ist das so wichtig?</strong></p>
<p>Normalerweise schlafen wir nicht sehr viel und führen in dieser Zeit andere Verarbeitungen durch. Zum Beispiel könnten wir ein Bild von der Kamera verarbeiten oder die IR-Sensoren auslesen. Wenn wir also eine Funktion wie <code class="docutils literal notranslate"><span class="pre">driveForward()</span></code> aufrufen, können wir davon ausgehen, dass sie im Hintergrund abläuft und wir andere Aufgaben erledigen, während sich der Roboter bewegt, anstatt nur darauf zu warten, dass er fertig wird.</p>
<p><strong>2. Fahren Sie nicht zu langsam.</strong></p>
@ -441,58 +490,33 @@ Nun werden wir uns einige weitere Optimierungen und bewährte Verfahren ansehen.
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="thridProgram.html" class="btn btn-neutral float-right" title="Mein drittes Programm" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
<a href="update.html" class="btn btn-neutral float-left" title="Software Updaten" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="update.html" class="btn btn-neutral float-left" title="Software Updaten" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Zurück</a>
<a href="thridProgram.html" class="btn btn-neutral float-right" title="Mein drittes Programm" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
</p>
<p>&#169; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS).</p>
</div>
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
Erstellt mit <a href="https://www.sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,73 +1,32 @@
<!DOCTYPE html>
<html class="writer-html5" lang="de" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mein drittes Programm &mdash; CompLib 0.2.3 Dokumentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Mein drittes Programm &mdash; CompLib 0.2.3 Dokumentation</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 data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script 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/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Stichwortverzeichnis" href="../genindex.html" />
<link rel="search" title="Suche" href="../search.html" />
<link rel="next" title="Installationsanweisungen" href="../software/installation.html" />
<link rel="prev" title="Mein zweites Programm" href="secondProgram.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">
<img src="../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
<a href="../index.html"><img src="../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
@ -75,18 +34,7 @@
<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">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Erste Schritte</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="wifi.html">WLAN-Verbindung herstellen</a></li>
@ -104,111 +52,88 @@
<li class="toctree-l1"><a class="reference internal" href="../other/hardware.html">Hardware</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">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<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">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="index.html">Erste Schritte</a> &raquo;</li>
<li>Mein drittes Programm</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/gettingStarted/thridProgram.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="mein-drittes-programm">
<h1>Mein drittes Programm<a class="headerlink" href="#mein-drittes-programm" title="Permalink to this heading"></a></h1>
<h1>Mein drittes Programm<a class="headerlink" href="#mein-drittes-programm" title="Link zu dieser Überschrift"></a></h1>
<p>Der offizielle compAIR-Bot ist mit einer Reihe von Sensoren ausgestattet. Die wichtigsten sind die Infrarotsensoren und -sender, die an der Vorderseite des Roboters angebracht sind. Insgesamt gibt es fünf IR-Sensoren.</p>
<p>Um loszulegen, muss man zunächst das entsprechende Modul wie folgt importieren:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos">1</span><span class="kn">from</span> <span class="nn">compLib.IRSensor</span> <span class="kn">import</span> <span class="n">IRSensor</span>
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><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>
</pre></div>
</div>
</td></tr></table></div>
<p><img alt="irSensor" src="../_images/07_irSensor.webp" /></p>
<p>Wie im obigen Diagramm zu sehen ist, verfügt jeder Sensor auch über einen entsprechenden IR-Sender / Emitter. Dieser Sender kann mit <code class="docutils literal notranslate"><span class="pre">IRSensor.set(port,</span> <span class="pre">enable)</span></code> aktiviert werden.</p>
<p>Schalten wir nun alle fünf Sender ein:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos">1</span><span class="kn">from</span> <span class="nn">compLib.IRSensor</span> <span class="kn">import</span> <span class="n">IRSensor</span>
<span class="linenos">2</span>
<span class="linenos">3</span><span class="n">IRSensor</span><span class="o">.</span><span class="n">enable</span><span class="p">()</span>
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3</pre></div></td><td class="code"><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="n">IRSensor</span><span class="o">.</span><span class="n">enable</span><span class="p">()</span>
</pre></div>
</div>
</td></tr></table></div>
<p>Diese fünf verschiedenen Sensoren befinden sich an der Vorderseite des Roboters und sind wichtig, um schwarze Linien zu erkennen.</p>
<p>Es ist sehr einfach, den Wert der Sensoren abzulesen:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos">1</span><span class="kn">from</span> <span class="nn">compLib.IRSensor</span> <span class="kn">import</span> <span class="n">IRSensor</span>
<span class="linenos">2</span>
<span class="linenos">3</span><span class="n">IRSensor</span><span class="o">.</span><span class="n">enable</span><span class="p">()</span>
<span class="linenos">4</span>
<span class="linenos">5</span><span class="k">if</span> <span class="n">IRSensor</span><span class="o">.</span><span class="n">read_all</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span> <span class="o">&gt;</span> <span class="mi">500</span><span class="p">:</span>
<span class="linenos">6</span> <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;high&quot;</span><span class="p">)</span>
<span class="linenos">7</span><span class="k">else</span><span class="p">:</span>
<span class="linenos">8</span> <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;low&quot;</span><span class="p">)</span>
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5
6
7
8</pre></div></td><td class="code"><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="n">IRSensor</span><span class="o">.</span><span class="n">enable</span><span class="p">()</span>
<span class="k">if</span> <span class="n">IRSensor</span><span class="o">.</span><span class="n">read_all</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span> <span class="o">&gt;</span> <span class="mi">500</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;high&quot;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;low&quot;</span><span class="p">)</span>
</pre></div>
</div>
</td></tr></table></div>
<p><strong>Erkennen einer schwarzen Linie</strong>
Um den IR-Sensor zu testen, kannst du deinen Roboter auf eine schwarze Linie stellen. Der Sensor in der Mitte sollte auf der schwarzen Linie liegen.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos">1</span><span class="kn">from</span> <span class="nn">compLib.IRSensor</span> <span class="kn">import</span> <span class="n">IRSensor</span>
<span class="linenos">2</span>
<span class="linenos">3</span><span class="n">IRSensor</span><span class="o">.</span><span class="n">enable</span><span class="p">()</span>
<span class="linenos">4</span><span class="n">COLOR_BREAK</span> <span class="o">=</span> <span class="mi">900</span>
<span class="linenos">5</span>
<span class="linenos">6</span><span class="k">if</span> <span class="n">IRSensor</span><span class="o">.</span><span class="n">read_all</span><span class="p">()[</span><span class="mi">2</span><span class="p">]</span> <span class="o">&gt;</span> <span class="n">COLOR_BREAK</span><span class="p">:</span>
<span class="linenos">7</span> <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Robot is standing on a black line&quot;</span><span class="p">)</span>
<span class="linenos">8</span><span class="k">else</span><span class="p">:</span>
<span class="linenos">9</span><span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Robot is NOT standing on a black line&quot;</span><span class="p">)</span>
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5
6
7
8
9</pre></div></td><td class="code"><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="n">IRSensor</span><span class="o">.</span><span class="n">enable</span><span class="p">()</span>
<span class="n">COLOR_BREAK</span> <span class="o">=</span> <span class="mi">900</span>
<span class="k">if</span> <span class="n">IRSensor</span><span class="o">.</span><span class="n">read_all</span><span class="p">()[</span><span class="mi">2</span><span class="p">]</span> <span class="o">&gt;</span> <span class="n">COLOR_BREAK</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Robot is standing on a black line&quot;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Robot is NOT standing on a black line&quot;</span><span class="p">)</span>
</pre></div>
</div>
</td></tr></table></div>
<p>Wenn das Programm ausgeführt wird, zeigt es an, dass der Roboter auf einer schwarzen Linie steht, wenn sich der mittlere IR-Sensor des Roboters über einer schwarzen Linie befindet, und es zeigt an, dass der Roboter NICHT auf einer schwarzen Linie steht, wenn sich der mittlere IR-Sensor nicht über einer Linie befindet.</p>
<div class="line-block">
<div class="line">In <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">1</span></code> importieren wir das <code class="docutils literal notranslate"><span class="pre">IRSensor</span></code>-Modul, das zur Kommunikation mit dem IR-Sensor-Board verwendet werden kann.</div>
@ -223,58 +148,33 @@ Um den IR-Sensor zu testen, kannst du deinen Roboter auf eine schwarze Linie ste
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../software/installation.html" class="btn btn-neutral float-right" title="Installationsanweisungen" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
<a href="secondProgram.html" class="btn btn-neutral float-left" title="Mein zweites Programm" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="secondProgram.html" class="btn btn-neutral float-left" title="Mein zweites Programm" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Zurück</a>
<a href="../software/installation.html" class="btn btn-neutral float-right" title="Installationsanweisungen" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
</p>
<p>&#169; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS).</p>
</div>
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
Erstellt mit <a href="https://www.sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,73 +1,32 @@
<!DOCTYPE html>
<html class="writer-html5" lang="de" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Software Updaten &mdash; CompLib 0.2.3 Dokumentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Software Updaten &mdash; CompLib 0.2.3 Dokumentation</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 data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script 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/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Stichwortverzeichnis" href="../genindex.html" />
<link rel="search" title="Suche" href="../search.html" />
<link rel="next" title="Mein zweites Programm" href="secondProgram.html" />
<link rel="prev" title="Mein erstes Programm" href="firstProgram.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">
<img src="../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
<a href="../index.html"><img src="../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
@ -75,18 +34,7 @@
<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">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Erste Schritte</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="wifi.html">WLAN-Verbindung herstellen</a></li>
@ -104,73 +52,33 @@
<li class="toctree-l1"><a class="reference internal" href="../other/hardware.html">Hardware</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">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<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">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="index.html">Erste Schritte</a> &raquo;</li>
<li>Software Updaten</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/gettingStarted/update.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="software-updaten">
<h1>Software Updaten<a class="headerlink" href="#software-updaten" title="Permalink to this heading"></a></h1>
<h1>Software Updaten<a class="headerlink" href="#software-updaten" title="Link zu dieser Überschrift"></a></h1>
<p>Da wir die <code class="docutils literal notranslate"><span class="pre">compLib</span></code>, und die andere Software, welche auf dem Roboter läuft, laufend weiterentwickeln, solltet ihr immer wieder euren Roboter auf die neuste Version updaten. Dazu müsst ihr einfach den Roboter mit dem Internet verbinden und dann diesen Befehl in der Kommandozeile des Roboters eingeben:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo apt update <span class="o">&amp;&amp;</span> sudo apt upgrade
</pre></div>
@ -181,58 +89,33 @@
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="secondProgram.html" class="btn btn-neutral float-right" title="Mein zweites Programm" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
<a href="firstProgram.html" class="btn btn-neutral float-left" title="Mein erstes Programm" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="firstProgram.html" class="btn btn-neutral float-left" title="Mein erstes Programm" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Zurück</a>
<a href="secondProgram.html" class="btn btn-neutral float-right" title="Mein zweites Programm" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
</p>
<p>&#169; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS).</p>
</div>
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
Erstellt mit <a href="https://www.sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,73 +1,32 @@
<!DOCTYPE html>
<html class="writer-html5" lang="de" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WLAN-Verbindung herstellen &mdash; CompLib 0.2.3 Dokumentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>WLAN-Verbindung herstellen &mdash; CompLib 0.2.3 Dokumentation</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 data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script 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/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Stichwortverzeichnis" href="../genindex.html" />
<link rel="search" title="Suche" href="../search.html" />
<link rel="next" title="Programmierumgebung" href="codeServer.html" />
<link rel="prev" title="Erste Schritte" 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">
<img src="../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
<a href="../index.html"><img src="../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
@ -75,18 +34,7 @@
<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">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Erste Schritte</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#">WLAN-Verbindung herstellen</a><ul>
@ -110,75 +58,35 @@
<li class="toctree-l1"><a class="reference internal" href="../other/hardware.html">Hardware</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">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<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">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="index.html">Erste Schritte</a> &raquo;</li>
<li>WLAN-Verbindung herstellen</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/gettingStarted/wifi.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="wlan-verbindung-herstellen">
<span id="gettingstarted-wifi"></span><h1>WLAN-Verbindung herstellen<a class="headerlink" href="#wlan-verbindung-herstellen" title="Permalink to this heading"></a></h1>
<span id="gettingstarted-wifi"></span><h1>WLAN-Verbindung herstellen<a class="headerlink" href="#wlan-verbindung-herstellen" title="Link zu dieser Überschrift"></a></h1>
<div class="section" id="schritt-fur-schritt-macos">
<h2>Schritt für Schritt - macOS<a class="headerlink" href="#schritt-fur-schritt-macos" title="Permalink to this heading"></a></h2>
<h2>Schritt für Schritt - macOS<a class="headerlink" href="#schritt-fur-schritt-macos" title="Link zu dieser Überschrift"></a></h2>
<ol class="arabic">
<li><p>SD-Karte aus dem Raspberry Pi bzw. Roboter entnehmen.</p></li>
<li><p>Einstecken der SD-Karte in den Computer</p></li>
@ -203,22 +111,22 @@
</ol>
</div>
<div class="section" id="weitere-informationen">
<h2>Weitere Informationen<a class="headerlink" href="#weitere-informationen" title="Permalink to this heading"></a></h2>
<h2>Weitere Informationen<a class="headerlink" href="#weitere-informationen" title="Link zu dieser Überschrift"></a></h2>
<p>Die „wpa_supplicant.conf“ Datei wird beim Start des Rpasberry Pi automatisch an den richtigen Ort kopiert, damit sich der Roboter zum Wlan verbindet.
Eine genauere Anleitung wird vom Hersteller des Raspberry Pi <a class="reference external" href="https://www.raspberrypi.com/documentation/computers/configuration.html#configuring-networking-2">hier</a> bereitgestellt.</p>
</div>
<div class="section" id="windows">
<h2>Windows……<a class="headerlink" href="#windows" title="Permalink to this heading"></a></h2>
<h2>Windows……<a class="headerlink" href="#windows" title="Link zu dieser Überschrift"></a></h2>
<p>Je nach Betriebssystem und Editor, mit dem Sie die Datei erstellen, könnte die Datei falsche Zeilenumbrüche oder eine falsche Dateierweiterung haben; stellen Sie also sicher, dass Sie einen Editor verwenden, der dies berücksichtigt. Linux erwartet das Zeilenumbruchzeichen LF (Line Feed).
Beispielsweise kann <a class="reference external" href="https://notepad-plus-plus.org/downloads/">Notepad++</a> verwendet werden, um die Datei richtig zu speichern.
<img alt="notepadImage" src="../_images/08_notepad.png" /></p>
</div>
<div class="section" id="fehlerbehandlung">
<h2>Fehlerbehandlung<a class="headerlink" href="#fehlerbehandlung" title="Permalink to this heading"></a></h2>
<h2>Fehlerbehandlung<a class="headerlink" href="#fehlerbehandlung" title="Link zu dieser Überschrift"></a></h2>
<p>Sollte es dazu kommen, dass der Roboter nicht automatisch die Verbindung mit dem Netzwerk herstellt, kann eine Kabelgebundene Verbindung zur Diagnose von Fehlern genutzt werden.
Dabei wird automatisch die IP-Adresse der Verbindung „eth“ am Roboter angezeigt. Nach der erfolgreichen Verbindung zum Roboter mittels SSH kann die „wpa_cli“ zur Fehlerbehandlung verwendet werden:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">&gt;</span> <span class="n">wpa_cli</span>
<span class="n">wpa_cli</span> <span class="n">v2</span><span class="mf">.9</span>
<span class="n">wpa_cli</span> <span class="n">v2</span><span class="o">.</span><span class="mi">9</span>
<span class="n">Copyright</span> <span class="p">(</span><span class="n">c</span><span class="p">)</span> <span class="mi">2004</span><span class="o">-</span><span class="mi">2019</span><span class="p">,</span> <span class="n">Jouni</span> <span class="n">Malinen</span> <span class="o">&lt;</span><span class="n">j</span><span class="nd">@w1</span><span class="o">.</span><span class="n">fi</span><span class="o">&gt;</span> <span class="ow">and</span> <span class="n">contributors</span>
<span class="n">This</span> <span class="n">software</span> <span class="n">may</span> <span class="n">be</span> <span class="n">distributed</span> <span class="n">under</span> <span class="n">the</span> <span class="n">terms</span> <span class="n">of</span> <span class="n">the</span> <span class="n">BSD</span> <span class="n">license</span><span class="o">.</span>
@ -260,58 +168,33 @@ Dabei wird automatisch die IP-Adresse der Verbindung „eth“ am Roboter angeze
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="codeServer.html" class="btn btn-neutral float-right" title="Programmierumgebung" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
<a href="index.html" class="btn btn-neutral float-left" title="Erste Schritte" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="index.html" class="btn btn-neutral float-left" title="Erste Schritte" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Zurück</a>
<a href="codeServer.html" class="btn btn-neutral float-right" title="Programmierumgebung" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
</p>
<p>&#169; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS).</p>
</div>
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
Erstellt mit <a href="https://www.sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,72 +1,31 @@
<!DOCTYPE html>
<html class="writer-html5" lang="de" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dokumentation des Roboters &mdash; CompLib 0.2.3 Dokumentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Dokumentation des Roboters &mdash; CompLib 0.2.3 Dokumentation</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 data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script 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/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/translations.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Stichwortverzeichnis" href="genindex.html" />
<link rel="search" title="Suche" href="search.html" />
<link rel="next" title="Erste Schritte" href="gettingStarted/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="#">
<img src="_static/compair-logo-white.svg" class="logo" alt="Logo"/>
<a href="#"><img src="_static/compair-logo-white.svg" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
@ -74,18 +33,7 @@
<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">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="gettingStarted/index.html">Erste Schritte</a></li>
<li class="toctree-l1"><a class="reference internal" href="software/installation.html">Installationsanweisungen</a></li>
@ -95,75 +43,36 @@
<li class="toctree-l1"><a class="reference internal" href="other/hardware.html">Hardware</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">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<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="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="#" class="icon icon-home"></a> &raquo;</li>
<li>Dokumentation des Roboters</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/index.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="dokumentation-des-roboters">
<h1>Dokumentation des Roboters<a class="headerlink" href="#dokumentation-des-roboters" title="Permalink to this heading"></a></h1>
<h1>Dokumentation des Roboters<a class="headerlink" href="#dokumentation-des-roboters" title="Link zu dieser Überschrift"></a></h1>
<div class="toctree-wrapper compound">
</div>
<div class="section" id="inhalt">
<h2>Inhalt<a class="headerlink" href="#inhalt" title="Permalink to this heading"></a></h2>
<h2>Inhalt<a class="headerlink" href="#inhalt" title="Link zu dieser Überschrift"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="gettingStarted/index.html">Erste Schritte</a></li>
@ -179,56 +88,32 @@
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="gettingStarted/index.html" class="btn btn-neutral float-right" title="Erste Schritte" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="gettingStarted/index.html" class="btn btn-neutral float-right" title="Erste Schritte" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
</p>
<p>&#169; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS).</p>
</div>
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
Erstellt mit <a href="https://www.sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,73 +1,32 @@
<!DOCTYPE html>
<html class="writer-html5" lang="de" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Double Elimination &mdash; CompLib 0.2.3 Dokumentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Double Elimination &mdash; CompLib 0.2.3 Dokumentation</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 data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script 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/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/sphinx_highlight.js"></script>
<script src="../../_static/translations.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Stichwortverzeichnis" href="../../genindex.html" />
<link rel="search" title="Suche" href="../../search.html" />
<link rel="next" title="Hardware" href="../../other/hardware.html" />
<link rel="next" title="Camera und OpenCV" href="Opencv.html" />
<link rel="prev" title="Seeding" href="Seeding.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">
<img src="../../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
<a href="../../index.html"><img src="../../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
@ -75,18 +34,7 @@
<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">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../gettingStarted/index.html">Erste Schritte</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../software/installation.html">Installationsanweisungen</a></li>
@ -98,90 +46,47 @@
<li class="toctree-l2"><a class="reference internal" href="IRSensor.html">Infrarot Sensoren</a></li>
<li class="toctree-l2"><a class="reference internal" href="Seeding.html">Seeding</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Double Elimination</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#dokumentation-des-double-elimination-moduls">Dokumentation des Double Elimination Moduls</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#compLib.DoubleElimination.Position"><code class="docutils literal notranslate"><span class="pre">Position</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#compLib.DoubleElimination.DoubleElim"><code class="docutils literal notranslate"><span class="pre">DoubleElim</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#dokumentation-des-double-elimination-moduls">Dokumentation des Double Elimination Moduls</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="Opencv.html">Camera und OpenCV</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../other/hardware.html">Hardware</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">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<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">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../index.html">compLib</a> &raquo;</li>
<li>Double Elimination</li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/lib/classes/DoubleElimination.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="double-elimination">
<span id="lib-doubleelim"></span><h1>Double Elimination<a class="headerlink" href="#double-elimination" title="Permalink to this heading"></a></h1>
<span id="lib-doubleelim"></span><h1>Double Elimination<a class="headerlink" href="#double-elimination" title="Link zu dieser Überschrift"></a></h1>
<div class="section" id="dokumentation-des-double-elimination-moduls">
<h2>Dokumentation des Double Elimination Moduls<a class="headerlink" href="#dokumentation-des-double-elimination-moduls" title="Permalink to this heading"></a></h2>
<h2>Dokumentation des Double Elimination Moduls<a class="headerlink" href="#dokumentation-des-double-elimination-moduls" title="Link zu dieser Überschrift"></a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="compLib.DoubleElimination.Position">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">compLib.DoubleElimination.</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.DoubleElimination.Position" title="Link zu dieser Definition"></a></dt>
<dt id="compLib.DoubleElimination.Position">
<em class="property">class </em><code class="sig-prename descclassname">compLib.DoubleElimination.</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.DoubleElimination.Position" title="Link zu dieser Definition"></a></dt>
<dd><p>Datenstruktur, welche eine Position representiert.</p>
<dl class="field-list simple">
<dt class="field-odd">Variablen</dt>
@ -195,12 +100,12 @@
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="compLib.DoubleElimination.DoubleElim">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">compLib.DoubleElimination.</span></span><span class="sig-name descname"><span class="pre">DoubleElim</span></span><a class="headerlink" href="#compLib.DoubleElimination.DoubleElim" title="Link zu dieser Definition"></a></dt>
<dt id="compLib.DoubleElimination.DoubleElim">
<em class="property">class </em><code class="sig-prename descclassname">compLib.DoubleElimination.</code><code class="sig-name descname">DoubleElim</code><a class="headerlink" href="#compLib.DoubleElimination.DoubleElim" title="Link zu dieser Definition"></a></dt>
<dd><p>Klasse für die Kommunikation mit Double Elimination Api</p>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.DoubleElimination.DoubleElim.get_goal">
<em class="property"><span class="pre">static</span><span class="w"> </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.DoubleElimination.Position" title="compLib.DoubleElimination.Position"><span class="pre">Position</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.DoubleElimination.DoubleElim.get_goal" title="Link zu dieser Definition"></a></dt>
<dt id="compLib.DoubleElimination.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.DoubleElimination.Position" title="compLib.DoubleElimination.Position">compLib.DoubleElimination.Position</a><span class="p">, </span>int<span class="p">]</span><a class="headerlink" href="#compLib.DoubleElimination.DoubleElim.get_goal" title="Link zu dieser Definition"></a></dt>
<dd><p>Führt den /api/getGoal Aufruf an die API aus.</p>
<dl class="field-list simple">
<dt class="field-odd">Rückgabe</dt>
@ -213,8 +118,8 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.DoubleElimination.DoubleElim.get_items">
<em class="property"><span class="pre">static</span><span class="w"> </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="w"> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.DoubleElimination.DoubleElim.get_items" title="Link zu dieser Definition"></a></dt>
<dt id="compLib.DoubleElimination.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.DoubleElimination.DoubleElim.get_items" title="Link zu dieser Definition"></a></dt>
<dd><p>Führt den /api/getItems Aufruf an die API aus.</p>
<dl class="field-list simple">
<dt class="field-odd">Rückgabe</dt>
@ -227,8 +132,8 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.DoubleElimination.DoubleElim.get_opponent">
<em class="property"><span class="pre">static</span><span class="w"> </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.DoubleElimination.Position" title="compLib.DoubleElimination.Position"><span class="pre">Position</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.DoubleElimination.DoubleElim.get_opponent" title="Link zu dieser Definition"></a></dt>
<dt id="compLib.DoubleElimination.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.DoubleElimination.Position" title="compLib.DoubleElimination.Position">compLib.DoubleElimination.Position</a><span class="p">, </span>int<span class="p">]</span><a class="headerlink" href="#compLib.DoubleElimination.DoubleElim.get_opponent" title="Link zu dieser Definition"></a></dt>
<dd><p>Führt den /api/getOp Aufruf an die API aus.</p>
<dl class="field-list simple">
<dt class="field-odd">Rückgabe</dt>
@ -241,8 +146,8 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.DoubleElimination.DoubleElim.get_pos">
<em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_pos</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.DoubleElimination.Position" title="compLib.DoubleElimination.Position"><span class="pre">Position</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.DoubleElimination.DoubleElim.get_pos" title="Link zu dieser Definition"></a></dt>
<dt id="compLib.DoubleElimination.DoubleElim.get_pos">
<em class="property">static </em><code class="sig-name descname">get_pos</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; Tuple<span class="p">[</span><a class="reference internal" href="#compLib.DoubleElimination.Position" title="compLib.DoubleElimination.Position">compLib.DoubleElimination.Position</a><span class="p">, </span>int<span class="p">]</span><a class="headerlink" href="#compLib.DoubleElimination.DoubleElim.get_pos" title="Link zu dieser Definition"></a></dt>
<dd><p>Führt den /api/getPos Aufruf an die API aus.</p>
<dl class="field-list simple">
<dt class="field-odd">Rückgabe</dt>
@ -255,8 +160,8 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.DoubleElimination.DoubleElim.get_scores">
<em class="property"><span class="pre">static</span><span class="w"> </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="w"> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.DoubleElimination.DoubleElim.get_scores" title="Link zu dieser Definition"></a></dt>
<dt id="compLib.DoubleElimination.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.DoubleElimination.DoubleElim.get_scores" title="Link zu dieser Definition"></a></dt>
<dd><p>Führt den /api/getScores Aufruf an die API aus.</p>
<dl class="field-list simple">
<dt class="field-odd">Rückgabe</dt>
@ -275,58 +180,33 @@
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../../other/hardware.html" class="btn btn-neutral float-right" title="Hardware" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
<a href="Seeding.html" class="btn btn-neutral float-left" title="Seeding" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="Seeding.html" class="btn btn-neutral float-left" title="Seeding" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Zurück</a>
<a href="Opencv.html" class="btn btn-neutral float-right" title="Camera und OpenCV" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
</p>
<p>&#169; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS).</p>
</div>
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
Erstellt mit <a href="https://www.sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,73 +1,32 @@
<!DOCTYPE html>
<html class="writer-html5" lang="de" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Encoder &mdash; CompLib 0.2.3 Dokumentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Encoder &mdash; CompLib 0.2.3 Dokumentation</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 data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script 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/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/sphinx_highlight.js"></script>
<script src="../../_static/translations.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Stichwortverzeichnis" href="../../genindex.html" />
<link rel="search" title="Suche" href="../../search.html" />
<link rel="next" title="Infrarot Sensoren" href="IRSensor.html" />
<link rel="prev" title="Motoren" href="Motor.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">
<img src="../../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
<a href="../../index.html"><img src="../../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
@ -75,18 +34,7 @@
<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">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../gettingStarted/index.html">Erste Schritte</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../software/installation.html">Installationsanweisungen</a></li>
@ -95,96 +43,54 @@
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">compLib</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="Motor.html">Motoren</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Encoder</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#dokumentation-der-klasse">Dokumentation der Klasse</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#compLib.Encoder.Encoder"><code class="docutils literal notranslate"><span class="pre">Encoder</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#dokumentation-der-klasse">Dokumentation der Klasse</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="IRSensor.html">Infrarot Sensoren</a></li>
<li class="toctree-l2"><a class="reference internal" href="Seeding.html">Seeding</a></li>
<li class="toctree-l2"><a class="reference internal" href="DoubleElimination.html">Double Elimination</a></li>
<li class="toctree-l2"><a class="reference internal" href="Opencv.html">Camera und OpenCV</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../other/hardware.html">Hardware</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">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<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">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../index.html">compLib</a> &raquo;</li>
<li>Encoder</li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/lib/classes/Encoder.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="encoder">
<span id="lib-encoder"></span><h1>Encoder<a class="headerlink" href="#encoder" title="Permalink to this heading"></a></h1>
<span id="lib-encoder"></span><h1>Encoder<a class="headerlink" href="#encoder" title="Link zu dieser Überschrift"></a></h1>
<div class="section" id="dokumentation-der-klasse">
<h2>Dokumentation der Klasse<a class="headerlink" href="#dokumentation-der-klasse" title="Permalink to this heading"></a></h2>
<h2>Dokumentation der Klasse<a class="headerlink" href="#dokumentation-der-klasse" title="Link zu dieser Überschrift"></a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="compLib.Encoder.Encoder">
<em class="property"><span class="pre">class</span><span class="w"> </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="Link zu dieser 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="Link zu dieser Definition"></a></dt>
<dd><p>Klasse zum Zugriff auf die Encoder der einzelnen Motoren</p>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Encoder.Encoder.read_all_positions">
<em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">read_all_positions</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Encoder.Encoder.read_all_positions" title="Link zu dieser Definition"></a></dt>
<dt id="compLib.Encoder.Encoder.read_all_positions">
<em class="property">static </em><code class="sig-name descname">read_all_positions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Encoder.Encoder.read_all_positions" title="Link zu dieser Definition"></a></dt>
<dd><p>Lesen aller absoluten Positionen der einzelnen Encoder</p>
<dl class="field-list simple">
<dt class="field-odd">Rückgabe</dt>
@ -194,8 +100,8 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Encoder.Encoder.read_all_velocities">
<em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">read_all_velocities</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Encoder.Encoder.read_all_velocities" title="Link zu dieser Definition"></a></dt>
<dt id="compLib.Encoder.Encoder.read_all_velocities">
<em class="property">static </em><code class="sig-name descname">read_all_velocities</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Encoder.Encoder.read_all_velocities" title="Link zu dieser Definition"></a></dt>
<dd><p>Lesen der Geschwindigkeit aller angeschlossenen Motoren.</p>
<dl class="field-list simple">
<dt class="field-odd">Rückgabe</dt>
@ -211,58 +117,33 @@
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="IRSensor.html" class="btn btn-neutral float-right" title="Infrarot Sensoren" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
<a href="Motor.html" class="btn btn-neutral float-left" title="Motoren" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="Motor.html" class="btn btn-neutral float-left" title="Motoren" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Zurück</a>
<a href="IRSensor.html" class="btn btn-neutral float-right" title="Infrarot Sensoren" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
</p>
<p>&#169; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS).</p>
</div>
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
Erstellt mit <a href="https://www.sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,73 +1,32 @@
<!DOCTYPE html>
<html class="writer-html5" lang="de" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Infrarot Sensoren &mdash; CompLib 0.2.3 Dokumentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Infrarot Sensoren &mdash; CompLib 0.2.3 Dokumentation</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 data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script 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/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/sphinx_highlight.js"></script>
<script src="../../_static/translations.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Stichwortverzeichnis" href="../../genindex.html" />
<link rel="search" title="Suche" href="../../search.html" />
<link rel="next" title="Seeding" href="Seeding.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">
<img src="../../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
<a href="../../index.html"><img src="../../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
@ -75,18 +34,7 @@
<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">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../gettingStarted/index.html">Erste Schritte</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../software/installation.html">Installationsanweisungen</a></li>
@ -96,107 +44,65 @@
<li class="toctree-l2"><a class="reference internal" href="Motor.html">Motoren</a></li>
<li class="toctree-l2"><a class="reference internal" href="Encoder.html">Encoder</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Infrarot Sensoren</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#dokumentation-der-klasse">Dokumentation der Klasse</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#compLib.IRSensor.IRSensor"><code class="docutils literal notranslate"><span class="pre">IRSensor</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#dokumentation-der-klasse">Dokumentation der Klasse</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="Seeding.html">Seeding</a></li>
<li class="toctree-l2"><a class="reference internal" href="DoubleElimination.html">Double Elimination</a></li>
<li class="toctree-l2"><a class="reference internal" href="Opencv.html">Camera und OpenCV</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../other/hardware.html">Hardware</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">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<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">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../index.html">compLib</a> &raquo;</li>
<li>Infrarot Sensoren</li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/lib/classes/IRSensor.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="infrarot-sensoren">
<span id="lib-irsensor"></span><h1>Infrarot Sensoren<a class="headerlink" href="#infrarot-sensoren" title="Permalink to this heading"></a></h1>
<span id="lib-irsensor"></span><h1>Infrarot Sensoren<a class="headerlink" href="#infrarot-sensoren" title="Link zu dieser Überschrift"></a></h1>
<div class="section" id="dokumentation-der-klasse">
<h2>Dokumentation der Klasse<a class="headerlink" href="#dokumentation-der-klasse" title="Permalink to this heading"></a></h2>
<h2>Dokumentation der Klasse<a class="headerlink" href="#dokumentation-der-klasse" title="Link zu dieser Überschrift"></a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="compLib.IRSensor.IRSensor">
<em class="property"><span class="pre">class</span><span class="w"> </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="Link zu dieser 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="Link zu dieser Definition"></a></dt>
<dd><p>Ermöglicht den Zugriff auf die einzelnen IRSensoren des Roboters</p>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.IRSensor.IRSensor.disable">
<em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">disable</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.IRSensor.IRSensor.disable" title="Link zu dieser Definition"></a></dt>
<dt id="compLib.IRSensor.IRSensor.disable">
<em class="property">static </em><code class="sig-name descname">disable</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.IRSensor.IRSensor.disable" title="Link zu dieser Definition"></a></dt>
<dd><p>Deaktivieren der Infrarot-Sender</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.IRSensor.IRSensor.enable">
<em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">enable</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.IRSensor.IRSensor.enable" title="Link zu dieser Definition"></a></dt>
<dt id="compLib.IRSensor.IRSensor.enable">
<em class="property">static </em><code class="sig-name descname">enable</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.IRSensor.IRSensor.enable" title="Link zu dieser Definition"></a></dt>
<dd><p>Aktivieren Infrarot-Sender. Muss bei jedem Programmstart ausgeführt werden.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.IRSensor.IRSensor.read_all">
<em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">read_all</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.IRSensor.IRSensor.read_all" title="Link zu dieser Definition"></a></dt>
<dt id="compLib.IRSensor.IRSensor.read_all">
<em class="property">static </em><code class="sig-name descname">read_all</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#compLib.IRSensor.IRSensor.read_all" title="Link zu dieser Definition"></a></dt>
<dd><p>Auslesen aller Sensoren gleichzeitig</p>
<dl class="field-list simple">
<dt class="field-odd">Rückgabe</dt>
@ -212,58 +118,33 @@
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="Seeding.html" class="btn btn-neutral float-right" title="Seeding" accesskey="n" rel="next">Weiter <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> Zurück</a>
<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> Zurück</a>
<a href="Seeding.html" class="btn btn-neutral float-right" title="Seeding" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
</p>
<p>&#169; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS).</p>
</div>
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
Erstellt mit <a href="https://www.sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,73 +1,32 @@
<!DOCTYPE html>
<html class="writer-html5" lang="de" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Motoren &mdash; CompLib 0.2.3 Dokumentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Motoren &mdash; CompLib 0.2.3 Dokumentation</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 data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script 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/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/sphinx_highlight.js"></script>
<script src="../../_static/translations.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Stichwortverzeichnis" href="../../genindex.html" />
<link rel="search" title="Suche" href="../../search.html" />
<link rel="next" title="Encoder" href="Encoder.html" />
<link rel="prev" title="compLib" 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">
<img src="../../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
<a href="../../index.html"><img src="../../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
@ -75,18 +34,7 @@
<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">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../gettingStarted/index.html">Erste Schritte</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../software/installation.html">Installationsanweisungen</a></li>
@ -94,10 +42,7 @@
<li class="toctree-l1"><a class="reference internal" href="../../other/usage.html">Beispiele</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">compLib</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#">Motoren</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#dokumentation-der-klasse">Dokumentation der Klasse</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#compLib.Motor.Motor"><code class="docutils literal notranslate"><span class="pre">Motor</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#dokumentation-der-klasse">Dokumentation der Klasse</a></li>
<li class="toctree-l3"><a class="reference internal" href="#genauere-informationen">Genauere Informationen</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#power-vs-speed-vs-pulsewidth">Power vs Speed vs PulseWidth</a></li>
<li class="toctree-l4"><a class="reference internal" href="#normal-vs-multiple">Normal vs Multiple</a></li>
@ -113,87 +58,48 @@
<li class="toctree-l2"><a class="reference internal" href="IRSensor.html">Infrarot Sensoren</a></li>
<li class="toctree-l2"><a class="reference internal" href="Seeding.html">Seeding</a></li>
<li class="toctree-l2"><a class="reference internal" href="DoubleElimination.html">Double Elimination</a></li>
<li class="toctree-l2"><a class="reference internal" href="Opencv.html">Camera und OpenCV</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../other/hardware.html">Hardware</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">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<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">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../index.html">compLib</a> &raquo;</li>
<li>Motoren</li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/lib/classes/Motor.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="motoren">
<span id="lib-motor"></span><h1>Motoren<a class="headerlink" href="#motoren" title="Permalink to this heading"></a></h1>
<span id="lib-motor"></span><h1>Motoren<a class="headerlink" href="#motoren" title="Link zu dieser Überschrift"></a></h1>
<div class="section" id="dokumentation-der-klasse">
<h2>Dokumentation der Klasse<a class="headerlink" href="#dokumentation-der-klasse" title="Permalink to this heading"></a></h2>
<h2>Dokumentation der Klasse<a class="headerlink" href="#dokumentation-der-klasse" title="Link zu dieser Überschrift"></a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="compLib.Motor.Motor">
<em class="property"><span class="pre">class</span><span class="w"> </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="Link zu dieser 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="Link zu dieser Definition"></a></dt>
<dd><p>Klasse zum Ansteuern der Motoren</p>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Motor.Motor.multiple_power">
<em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">multiple_power</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">arguments</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.multiple_power" title="Link zu dieser Definition"></a></dt>
<dt id="compLib.Motor.Motor.multiple_power">
<em class="property">static </em><code class="sig-name descname">multiple_power</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">arguments</span><span class="p">:</span> <span class="n">tuple</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.multiple_power" title="Link zu dieser Definition"></a></dt>
<dd><p>Mehrere Motoren auf eine prozentuale Leistung der Höchstgeschwindigkeit einstellen</p>
<dl class="field-list simple">
<dt class="field-odd">Parameter</dt>
@ -206,8 +112,8 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Motor.Motor.multiple_pulse_width">
<em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">multiple_pulse_width</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">arguments</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.multiple_pulse_width" title="Link zu dieser Definition"></a></dt>
<dt id="compLib.Motor.Motor.multiple_pulse_width">
<em class="property">static </em><code class="sig-name descname">multiple_pulse_width</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">arguments</span><span class="p">:</span> <span class="n">tuple</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.multiple_pulse_width" title="Link zu dieser Definition"></a></dt>
<dd><p>Setzen den Pulsbreite mehrerer Motoren in Prozent der Periode</p>
<dl class="field-list simple">
<dt class="field-odd">Parameter</dt>
@ -220,8 +126,8 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Motor.Motor.multiple_speed">
<em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">multiple_speed</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">arguments</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.multiple_speed" title="Link zu dieser Definition"></a></dt>
<dt id="compLib.Motor.Motor.multiple_speed">
<em class="property">static </em><code class="sig-name descname">multiple_speed</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">arguments</span><span class="p">:</span> <span class="n">tuple</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.multiple_speed" title="Link zu dieser Definition"></a></dt>
<dd><p>Geschwindigkeit mehrerer Motoren einstellen</p>
<dl class="field-list simple">
<dt class="field-odd">Parameter</dt>
@ -234,8 +140,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><span class="w"> </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="w"> </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="w"> </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="Link zu dieser 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="Link zu dieser Definition"></a></dt>
<dd><p>Motor auf eine prozentuale Leistung der Höchstgeschwindigkeit einstellen</p>
<dl class="field-list simple">
<dt class="field-odd">Parameter</dt>
@ -251,8 +157,8 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Motor.Motor.pulse_width">
<em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">pulse_width</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="w"> </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="w"> </span><span class="n"><span class="pre">float</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.pulse_width" title="Link zu dieser Definition"></a></dt>
<dt id="compLib.Motor.Motor.pulse_width">
<em class="property">static </em><code class="sig-name descname">pulse_width</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.pulse_width" title="Link zu dieser Definition"></a></dt>
<dd><p>Setzen den Pulsbreite eines Motors in Prozent der Periode</p>
<dl class="field-list simple">
<dt class="field-odd">Parameter</dt>
@ -268,8 +174,8 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Motor.Motor.speed">
<em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">speed</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="w"> </span><span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">speed</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.speed" title="Link zu dieser Definition"></a></dt>
<dt id="compLib.Motor.Motor.speed">
<em class="property">static </em><code class="sig-name descname">speed</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">speed</span><span class="p">:</span> <span class="n">float</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.speed" title="Link zu dieser Definition"></a></dt>
<dd><p>Geschwindigkeit des Motors einstellen</p>
<dl class="field-list simple">
<dt class="field-odd">Parameter</dt>
@ -288,9 +194,9 @@
</div>
<div class="section" id="genauere-informationen">
<h2>Genauere Informationen<a class="headerlink" href="#genauere-informationen" title="Permalink to this heading"></a></h2>
<h2>Genauere Informationen<a class="headerlink" href="#genauere-informationen" title="Link zu dieser Überschrift"></a></h2>
<div class="section" id="power-vs-speed-vs-pulsewidth">
<h3>Power vs Speed vs PulseWidth<a class="headerlink" href="#power-vs-speed-vs-pulsewidth" title="Permalink to this heading"></a></h3>
<h3>Power vs Speed vs PulseWidth<a class="headerlink" href="#power-vs-speed-vs-pulsewidth" title="Link zu dieser Überschrift"></a></h3>
<p>Zur ansteuerung der Motoren kann entweder <code class="docutils literal notranslate"><span class="pre">Motor.power(...)</span></code>, <code class="docutils literal notranslate"><span class="pre">Motor.speed(...)</span></code> oder <code class="docutils literal notranslate"><span class="pre">Motor.pulse_width(...)`</span></code> verwendet werden.
Der Unterschied der 3 Funktionen liegt dabei in der Einheit des 2. Parameters.</p>
<div class="line-block">
@ -300,15 +206,15 @@ Der Unterschied der 3 Funktionen liegt dabei in der Einheit des 2. Parameters.</
</div>
</div>
<div class="section" id="normal-vs-multiple">
<h3>Normal vs Multiple<a class="headerlink" href="#normal-vs-multiple" title="Permalink to this heading"></a></h3>
<h3>Normal vs Multiple<a class="headerlink" href="#normal-vs-multiple" title="Link zu dieser Überschrift"></a></h3>
<p>Der Aufruf der funktionen kann entweder über <code class="docutils literal notranslate"><span class="pre">Motor.power(port,</span> <span class="pre">percent)</span></code> oder <code class="docutils literal notranslate"><span class="pre">Motor.power((port,</span> <span class="pre">percent),</span> <span class="pre">(port,</span> <span class="pre">percent),</span> <span class="pre">..)</span></code> erfolgen.
Der zweite Aufruf ermöglicht dem Entwickler dabei beide Motoren in einem Aufruf anzusteuern und bringt einen kleinen Vorteil in der Leistungsfähigkeit der Software.</p>
</div>
</div>
<div class="section" id="beispiele">
<h2>Beispiele<a class="headerlink" href="#beispiele" title="Permalink to this heading"></a></h2>
<h2>Beispiele<a class="headerlink" href="#beispiele" title="Link zu dieser Überschrift"></a></h2>
<div class="section" id="vorwarts-fahren">
<h3>Vorwärts fahren<a class="headerlink" href="#vorwarts-fahren" title="Permalink to this heading"></a></h3>
<h3>Vorwärts fahren<a class="headerlink" href="#vorwarts-fahren" title="Link zu dieser Überschrift"></a></h3>
<p>Mit folgenden Programm drehen sich beide Motoren mit 50% ihrer maximalen Geschwindigkeit.
Dabei ist zu beachten, dass ein Motor in die entgegengesetzte Richtung zum aneren Motor gedreht werden muss, da diese spiegelverkehrt montiert sind.</p>
<p>Zusätzlich ist ein <code class="docutils literal notranslate"><span class="pre">time.sleep(5)</span></code> notwendig, welches das Programm für 5 Sekunden pausiert. Diese Pause wird benötigt, da der Roboter automatisch alle Motoren beim Ende des Progammes deaktiviert.</p>
@ -327,58 +233,33 @@ Dabei ist zu beachten, dass ein Motor in die entgegengesetzte Richtung zum anere
</div>
</div>
<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">Weiter <span class="fa fa-arrow-circle-right"></span></a>
<a href="../index.html" class="btn btn-neutral float-left" title="compLib" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="../index.html" class="btn btn-neutral float-left" title="compLib" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Zurück</a>
<a href="Encoder.html" class="btn btn-neutral float-right" title="Encoder" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
</p>
<p>&#169; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS).</p>
</div>
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
Erstellt mit <a href="https://www.sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

172
lib/classes/Opencv.html Normal file
View file

@ -0,0 +1,172 @@
<!DOCTYPE html>
<html class="writer-html5" lang="de" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Camera und OpenCV &mdash; CompLib 0.2.3 Dokumentation</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 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/translations.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Stichwortverzeichnis" href="../../genindex.html" />
<link rel="search" title="Suche" href="../../search.html" />
<link rel="next" title="Hardware" href="../../other/hardware.html" />
<link rel="prev" title="Double Elimination" href="DoubleElimination.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"><img src="../../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
<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="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../gettingStarted/index.html">Erste Schritte</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../software/installation.html">Installationsanweisungen</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../faq.html">FAQ</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../other/usage.html">Beispiele</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">compLib</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="Motor.html">Motoren</a></li>
<li class="toctree-l2"><a class="reference internal" href="Encoder.html">Encoder</a></li>
<li class="toctree-l2"><a class="reference internal" href="IRSensor.html">Infrarot Sensoren</a></li>
<li class="toctree-l2"><a class="reference internal" href="Seeding.html">Seeding</a></li>
<li class="toctree-l2"><a class="reference internal" href="DoubleElimination.html">Double Elimination</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Camera und OpenCV</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#dokumentation-des-camera-moduls">Dokumentation des Camera Moduls</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../other/hardware.html">Hardware</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" >
<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">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../index.html">compLib</a> &raquo;</li>
<li>Camera und OpenCV</li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/lib/classes/Opencv.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="camera-und-opencv">
<span id="lib-camera"></span><h1>Camera und OpenCV<a class="headerlink" href="#camera-und-opencv" title="Link zu dieser Überschrift"></a></h1>
<div class="section" id="dokumentation-des-camera-moduls">
<h2>Dokumentation des Camera Moduls<a class="headerlink" href="#dokumentation-des-camera-moduls" title="Link zu dieser Überschrift"></a></h2>
<dl class="py class">
<dt id="compLib.Camera.Marker">
<em class="property">class </em><code class="sig-prename descclassname">compLib.Camera.</code><code class="sig-name descname">Marker</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">id</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">x</span><span class="p">:</span> <span class="n">float</span></em>, <em class="sig-param"><span class="n">y</span><span class="p">:</span> <span class="n">float</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Camera.Marker" title="Link zu dieser Definition"></a></dt>
<dd></dd></dl>
<dl class="py class">
<dt id="compLib.Camera.Camera">
<em class="property">class </em><code class="sig-prename descclassname">compLib.Camera.</code><code class="sig-name descname">Camera</code><a class="headerlink" href="#compLib.Camera.Camera" title="Link zu dieser Definition"></a></dt>
<dd><dl class="py method">
<dt id="compLib.Camera.Camera.detect_markers">
<code class="sig-name descname">detect_markers</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.Camera.Camera.detect_markers" title="Link zu dieser Definition"></a></dt>
<dd><p>Funktion um die ArUco Marker in einem Bild zu erkennen.
:param image: Bild, welches die Kamera aufgenommen hat.
:return: Gibt drei Variablen zurueck. Erstens eine Liste an Postionen der „Ecken“ der erkannten Markern. Zweitens eine Liste an IDs der erkannten Markern und dritten noch Debug Informationen (diese können ignoriert werden).</p>
</dd></dl>
<dl class="py method">
<dt id="compLib.Camera.Camera.detect_markers_midpoint">
<code class="sig-name descname">detect_markers_midpoint</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">image</span></em><span class="sig-paren">)</span> &#x2192; tuple<a class="headerlink" href="#compLib.Camera.Camera.detect_markers_midpoint" title="Link zu dieser Definition"></a></dt>
<dd><p>Funktion um die ArUco Marker in einem Bild zu erkennen, einzuzeichnen und den Mittelpunkt der Marker auszurechnen.
:param image: Bild, welches die Kamera aufgenommen hat.
:return: Gibt zwei Variablen zurueck. Erstens eine Liste an „Markern“ und zweitens das Bild mit den eigezeichneten Marken.</p>
</dd></dl>
<dl class="py method">
<dt id="compLib.Camera.Camera.draw_markers">
<code class="sig-name descname">draw_markers</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">image</span></em>, <em class="sig-param"><span class="n">corners</span></em>, <em class="sig-param"><span class="n">ids</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Camera.Camera.draw_markers" title="Link zu dieser Definition"></a></dt>
<dd><p>Zeichnet die erkannten Markern mit ihren IDs in das Bild.
:param image: Original Bild, in dem die Marker erkannt wurden.
:param corners: List der Positionen der Ecken der erkannten Marker.
:param ids: IDs der erkannten Markern.
:return: Neues Bild mit den eigezeichneten Markern.</p>
</dd></dl>
<dl class="py method">
<dt id="compLib.Camera.Camera.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.Camera.Camera.get_frame" title="Link zu dieser Definition"></a></dt>
<dd><p>Die Funktion das neuste Bild, welches die Kamera aufgenommen hat zurück.
:return: Ein „opencv image frame“</p>
</dd></dl>
<dl class="py method">
<dt id="compLib.Camera.Camera.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.Camera.Camera.publish_frame" title="Link zu dieser Definition"></a></dt>
<dd><p>Sendet das Bild, welches der Funktion übergeben wird, an den Webserver, damit es der Nutzer in seinem Browser ansehen kann.
:param image: Opencv Bild, welches dem Nutzer angezeigt werden soll.
:return: None</p>
</dd></dl>
</dd></dl>
</div>
</div>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="DoubleElimination.html" class="btn btn-neutral float-left" title="Double Elimination" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Zurück</a>
<a href="../../other/hardware.html" class="btn btn-neutral float-right" title="Hardware" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS).</p>
</div>
Erstellt mit <a href="https://www.sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

View file

@ -1,73 +1,32 @@
<!DOCTYPE html>
<html class="writer-html5" lang="de" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Seeding &mdash; CompLib 0.2.3 Dokumentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Seeding &mdash; CompLib 0.2.3 Dokumentation</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 data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script 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/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/sphinx_highlight.js"></script>
<script src="../../_static/translations.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Stichwortverzeichnis" href="../../genindex.html" />
<link rel="search" title="Suche" href="../../search.html" />
<link rel="next" title="Double Elimination" href="DoubleElimination.html" />
<link rel="prev" title="Infrarot Sensoren" 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">
<img src="../../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
<a href="../../index.html"><img src="../../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
@ -75,18 +34,7 @@
<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">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../gettingStarted/index.html">Erste Schritte</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../software/installation.html">Installationsanweisungen</a></li>
@ -98,90 +46,50 @@
<li class="toctree-l2"><a class="reference internal" href="IRSensor.html">Infrarot Sensoren</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Seeding</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#dokumentation-des-seeding-moduls">Dokumentation des Seeding Moduls</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#compLib.Seeding.Gamestate"><code class="docutils literal notranslate"><span class="pre">Gamestate</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#beispiele">Beispiele</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="DoubleElimination.html">Double Elimination</a></li>
<li class="toctree-l2"><a class="reference internal" href="Opencv.html">Camera und OpenCV</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../other/hardware.html">Hardware</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">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<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">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../index.html">compLib</a> &raquo;</li>
<li>Seeding</li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/lib/classes/Seeding.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="seeding">
<span id="lib-seeding"></span><h1>Seeding<a class="headerlink" href="#seeding" title="Permalink to this heading"></a></h1>
<span id="lib-seeding"></span><h1>Seeding<a class="headerlink" href="#seeding" title="Link zu dieser Überschrift"></a></h1>
<div class="section" id="dokumentation-des-seeding-moduls">
<h2>Dokumentation des Seeding Moduls<a class="headerlink" href="#dokumentation-des-seeding-moduls" title="Permalink to this heading"></a></h2>
<h2>Dokumentation des Seeding Moduls<a class="headerlink" href="#dokumentation-des-seeding-moduls" title="Link zu dieser Überschrift"></a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="compLib.Seeding.Gamestate">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">compLib.Seeding.</span></span><span class="sig-name descname"><span class="pre">Gamestate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">seed</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Seeding.Gamestate" title="Link zu dieser Definition"></a></dt>
<dt id="compLib.Seeding.Gamestate">
<em class="property">class </em><code class="sig-prename descclassname">compLib.Seeding.</code><code class="sig-name descname">Gamestate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">seed</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Seeding.Gamestate" title="Link zu dieser Definition"></a></dt>
<dd><p>Erstellt den Seeding „Gamestate“ für den angegebenen Seed.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameter</dt>
@ -189,8 +97,8 @@
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Seeding.Gamestate.get_heuballen">
<span class="sig-name descname"><span class="pre">get_heuballen</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">int</span></span></span><a class="headerlink" href="#compLib.Seeding.Gamestate.get_heuballen" title="Link zu dieser Definition"></a></dt>
<dt id="compLib.Seeding.Gamestate.get_heuballen">
<code class="sig-name descname">get_heuballen</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#compLib.Seeding.Gamestate.get_heuballen" title="Link zu dieser Definition"></a></dt>
<dd><p>Die Funktion gibt entweder die Zahl „1“ oder „2“ zurück. Wenn die Funktion „1“ zurückgibt, dann liegen die Heuballen auf den gelben Linien. Wenn die Funktion „2“ zurückgibt, dann liegen sie auf den blauen Flächen.</p>
<dl class="field-list simple">
<dt class="field-odd">Rückgabe</dt>
@ -200,8 +108,8 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Seeding.Gamestate.get_logistic_plan">
<span class="sig-name descname"><span class="pre">get_logistic_plan</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="p"><span class="pre">[</span></span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.Seeding.Gamestate.get_logistic_plan" title="Link zu dieser Definition"></a></dt>
<dt id="compLib.Seeding.Gamestate.get_logistic_plan">
<code class="sig-name descname">get_logistic_plan</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <span class="p">]</span><a class="headerlink" href="#compLib.Seeding.Gamestate.get_logistic_plan" title="Link zu dieser Definition"></a></dt>
<dd><p>Die Funktion gibt den „Logistik Plan“ zurück. Also die Reihenfolge, in welcher der Roboter die Logistik Zonen Abfahren muss, um die Pakete welche dort liegen zu sortieren.</p>
<dl class="field-list simple">
<dt class="field-odd">Rückgabe</dt>
@ -211,8 +119,8 @@
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="compLib.Seeding.Gamestate.get_material_deliveries">
<span class="sig-name descname"><span class="pre">get_material_deliveries</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="p"><span class="pre">[</span></span><span class="p"><span class="pre">[</span></span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#compLib.Seeding.Gamestate.get_material_deliveries" title="Link zu dieser Definition"></a></dt>
<dt id="compLib.Seeding.Gamestate.get_material_deliveries">
<code class="sig-name descname">get_material_deliveries</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <span class="p">[</span><span class="p">]</span><span class="p">]</span><a class="headerlink" href="#compLib.Seeding.Gamestate.get_material_deliveries" title="Link zu dieser Definition"></a></dt>
<dd><p>Die Funktion gibt die einzelnen „Material Lieferungen“ zurück. Da der Roboter immer zwei Paare an Materialien anliefern muss, gibt die Funktion eine Liste an Material Paaren zurück. Die Materialien werden dabei durch ihre Zonen-ID representiert. Also Holz ist z.B. „0“ und die Ziegelsteine sind „3“.</p>
<dl class="field-list simple">
<dt class="field-odd">Rückgabe</dt>
@ -224,7 +132,7 @@
</dd></dl>
<div class="section" id="beispiele">
<h3>Beispiele<a class="headerlink" href="#beispiele" title="Permalink to this heading"></a></h3>
<h3>Beispiele<a class="headerlink" href="#beispiele" title="Link zu dieser Überschrift"></a></h3>
<div class="line-block">
<div class="line">In <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">1</span></code> wird das Seeding Modul importiert.</div>
<div class="line">In <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">2</span></code> definieren wir dann eine Variable, in der wir den „Seed“ des Gamestates den wir erstellen wollten speichern.</div>
@ -252,58 +160,33 @@
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="DoubleElimination.html" class="btn btn-neutral float-right" title="Double Elimination" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
<a href="IRSensor.html" class="btn btn-neutral float-left" title="Infrarot Sensoren" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="IRSensor.html" class="btn btn-neutral float-left" title="Infrarot Sensoren" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Zurück</a>
<a href="DoubleElimination.html" class="btn btn-neutral float-right" title="Double Elimination" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
</p>
<p>&#169; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS).</p>
</div>
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
Erstellt mit <a href="https://www.sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,73 +1,32 @@
<!DOCTYPE html>
<html class="writer-html5" lang="de" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>compLib &mdash; CompLib 0.2.3 Dokumentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>compLib &mdash; CompLib 0.2.3 Dokumentation</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 data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script 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/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Stichwortverzeichnis" href="../genindex.html" />
<link rel="search" title="Suche" href="../search.html" />
<link rel="next" title="Motoren" href="classes/Motor.html" />
<link rel="prev" title="Beispiele" 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">
<img src="../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
<a href="../index.html"><img src="../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
@ -75,18 +34,7 @@
<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">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../gettingStarted/index.html">Erste Schritte</a></li>
<li class="toctree-l1"><a class="reference internal" href="../software/installation.html">Installationsanweisungen</a></li>
@ -98,91 +46,42 @@
<li class="toctree-l2"><a class="reference internal" href="classes/IRSensor.html">Infrarot Sensoren</a></li>
<li class="toctree-l2"><a class="reference internal" href="classes/Seeding.html">Seeding</a></li>
<li class="toctree-l2"><a class="reference internal" href="classes/DoubleElimination.html">Double Elimination</a></li>
<li class="toctree-l2"><a class="reference internal" href="classes/Opencv.html">Camera und OpenCV</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../other/hardware.html">Hardware</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">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<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">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>compLib</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/lib/index.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="complib">
<h1>compLib<a class="headerlink" href="#complib" title="Permalink to this heading"></a></h1>
<h1>compLib<a class="headerlink" href="#complib" title="Link zu dieser Überschrift"></a></h1>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="classes/Motor.html">Motoren</a><ul>
<li class="toctree-l2"><a class="reference internal" href="classes/Motor.html#dokumentation-der-klasse">Dokumentation der Klasse</a><ul>
<li class="toctree-l3"><a class="reference internal" href="classes/Motor.html#compLib.Motor.Motor"><code class="docutils literal notranslate"><span class="pre">Motor</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="classes/Motor.html#compLib.Motor.Motor.multiple_power"><code class="docutils literal notranslate"><span class="pre">Motor.multiple_power()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="classes/Motor.html#compLib.Motor.Motor.multiple_pulse_width"><code class="docutils literal notranslate"><span class="pre">Motor.multiple_pulse_width()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="classes/Motor.html#compLib.Motor.Motor.multiple_speed"><code class="docutils literal notranslate"><span class="pre">Motor.multiple_speed()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="classes/Motor.html#compLib.Motor.Motor.power"><code class="docutils literal notranslate"><span class="pre">Motor.power()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="classes/Motor.html#compLib.Motor.Motor.pulse_width"><code class="docutils literal notranslate"><span class="pre">Motor.pulse_width()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="classes/Motor.html#compLib.Motor.Motor.speed"><code class="docutils literal notranslate"><span class="pre">Motor.speed()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="classes/Motor.html#dokumentation-der-klasse">Dokumentation der Klasse</a></li>
<li class="toctree-l2"><a class="reference internal" href="classes/Motor.html#genauere-informationen">Genauere Informationen</a><ul>
<li class="toctree-l3"><a class="reference internal" href="classes/Motor.html#power-vs-speed-vs-pulsewidth">Power vs Speed vs PulseWidth</a></li>
<li class="toctree-l3"><a class="reference internal" href="classes/Motor.html#normal-vs-multiple">Normal vs Multiple</a></li>
@ -195,54 +94,26 @@
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="classes/Encoder.html">Encoder</a><ul>
<li class="toctree-l2"><a class="reference internal" href="classes/Encoder.html#dokumentation-der-klasse">Dokumentation der Klasse</a><ul>
<li class="toctree-l3"><a class="reference internal" href="classes/Encoder.html#compLib.Encoder.Encoder"><code class="docutils literal notranslate"><span class="pre">Encoder</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="classes/Encoder.html#compLib.Encoder.Encoder.read_all_positions"><code class="docutils literal notranslate"><span class="pre">Encoder.read_all_positions()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="classes/Encoder.html#compLib.Encoder.Encoder.read_all_velocities"><code class="docutils literal notranslate"><span class="pre">Encoder.read_all_velocities()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="classes/Encoder.html#dokumentation-der-klasse">Dokumentation der Klasse</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="classes/IRSensor.html">Infrarot Sensoren</a><ul>
<li class="toctree-l2"><a class="reference internal" href="classes/IRSensor.html#dokumentation-der-klasse">Dokumentation der Klasse</a><ul>
<li class="toctree-l3"><a class="reference internal" href="classes/IRSensor.html#compLib.IRSensor.IRSensor"><code class="docutils literal notranslate"><span class="pre">IRSensor</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="classes/IRSensor.html#compLib.IRSensor.IRSensor.disable"><code class="docutils literal notranslate"><span class="pre">IRSensor.disable()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="classes/IRSensor.html#compLib.IRSensor.IRSensor.enable"><code class="docutils literal notranslate"><span class="pre">IRSensor.enable()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="classes/IRSensor.html#compLib.IRSensor.IRSensor.read_all"><code class="docutils literal notranslate"><span class="pre">IRSensor.read_all()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="classes/IRSensor.html#dokumentation-der-klasse">Dokumentation der Klasse</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="classes/Seeding.html">Seeding</a><ul>
<li class="toctree-l2"><a class="reference internal" href="classes/Seeding.html#dokumentation-des-seeding-moduls">Dokumentation des Seeding Moduls</a><ul>
<li class="toctree-l3"><a class="reference internal" href="classes/Seeding.html#compLib.Seeding.Gamestate"><code class="docutils literal notranslate"><span class="pre">Gamestate</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="classes/Seeding.html#compLib.Seeding.Gamestate.get_heuballen"><code class="docutils literal notranslate"><span class="pre">Gamestate.get_heuballen()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="classes/Seeding.html#compLib.Seeding.Gamestate.get_logistic_plan"><code class="docutils literal notranslate"><span class="pre">Gamestate.get_logistic_plan()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="classes/Seeding.html#compLib.Seeding.Gamestate.get_material_deliveries"><code class="docutils literal notranslate"><span class="pre">Gamestate.get_material_deliveries()</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="classes/Seeding.html#beispiele">Beispiele</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="classes/DoubleElimination.html">Double Elimination</a><ul>
<li class="toctree-l2"><a class="reference internal" href="classes/DoubleElimination.html#dokumentation-des-double-elimination-moduls">Dokumentation des Double Elimination Moduls</a><ul>
<li class="toctree-l3"><a class="reference internal" href="classes/DoubleElimination.html#compLib.DoubleElimination.Position"><code class="docutils literal notranslate"><span class="pre">Position</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="classes/DoubleElimination.html#compLib.DoubleElimination.DoubleElim"><code class="docutils literal notranslate"><span class="pre">DoubleElim</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="classes/DoubleElimination.html#compLib.DoubleElimination.DoubleElim.get_goal"><code class="docutils literal notranslate"><span class="pre">DoubleElim.get_goal()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="classes/DoubleElimination.html#compLib.DoubleElimination.DoubleElim.get_items"><code class="docutils literal notranslate"><span class="pre">DoubleElim.get_items()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="classes/DoubleElimination.html#compLib.DoubleElimination.DoubleElim.get_opponent"><code class="docutils literal notranslate"><span class="pre">DoubleElim.get_opponent()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="classes/DoubleElimination.html#compLib.DoubleElimination.DoubleElim.get_pos"><code class="docutils literal notranslate"><span class="pre">DoubleElim.get_pos()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="classes/DoubleElimination.html#compLib.DoubleElimination.DoubleElim.get_scores"><code class="docutils literal notranslate"><span class="pre">DoubleElim.get_scores()</span></code></a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="classes/DoubleElimination.html#dokumentation-des-double-elimination-moduls">Dokumentation des Double Elimination Moduls</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="classes/Opencv.html">Camera und OpenCV</a><ul>
<li class="toctree-l2"><a class="reference internal" href="classes/Opencv.html#dokumentation-des-camera-moduls">Dokumentation des Camera Moduls</a></li>
</ul>
</li>
</ul>
@ -251,58 +122,33 @@
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="classes/Motor.html" class="btn btn-neutral float-right" title="Motoren" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
<a href="../other/usage.html" class="btn btn-neutral float-left" title="Beispiele" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="../other/usage.html" class="btn btn-neutral float-left" title="Beispiele" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Zurück</a>
<a href="classes/Motor.html" class="btn btn-neutral float-right" title="Motoren" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
</p>
<p>&#169; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS).</p>
</div>
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
Erstellt mit <a href="https://www.sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

Binary file not shown.

View file

@ -1,72 +1,31 @@
<!DOCTYPE html>
<html class="writer-html5" lang="de" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hardware &mdash; CompLib 0.2.3 Dokumentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Hardware &mdash; CompLib 0.2.3 Dokumentation</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 data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script 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/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Stichwortverzeichnis" href="../genindex.html" />
<link rel="search" title="Suche" href="../search.html" />
<link rel="prev" title="Double Elimination" href="../lib/classes/DoubleElimination.html" />
<link rel="prev" title="Camera und OpenCV" href="../lib/classes/Opencv.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">
<img src="../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
<a href="../index.html"><img src="../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
@ -74,18 +33,7 @@
<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">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../gettingStarted/index.html">Erste Schritte</a></li>
<li class="toctree-l1"><a class="reference internal" href="../software/installation.html">Installationsanweisungen</a></li>
@ -113,76 +61,37 @@
</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">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<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">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Hardware</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/other/hardware.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="hardware">
<span id="other-bardware"></span><h1>Hardware<a class="headerlink" href="#hardware" title="Permalink to this heading"></a></h1>
<span id="other-bardware"></span><h1>Hardware<a class="headerlink" href="#hardware" title="Link zu dieser Überschrift"></a></h1>
<div class="section" id="sensorarray">
<h2>Sensorarray<a class="headerlink" href="#sensorarray" title="Permalink to this heading"></a></h2>
<h2>Sensorarray<a class="headerlink" href="#sensorarray" title="Link zu dieser Überschrift"></a></h2>
<p><img alt="SensorarrayImage" src="../_images/Sensorarray.png" /></p>
<div class="section" id="specs-v4">
<h3>Specs V4<a class="headerlink" href="#specs-v4" title="Permalink to this heading"></a></h3>
<h3>Specs V4<a class="headerlink" href="#specs-v4" title="Link zu dieser Überschrift"></a></h3>
<div class="line-block">
<div class="line"><strong>Processor:</strong> <a class="reference external" href="https://mou.sr/3UxW49B">STM32G030F6P6</a> - 32-bit ARM Cortex M0 CPU &#64; 64 MHz</div>
<div class="line"><strong>I/O:</strong> 1x I2C, 1x SWD</div>
@ -190,7 +99,7 @@
</div>
</div>
<div class="section" id="specs-v2">
<h3>Specs V2<a class="headerlink" href="#specs-v2" title="Permalink to this heading"></a></h3>
<h3>Specs V2<a class="headerlink" href="#specs-v2" title="Link zu dieser Überschrift"></a></h3>
<div class="line-block">
<div class="line"><strong>Processor:</strong> <a class="reference external" href="https://mou.sr/3FxhPC5">ATMEGA328P-AU</a> - 8-bit CPU &#64; 16 MHz</div>
<div class="line"><strong>I/O:</strong> 1x I2C, 1x UART, 1x ISP</div>
@ -198,7 +107,7 @@
</div>
</div>
<div class="section" id="details">
<h3>Details<a class="headerlink" href="#details" title="Permalink to this heading"></a></h3>
<h3>Details<a class="headerlink" href="#details" title="Link zu dieser Überschrift"></a></h3>
<p>Das Sensorarray wird verwendet um Linienen vor dem Roboter zu erkennen. Es agiert als I2C Slave und muss dementsprechend aktiv gepollt werden.
Zusätzlich besteht die möglichkeit alle Emitter zu deaktiviern um einen eventuellen Messfehler durch Sonneneinstralung oder andere Störquellen zu erkennen.</p>
<p>Version 4 unterscheidet sich zu Version 2 im Mikroprozessor, da es zu Lieferengpässen des ATMEGA gekommen ist.
@ -206,28 +115,28 @@ Zusätzlich wurde die möglichkeit alle Emitter einzeln an bzw. auszuschalten en
</div>
</div>
<div class="section" id="motorboard">
<h2>Motorboard<a class="headerlink" href="#motorboard" title="Permalink to this heading"></a></h2>
<h2>Motorboard<a class="headerlink" href="#motorboard" title="Link zu dieser Überschrift"></a></h2>
<p><img alt="MainboardImage" src="../_images/Mainboard.png" /></p>
<div class="section" id="specs">
<h3>Specs<a class="headerlink" href="#specs" title="Permalink to this heading"></a></h3>
<h3>Specs<a class="headerlink" href="#specs" title="Link zu dieser Überschrift"></a></h3>
<p><strong>Motor-Treiber:</strong> <a class="reference external" href="https://mou.sr/3TXbFzu">LV8548MC-AH</a></p>
</div>
<div class="section" id="id2">
<h3>Details<a class="headerlink" href="#id2" title="Permalink to this heading"></a></h3>
<h3>Details<a class="headerlink" href="#id2" title="Link zu dieser Überschrift"></a></h3>
<p>Das Motorboard kann an einen der 4 Ports am Roboter angesteckt werden und ermöglicht das Ansteuern von Motoren und auslesen von Encodern.</p>
</div>
</div>
<div class="section" id="mainboard">
<h2>Mainboard<a class="headerlink" href="#mainboard" title="Permalink to this heading"></a></h2>
<h2>Mainboard<a class="headerlink" href="#mainboard" title="Link zu dieser Überschrift"></a></h2>
<div class="section" id="id3">
<h3>Specs<a class="headerlink" href="#id3" title="Permalink to this heading"></a></h3>
<h3>Specs<a class="headerlink" href="#id3" title="Link zu dieser Überschrift"></a></h3>
<div class="line-block">
<div class="line"><strong>Processor:</strong> <a class="reference external" href="https://mou.sr/3fuaAQv">STM32L051C8T6TR</a> - 32-bit ARM Cortex M0 &#64; 32MHz</div>
<div class="line"><strong>I/O:</strong> 4x I2C (3x Bus 1, 1x Bus 2), 1x 40 Pin GPIO Header, 2x SPI (Verbunden mit GPIO), 4x Motor-/Servo-connector, 1x SWD, 1x USB-C</div>
</div>
</div>
<div class="section" id="id4">
<h3>Details<a class="headerlink" href="#id4" title="Permalink to this heading"></a></h3>
<h3>Details<a class="headerlink" href="#id4" title="Link zu dieser Überschrift"></a></h3>
<p>Das Mainboard wird auf den GPIO-Header eines Raspberry Pi gesteckt und ermöglicht die Steuerung eines Roboters mittels 4 Motor- bzw. Servo-Ports. Der RaspberryPi kommuniziert dabei mittels SPI mit dem Mainboard und steuert die einzelnen Sensoren oder Module an.
Zusätzlich befinden sich auf der Unterseite des Mainboards Lötstellen, welche direkt mit der Stromversorgung der Motoren verbunden sind und geben so die möglichkeit Motoren mit mehr als 5V anzusteuern.</p>
</div>
@ -236,56 +145,32 @@ Zusätzlich befinden sich auf der Unterseite des Mainboards Lötstellen, welche
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../lib/classes/DoubleElimination.html" class="btn btn-neutral float-left" title="Double Elimination" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="../lib/classes/Opencv.html" class="btn btn-neutral float-left" title="Camera und OpenCV" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Zurück</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
</p>
<p>&#169; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS).</p>
</div>
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
Erstellt mit <a href="https://www.sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,73 +1,32 @@
<!DOCTYPE html>
<html class="writer-html5" lang="de" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Beispiele &mdash; CompLib 0.2.3 Dokumentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Beispiele &mdash; CompLib 0.2.3 Dokumentation</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 data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script 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/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Stichwortverzeichnis" href="../genindex.html" />
<link rel="search" title="Suche" href="../search.html" />
<link rel="next" title="compLib" href="../lib/index.html" />
<link rel="prev" title="FAQ" href="../faq.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">
<img src="../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
<a href="../index.html"><img src="../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
@ -75,18 +34,7 @@
<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">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../gettingStarted/index.html">Erste Schritte</a></li>
<li class="toctree-l1"><a class="reference internal" href="../software/installation.html">Installationsanweisungen</a></li>
@ -101,73 +49,34 @@
<li class="toctree-l1"><a class="reference internal" href="hardware.html">Hardware</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">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<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">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Beispiele</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/other/usage.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="beispiele">
<span id="other-usage"></span><h1>Beispiele<a class="headerlink" href="#beispiele" title="Permalink to this heading"></a></h1>
<span id="other-usage"></span><h1>Beispiele<a class="headerlink" href="#beispiele" title="Link zu dieser Überschrift"></a></h1>
<div class="section" id="vorwarts-und-ruckwarts-fahren">
<h2>Vorwärts und rückwärts fahren<a class="headerlink" href="#vorwarts-und-ruckwarts-fahren" title="Permalink to this heading"></a></h2>
<h2>Vorwärts und rückwärts fahren<a class="headerlink" href="#vorwarts-und-ruckwarts-fahren" title="Link zu dieser Überschrift"></a></h2>
<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>
@ -194,7 +103,7 @@
</div>
</div>
<div class="section" id="eine-linie-verfolgen">
<h2>Eine Linie verfolgen<a class="headerlink" href="#eine-linie-verfolgen" title="Permalink to this heading"></a></h2>
<h2>Eine Linie verfolgen<a class="headerlink" href="#eine-linie-verfolgen" title="Link zu dieser Überschrift"></a></h2>
<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="n">Motor</span>
<span class="kn">from</span> <span class="nn">compLib.Encoder</span> <span class="kn">import</span> <span class="n">Encoder</span>
@ -251,7 +160,7 @@
</div>
</div>
<div class="section" id="funktionalitat-des-roboters-uberprufen">
<h2>Funktionalität des Roboters überprüfen<a class="headerlink" href="#funktionalitat-des-roboters-uberprufen" title="Permalink to this heading"></a></h2>
<h2>Funktionalität des Roboters überprüfen<a class="headerlink" href="#funktionalitat-des-roboters-uberprufen" title="Link zu dieser Überschrift"></a></h2>
<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="n">Motor</span>
<span class="kn">from</span> <span class="nn">compLib.Encoder</span> <span class="kn">import</span> <span class="n">Encoder</span>
@ -328,58 +237,33 @@
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../lib/index.html" class="btn btn-neutral float-right" title="compLib" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
<a href="../faq.html" class="btn btn-neutral float-left" title="FAQ" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="../faq.html" class="btn btn-neutral float-left" title="FAQ" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Zurück</a>
<a href="../lib/index.html" class="btn btn-neutral float-right" title="compLib" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
</p>
<p>&#169; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS).</p>
</div>
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
Erstellt mit <a href="https://www.sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View file

@ -1,73 +1,33 @@
<!DOCTYPE html>
<html class="writer-html5" lang="de" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Suche &mdash; CompLib 0.2.3 Dokumentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Suche &mdash; CompLib 0.2.3 Dokumentation</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 data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script 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/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/translations.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript" src="_static/searchtools.js"></script>
<script src="_static/js/theme.js"></script>
<script src="_static/searchtools.js"></script>
<script src="_static/language_data.js"></script>
<link rel="index" title="Stichwortverzeichnis" href="genindex.html" />
<link rel="search" title="Suche" 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">
<img src="_static/compair-logo-white.svg" class="logo" alt="Logo"/>
<a href="index.html"><img src="_static/compair-logo-white.svg" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="#" method="get">
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
@ -75,18 +35,7 @@
<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">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="gettingStarted/index.html">Erste Schritte</a></li>
<li class="toctree-l1"><a class="reference internal" href="software/installation.html">Installationsanweisungen</a></li>
@ -96,67 +45,29 @@
<li class="toctree-l1"><a class="reference internal" href="other/hardware.html">Hardware</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">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<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">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Suche</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">
@ -171,54 +82,35 @@
</div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
</p>
<p>&#169; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS).</p>
</div>
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
Erstellt mit <a href="https://www.sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
<script type="text/javascript">
<script>
jQuery(function() { Search.loadIndex("searchindex.js"); });
</script>
<script type="text/javascript" id="searchindexloader"></script>
<script id="searchindexloader"></script>

File diff suppressed because one or more lines are too long

View file

@ -1,73 +1,32 @@
<!DOCTYPE html>
<html class="writer-html5" lang="de" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Installationsanweisungen &mdash; CompLib 0.2.3 Dokumentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Installationsanweisungen &mdash; CompLib 0.2.3 Dokumentation</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 data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script 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/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.js"></script>
<script src="../_static/translations.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Stichwortverzeichnis" href="../genindex.html" />
<link rel="search" title="Suche" href="../search.html" />
<link rel="next" title="FAQ" href="../faq.html" />
<link rel="prev" title="Mein drittes Programm" href="../gettingStarted/thridProgram.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">
<img src="../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
<a href="../index.html"><img src="../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
@ -75,18 +34,7 @@
<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">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../gettingStarted/index.html">Erste Schritte</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Installationsanweisungen</a><ul>
@ -100,80 +48,41 @@
<li class="toctree-l1"><a class="reference internal" href="../other/hardware.html">Hardware</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">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<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">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Installationsanweisungen</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/software/installation.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="installationsanweisungen">
<span id="software-installation"></span><h1>Installationsanweisungen<a class="headerlink" href="#installationsanweisungen" title="Permalink to this heading"></a></h1>
<span id="software-installation"></span><h1>Installationsanweisungen<a class="headerlink" href="#installationsanweisungen" title="Link zu dieser Überschrift"></a></h1>
<p>Diese Anleitung dient dazu die Software auf dem Roboter neu aufzusetzen.</p>
<p><strong>Im normalen Gebraucht sollte dies jedoch nicht notwendig sein.</strong></p>
<div class="section" id="betriebssystem-aufsetzen">
<h2>Betriebssystem aufsetzen<a class="headerlink" href="#betriebssystem-aufsetzen" title="Permalink to this heading"></a></h2>
<h2>Betriebssystem aufsetzen<a class="headerlink" href="#betriebssystem-aufsetzen" title="Link zu dieser Überschrift"></a></h2>
<p>Als Basis wird für den Roboter Raspberry Pi OS (64-bit) verwendet. Das 32-Bit Betriebssystem wird nicht unterstützt, da die Software-Komponenten nur für aarch64 bzw. arm64/v8 kompiliert werden.
Genauere Informationen sind <a class="reference external" href="https://www.raspberrypi.com/software/operating-systems/">hier</a> zu finden.</p>
</div>
<div class="section" id="bearbeiten-der-boot-partition">
<h2>Bearbeiten der boot-Partition<a class="headerlink" href="#bearbeiten-der-boot-partition" title="Permalink to this heading"></a></h2>
<h2>Bearbeiten der boot-Partition<a class="headerlink" href="#bearbeiten-der-boot-partition" title="Link zu dieser Überschrift"></a></h2>
<ol class="arabic simple">
<li><p><code class="docutils literal notranslate"><span class="pre">cmdline.txt</span></code></p></li>
</ol>
@ -220,58 +129,33 @@ Genauere Informationen sind <a class="reference external" href="https://www.rasp
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../faq.html" class="btn btn-neutral float-right" title="FAQ" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
<a href="../gettingStarted/thridProgram.html" class="btn btn-neutral float-left" title="Mein drittes Programm" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="../gettingStarted/thridProgram.html" class="btn btn-neutral float-left" title="Mein drittes Programm" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Zurück</a>
<a href="../faq.html" class="btn btn-neutral float-right" title="FAQ" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
</p>
<p>&#169; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS).</p>
</div>
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
Erstellt mit <a href="https://www.sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>