diff --git a/docs/_build/doctrees/environment.pickle b/docs/_build/doctrees/environment.pickle index 5735dcf80a71c2365ffd47517bdb5e571de346bb..e56d919a441a01cbdbdc80497432168f82f7d9ab 100644 Binary files a/docs/_build/doctrees/environment.pickle and b/docs/_build/doctrees/environment.pickle differ diff --git a/docs/_build/doctrees/index.doctree b/docs/_build/doctrees/index.doctree index 0ebe889d45e55126288b2320d4eb6020a3d3f897..c924e02b3bc5de706158cadc046dae93df3b0221 100644 Binary files a/docs/_build/doctrees/index.doctree and b/docs/_build/doctrees/index.doctree differ diff --git a/docs/_build/doctrees/source.doctree b/docs/_build/doctrees/source.doctree index 8317ff31f25ef3b5725b91032f5ee4c5958c900c..834b2bb95a3a4350b02c089f95862be7b89c06ea 100644 Binary files a/docs/_build/doctrees/source.doctree and b/docs/_build/doctrees/source.doctree differ diff --git a/docs/_build/html/.buildinfo b/docs/_build/html/.buildinfo index 9913e41c15e309a7d4aca8a7a7f3d8fab489518f..33011b85fe9e5925e75776f5cc7f41f3635c1cbc 100644 --- a/docs/_build/html/.buildinfo +++ b/docs/_build/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 70c71ab2619acd6239b5f925f992173b +config: f6dfea19ce34289726db5c40b01bce0e tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_build/html/_static/classic.css b/docs/_build/html/_static/classic.css deleted file mode 100644 index d98894b3f666966797bc7444b3c43bfcfa4e1bc1..0000000000000000000000000000000000000000 --- a/docs/_build/html/_static/classic.css +++ /dev/null @@ -1,261 +0,0 @@ -/* - * default.css_t - * ~~~~~~~~~~~~~ - * - * Sphinx stylesheet -- default theme. - * - * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -@import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ - -body { - font-family: sans-serif; - font-size: 100%; - background-color: #11303d; - color: #000; - margin: 0; - padding: 0; -} - -div.document { - background-color: #1c4e63; -} - -div.documentwrapper { - float: left; - width: 100%; -} - -div.bodywrapper { - margin: 0 0 0 230px; -} - -div.body { - background-color: #ffffff; - color: #000000; - padding: 0 20px 30px 20px; -} - -div.footer { - color: #ffffff; - width: 100%; - padding: 9px 0 9px 0; - text-align: center; - font-size: 75%; -} - -div.footer a { - color: #ffffff; - text-decoration: underline; -} - -div.related { - background-color: #133f52; - line-height: 30px; - color: #ffffff; -} - -div.related a { - color: #ffffff; -} - -div.sphinxsidebar { -} - -div.sphinxsidebar h3 { - font-family: 'Trebuchet MS', sans-serif; - color: #ffffff; - font-size: 1.4em; - font-weight: normal; - margin: 0; - padding: 0; -} - -div.sphinxsidebar h3 a { - color: #ffffff; -} - -div.sphinxsidebar h4 { - font-family: 'Trebuchet MS', sans-serif; - color: #ffffff; - font-size: 1.3em; - font-weight: normal; - margin: 5px 0 0 0; - padding: 0; -} - -div.sphinxsidebar p { - color: #ffffff; -} - -div.sphinxsidebar p.topless { - margin: 5px 10px 10px 10px; -} - -div.sphinxsidebar ul { - margin: 10px; - padding: 0; - color: #ffffff; -} - -div.sphinxsidebar a { - color: #98dbcc; -} - -div.sphinxsidebar input { - border: 1px solid #98dbcc; - font-family: sans-serif; - font-size: 1em; -} - - - -/* -- hyperlink styles ------------------------------------------------------ */ - -a { - color: #355f7c; - text-decoration: none; -} - -a:visited { - color: #355f7c; - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - - - -/* -- body styles ----------------------------------------------------------- */ - -div.body h1, -div.body h2, -div.body h3, -div.body h4, -div.body h5, -div.body h6 { - font-family: 'Trebuchet MS', sans-serif; - background-color: #f2f2f2; - font-weight: normal; - color: #20435c; - border-bottom: 1px solid #ccc; - margin: 20px -20px 10px -20px; - padding: 3px 0 3px 10px; -} - -div.body h1 { margin-top: 0; font-size: 200%; } -div.body h2 { font-size: 160%; } -div.body h3 { font-size: 140%; } -div.body h4 { font-size: 120%; } -div.body h5 { font-size: 110%; } -div.body h6 { font-size: 100%; } - -a.headerlink { - color: #c60f0f; - font-size: 0.8em; - padding: 0 4px 0 4px; - text-decoration: none; -} - -a.headerlink:hover { - background-color: #c60f0f; - color: white; -} - -div.body p, div.body dd, div.body li, div.body blockquote { - text-align: justify; - line-height: 130%; -} - -div.admonition p.admonition-title + p { - display: inline; -} - -div.admonition p { - margin-bottom: 5px; -} - -div.admonition pre { - margin-bottom: 5px; -} - -div.admonition ul, div.admonition ol { - margin-bottom: 5px; -} - -div.note { - background-color: #eee; - border: 1px solid #ccc; -} - -div.seealso { - background-color: #ffc; - border: 1px solid #ff6; -} - -div.topic { - background-color: #eee; -} - -div.warning { - background-color: #ffe4e4; - border: 1px solid #f66; -} - -p.admonition-title { - display: inline; -} - -p.admonition-title:after { - content: ":"; -} - -pre { - padding: 5px; - background-color: #eeffcc; - color: #333333; - line-height: 120%; - border: 1px solid #ac9; - border-left: none; - border-right: none; -} - -code { - background-color: #ecf0f3; - padding: 0 1px 0 1px; - font-size: 0.95em; -} - -th { - background-color: #ede; -} - -.warning code { - background: #efc2c2; -} - -.note code { - background: #d6d6d6; -} - -.viewcode-back { - font-family: sans-serif; -} - -div.viewcode-block:target { - background-color: #f4debf; - border-top: 1px solid #ac9; - border-bottom: 1px solid #ac9; -} - -div.code-block-caption { - color: #efefef; - background-color: #1c4e63; -} \ No newline at end of file diff --git a/docs/_build/html/_static/sidebar.js b/docs/_build/html/_static/sidebar.js deleted file mode 100644 index 4282fe91c1c15c33f77bd171b8965d3aa1c148e9..0000000000000000000000000000000000000000 --- a/docs/_build/html/_static/sidebar.js +++ /dev/null @@ -1,159 +0,0 @@ -/* - * sidebar.js - * ~~~~~~~~~~ - * - * This script makes the Sphinx sidebar collapsible. - * - * .sphinxsidebar contains .sphinxsidebarwrapper. This script adds - * in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton - * used to collapse and expand the sidebar. - * - * When the sidebar is collapsed the .sphinxsidebarwrapper is hidden - * and the width of the sidebar and the margin-left of the document - * are decreased. When the sidebar is expanded the opposite happens. - * This script saves a per-browser/per-session cookie used to - * remember the position of the sidebar among the pages. - * Once the browser is closed the cookie is deleted and the position - * reset to the default (expanded). - * - * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -$(function() { - - - - - - - - - // global elements used by the functions. - // the 'sidebarbutton' element is defined as global after its - // creation, in the add_sidebar_button function - var bodywrapper = $('.bodywrapper'); - var sidebar = $('.sphinxsidebar'); - var sidebarwrapper = $('.sphinxsidebarwrapper'); - - // for some reason, the document has no sidebar; do not run into errors - if (!sidebar.length) return; - - // original margin-left of the bodywrapper and width of the sidebar - // with the sidebar expanded - var bw_margin_expanded = bodywrapper.css('margin-left'); - var ssb_width_expanded = sidebar.width(); - - // margin-left of the bodywrapper and width of the sidebar - // with the sidebar collapsed - var bw_margin_collapsed = '.8em'; - var ssb_width_collapsed = '.8em'; - - // colors used by the current theme - var dark_color = $('.related').css('background-color'); - var light_color = $('.document').css('background-color'); - - function sidebar_is_collapsed() { - return sidebarwrapper.is(':not(:visible)'); - } - - function toggle_sidebar() { - if (sidebar_is_collapsed()) - expand_sidebar(); - else - collapse_sidebar(); - } - - function collapse_sidebar() { - sidebarwrapper.hide(); - sidebar.css('width', ssb_width_collapsed); - bodywrapper.css('margin-left', bw_margin_collapsed); - sidebarbutton.css({ - 'margin-left': '0', - 'height': bodywrapper.height() - }); - sidebarbutton.find('span').text('»'); - sidebarbutton.attr('title', _('Expand sidebar')); - document.cookie = 'sidebar=collapsed'; - } - - function expand_sidebar() { - bodywrapper.css('margin-left', bw_margin_expanded); - sidebar.css('width', ssb_width_expanded); - sidebarwrapper.show(); - sidebarbutton.css({ - 'margin-left': ssb_width_expanded-12, - 'height': bodywrapper.height() - }); - sidebarbutton.find('span').text('«'); - sidebarbutton.attr('title', _('Collapse sidebar')); - document.cookie = 'sidebar=expanded'; - } - - function add_sidebar_button() { - sidebarwrapper.css({ - 'float': 'left', - 'margin-right': '0', - 'width': ssb_width_expanded - 28 - }); - // create the button - sidebar.append( - '<div id="sidebarbutton"><span>«</span></div>' - ); - var sidebarbutton = $('#sidebarbutton'); - light_color = sidebarbutton.css('background-color'); - // find the height of the viewport to center the '<<' in the page - var viewport_height; - if (window.innerHeight) - viewport_height = window.innerHeight; - else - viewport_height = $(window).height(); - sidebarbutton.find('span').css({ - 'display': 'block', - 'margin-top': (viewport_height - sidebar.position().top - 20) / 2 - }); - - sidebarbutton.click(toggle_sidebar); - sidebarbutton.attr('title', _('Collapse sidebar')); - sidebarbutton.css({ - 'color': '#FFFFFF', - 'border-left': '1px solid ' + dark_color, - 'font-size': '1.2em', - 'cursor': 'pointer', - 'height': bodywrapper.height(), - 'padding-top': '1px', - 'margin-left': ssb_width_expanded - 12 - }); - - sidebarbutton.hover( - function () { - $(this).css('background-color', dark_color); - }, - function () { - $(this).css('background-color', light_color); - } - ); - } - - function set_position_from_cookie() { - if (!document.cookie) - return; - var items = document.cookie.split(';'); - for(var k=0; k<items.length; k++) { - var key_val = items[k].split('='); - var key = key_val[0].replace(/ /, ""); // strip leading spaces - if (key == 'sidebar') { - var value = key_val[1]; - if ((value == 'collapsed') && (!sidebar_is_collapsed())) - collapse_sidebar(); - else if ((value == 'expanded') && (sidebar_is_collapsed())) - expand_sidebar(); - } - } - } - - add_sidebar_button(); - var sidebarbutton = $('#sidebarbutton'); - set_position_from_cookie(); -}); \ No newline at end of file diff --git a/docs/_build/html/genindex.html b/docs/_build/html/genindex.html index 3cc23860e02e042d5a79b40898ea9c9e44b35174..55ed792927057c92e4e6b6b99904960a4ee1689c 100644 --- a/docs/_build/html/genindex.html +++ b/docs/_build/html/genindex.html @@ -6,7 +6,7 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>Index — Mindstorms EV3 Toolbox v0.3-rc.6 documentation</title> + <title>Index — Mindstorms EV3 Toolbox v0.3-rc.8 documentation</title> <link rel="stylesheet" href="_static/basic.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> @@ -17,7 +17,7 @@ <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: './', - VERSION: 'v0.3-rc.6', + VERSION: 'v0.3-rc.8', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -32,7 +32,7 @@ <script type="text/javascript" src="_static/bootstrap-sphinx.js"></script> <link rel="index" title="Index" href="#" /> <link rel="search" title="Search" href="search.html" /> - <link rel="top" title="Mindstorms EV3 Toolbox v0.3-rc.6 documentation" href="index.html" /> + <link rel="top" title="Mindstorms EV3 Toolbox v0.3-rc.8 documentation" href="index.html" /> <meta charset='utf-8'> <meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'> <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'> @@ -457,7 +457,7 @@ </p> <p> - © Copyright 2016, Tim Stadtmann.<br/> + © Copyright 2016, LfB RWTH-Aachen.<br/> Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.8.<br/> </p> </div> diff --git a/docs/_build/html/index.html b/docs/_build/html/index.html index 54063e1552c022407d38a7baad25ffcdca0c6c56..1a77eb36a422b46413cd3157719b0c0b80e5bb6b 100644 --- a/docs/_build/html/index.html +++ b/docs/_build/html/index.html @@ -5,7 +5,7 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>Toolbox for controlling Lego Mindstorms EV3 with MATLAB — Mindstorms EV3 Toolbox v0.3-rc.6 documentation</title> + <title>Toolbox for controlling Lego Mindstorms EV3 with MATLAB — Mindstorms EV3 Toolbox v0.3-rc.8 documentation</title> <link rel="stylesheet" href="_static/basic.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> @@ -16,7 +16,7 @@ <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: './', - VERSION: 'v0.3-rc.6', + VERSION: 'v0.3-rc.8', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -31,7 +31,7 @@ <script type="text/javascript" src="_static/bootstrap-sphinx.js"></script> <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="search.html" /> - <link rel="top" title="Mindstorms EV3 Toolbox v0.3-rc.6 documentation" href="#" /> + <link rel="top" title="Mindstorms EV3 Toolbox v0.3-rc.8 documentation" href="#" /> <link rel="next" title="EV3" href="source.html" /> <meta charset='utf-8'> <meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'> @@ -161,7 +161,7 @@ </p> <p> - © Copyright 2016, Tim Stadtmann.<br/> + © Copyright 2016, LfB RWTH-Aachen.<br/> Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.8.<br/> </p> </div> diff --git a/docs/_build/html/mat-modindex.html b/docs/_build/html/mat-modindex.html index d450e57cc120dec3dbcb344d0ce7de9ea4ceb414..60f8734737f102722b945393c8287623673d3eea 100644 --- a/docs/_build/html/mat-modindex.html +++ b/docs/_build/html/mat-modindex.html @@ -5,7 +5,7 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>MATLAB Module Index — Mindstorms EV3 Toolbox v0.3-rc.6 documentation</title> + <title>MATLAB Module Index — Mindstorms EV3 Toolbox v0.3-rc.8 documentation</title> <link rel="stylesheet" href="_static/basic.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> @@ -16,7 +16,7 @@ <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: './', - VERSION: 'v0.3-rc.6', + VERSION: 'v0.3-rc.8', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -31,7 +31,7 @@ <script type="text/javascript" src="_static/bootstrap-sphinx.js"></script> <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="search.html" /> - <link rel="top" title="Mindstorms EV3 Toolbox v0.3-rc.6 documentation" href="index.html" /> + <link rel="top" title="Mindstorms EV3 Toolbox v0.3-rc.8 documentation" href="index.html" /> <meta charset='utf-8'> <meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'> @@ -153,7 +153,7 @@ </p> <p> - © Copyright 2016, Tim Stadtmann.<br/> + © Copyright 2016, LfB RWTH-Aachen.<br/> Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.8.<br/> </p> </div> diff --git a/docs/_build/html/search.html b/docs/_build/html/search.html index 934f74f85f4c3fdb972c65235a6a1d06434f327a..d283a355159d26e573baf0c257c8ae15ec5b9961 100644 --- a/docs/_build/html/search.html +++ b/docs/_build/html/search.html @@ -5,7 +5,7 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>Search — Mindstorms EV3 Toolbox v0.3-rc.6 documentation</title> + <title>Search — Mindstorms EV3 Toolbox v0.3-rc.8 documentation</title> <link rel="stylesheet" href="_static/basic.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> @@ -16,7 +16,7 @@ <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: './', - VERSION: 'v0.3-rc.6', + VERSION: 'v0.3-rc.8', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -32,7 +32,7 @@ <script type="text/javascript" src="_static/bootstrap-sphinx.js"></script> <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="#" /> - <link rel="top" title="Mindstorms EV3 Toolbox v0.3-rc.6 documentation" href="index.html" /> + <link rel="top" title="Mindstorms EV3 Toolbox v0.3-rc.8 documentation" href="index.html" /> <script type="text/javascript"> jQuery(function() { Search.loadIndex("searchindex.js"); }); </script> @@ -158,7 +158,7 @@ </p> <p> - © Copyright 2016, Tim Stadtmann.<br/> + © Copyright 2016, LfB RWTH-Aachen.<br/> Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.8.<br/> </p> </div> diff --git a/docs/_build/html/searchindex.js b/docs/_build/html/searchindex.js index 505a810a5d37b68e7a472bd976b18d32419326d6..23a17e23203e82d88d2a3747e419285fb754d418 100644 --- a/docs/_build/html/searchindex.js +++ b/docs/_build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({envversion:49,filenames:["index","source"],objects:{"":{source:[1,0,1,""]},"source.EV3":{batteryMode:[1,2,1,""],batteryValue:[1,2,1,""],beep:[1,3,1,""],connect:[1,3,1,""],debug:[1,2,1,""],disconnect:[1,3,1,""],isConnected:[1,2,1,""],motorA:[1,2,1,""],motorB:[1,2,1,""],motorC:[1,2,1,""],motorD:[1,2,1,""],playTone:[1,3,1,""],sensor1:[1,2,1,""],sensor2:[1,2,1,""],sensor3:[1,2,1,""],sensor4:[1,2,1,""],setProperties:[1,3,1,""],stopAllMotors:[1,3,1,""],stopTone:[1,3,1,""],tonePlayed:[1,3,1,""]},"source.Motor":{brakeMode:[1,2,1,""],currentSpeed:[1,2,1,""],debug:[1,2,1,""],internalReset:[1,3,1,""],isRunning:[1,2,1,""],limitMode:[1,2,1,""],limitValue:[1,2,1,""],power:[1,2,1,""],resetTachoCount:[1,3,1,""],setBrake:[1,3,1,""],setProperties:[1,3,1,""],smoothStart:[1,2,1,""],smoothStop:[1,2,1,""],speedRegulation:[1,2,1,""],start:[1,3,1,""],stop:[1,3,1,""],syncedStart:[1,3,1,""],syncedStop:[1,3,1,""],tachoCount:[1,2,1,""],type:[1,2,1,""],waitFor:[1,3,1,""]},"source.Sensor":{debug:[1,2,1,""],mode:[1,2,1,""],reset:[1,3,1,""],setProperties:[1,3,1,""],type:[1,2,1,""],value:[1,2,1,""]},source:{EV3:[1,1,1,""],Motor:[1,1,1,""],Sensor:[1,1,1,""]}},objnames:{"0":["mat","module","MATLAB module"],"1":["mat","class","MATLAB class"],"2":["mat","attribute","MATLAB attribute"],"3":["mat","method","MATLAB method"]},objtypes:{"0":"mat:module","1":"mat:class","2":"mat:attribute","3":"mat:method"},terms:{"5000hz":1,"case":1,"catch":1,"class":1,"default":1,"function":1,"long":1,"return":1,"true":1,"try":1,"while":1,about:1,acceler:1,accident:1,act:1,actual:1,affect:1,afraid:1,after:1,again:1,all:1,allow:1,alreadi:1,also:1,alternatingli:1,ambient:1,angular:1,ani:1,anoth:1,apply:1,aren:1,around:1,ask:1,automat:1,avail:1,avoid:1,batteri:1,batterymod:1,batterymode:1,batteryvalu:1,been:1,beep:1,befor:1,behav:1,behaviour:1,bit:1,bool:1,both:1,brake:1,brakemod:1,brick:1,bug:1,buggi:1,bump:1,c_output:1,call:1,can:1,cannot:1,central:1,chang:1,charg:1,check:1,clear:1,coast:1,code:1,col:1,color:1,comm:1,command:1,comment:1,commun:1,confus:1,connect:1,connectiontyp:1,consist:1,consol:1,constantli:1,content:0,continu:1,conveni:1,correctli:1,count:1,counter:1,cours:1,creat:1,current:1,currentspe:1,debug:1,defin:1,degre:1,delet:1,deliber:1,deliv:1,depend:1,descript:1,desir:1,destroi:1,dev:1,devic:1,devicemod:1,devicetyp:1,differ:1,direct:1,disconnect:1,distcm:1,distin:1,doe:1,doesn:1,don:1,done:1,down:1,durat:1,each:1,eas:1,effect:1,either:1,enabl:1,equal:1,error:1,establish:1,even:1,everytim:1,exampl:1,excerpt:1,execut:1,exit:1,expect:1,facilit:1,fals:1,far:1,feedback:1,finish:1,firmwar:1,first:1,follow:1,forward:1,four:1,frequenc:1,from:1,fun:1,get:1,given:1,glanc:1,goe:1,greater:1,gyro:1,happen:1,have:1,heavi:1,high:1,highest:1,hold:1,how:1,howev:1,hysic:1,immedi:1,index:0,indic:1,individu:1,infinit:1,infrare:1,input:1,inputpars:1,instanc:1,instead:1,interfac:1,intern:1,internalreset:1,interpret:1,isconnect:1,isrun:1,iter:1,itself:1,keep:1,kind:1,know:1,largemotor:1,last:1,later:1,layer:1,lead:1,left:1,less:1,level:1,like:1,limit:1,limitmod:1,limitvalu:1,listen:1,load:1,loop:1,low:1,lower:1,mai:1,mainli:1,make:1,manual:1,master:1,mean:1,mediummotor:1,messag:1,method:1,millisecond:1,mind:1,mode:1,modul:0,mostli:1,motor:[],motora:1,motorb:1,motorc:1,motord:1,move:1,multipl:1,necessari:1,need:1,neg:1,none:1,note:1,now:1,numer:1,nxtcolor:1,nxtlight:1,nxtsound:1,nxttemperatur:1,nxttouch:1,nxtultrason:1,object:1,off:1,old:1,onc:1,once:1,onli:1,only:1,opcod:1,opposit:1,optional:1,other:1,otherwis:1,output:1,outputreadi:1,outputtest:1,packet:1,page:0,paramet:1,pass:1,path:1,paus:1,percent:1,percentag:1,physic:1,plai:1,playton:1,point:1,poll:1,port:1,posit:1,possibl:1,power:1,pretti:1,previous:1,print:1,probabl:1,program:1,properti:1,pull:1,push:1,rais:1,rate:1,ratio:1,reach:1,read:1,realli:1,reason:1,receiv:1,reflect:1,regul:1,releas:1,repli:1,repres:1,request:1,reset:1,resettachocount:1,respect:1,respons:1,result:1,rfcomm0:1,rfcomm1:1,rfcomm2:1,right:1,run:1,same:1,search:0,second:1,secur:1,see:1,seem:1,send:1,sensor1:1,sensor2:1,sensor3:1,sensor4:1,sensor:[],sent:1,serial:1,serport:1,set:1,setbrak:1,setpow:1,setproperti:1,should:1,slave:1,slow:1,slowli:1,smoothli:1,smoothstart:1,smoothstop:1,some:1,sometim:1,somewhat:1,soon:1,sooner:1,sourc:1,special:1,specifi:1,speed:1,speedregul:1,spin:1,start:1,state:1,statu:1,stop:1,stopallmotor:1,stopton:1,straight:1,string:1,stuff:1,sublay:1,suppos:1,sync:1,syncedstart:1,syncedstop:1,synchron:1,syncmotor:1,tacho:1,tachocount:1,tacholimit:1,take:1,test:1,than:1,them:1,thi:1,thoroughli:1,tight:1,time:1,timeout:1,tone:1,toneplai:1,too:1,touch:1,tricki:1,turn:1,turn_ratio:1,turnratio:1,type:1,ultrason:1,undefin:1,unexpect:1,unknown:1,until:1,usb:1,use:1,user:1,valu:1,varargin:1,via:1,view:1,virtual:1,voltag:1,volum:1,waitfor:1,want:1,wast:1,weird:1,what:1,whatev:1,when:1,which:1,without:1,work:1,workaround:1,would:1,wrap:1,writable:1,wrong:1,yet:1,you:1,zero:1},titles:["Toolbox for controlling Lego Mindstorms EV3 with MATLAB","EV3"],titleterms:{control:0,ev3:[0,1],indice:0,lego:0,matlab:0,mindstorm:0,motor:1,sensor:1,tabl:0,toolbox:0}}) \ No newline at end of file +Search.setIndex({envversion:49,filenames:["index","source"],objects:{"":{source:[1,0,1,""]},"source.EV3":{batteryMode:[1,2,1,""],batteryValue:[1,2,1,""],beep:[1,3,1,""],connect:[1,3,1,""],debug:[1,2,1,""],disconnect:[1,3,1,""],isConnected:[1,2,1,""],motorA:[1,2,1,""],motorB:[1,2,1,""],motorC:[1,2,1,""],motorD:[1,2,1,""],playTone:[1,3,1,""],sensor1:[1,2,1,""],sensor2:[1,2,1,""],sensor3:[1,2,1,""],sensor4:[1,2,1,""],setProperties:[1,3,1,""],stopAllMotors:[1,3,1,""],stopTone:[1,3,1,""],tonePlayed:[1,3,1,""]},"source.Motor":{brakeMode:[1,2,1,""],currentSpeed:[1,2,1,""],debug:[1,2,1,""],internalReset:[1,3,1,""],isRunning:[1,2,1,""],limitMode:[1,2,1,""],limitValue:[1,2,1,""],power:[1,2,1,""],resetTachoCount:[1,3,1,""],setBrake:[1,3,1,""],setProperties:[1,3,1,""],smoothStart:[1,2,1,""],smoothStop:[1,2,1,""],speedRegulation:[1,2,1,""],start:[1,3,1,""],stop:[1,3,1,""],syncedStart:[1,3,1,""],syncedStop:[1,3,1,""],tachoCount:[1,2,1,""],type:[1,2,1,""],waitFor:[1,3,1,""]},"source.Sensor":{debug:[1,2,1,""],mode:[1,2,1,""],reset:[1,3,1,""],setProperties:[1,3,1,""],type:[1,2,1,""],value:[1,2,1,""]},source:{EV3:[1,1,1,""],Motor:[1,1,1,""],Sensor:[1,1,1,""]}},objnames:{"0":["mat","module","MATLAB module"],"1":["mat","class","MATLAB class"],"2":["mat","attribute","MATLAB attribute"],"3":["mat","method","MATLAB method"]},objtypes:{"0":"mat:module","1":"mat:class","2":"mat:attribute","3":"mat:method"},terms:{"5000hz":1,"case":1,"catch":1,"class":1,"default":1,"function":1,"long":1,"return":1,"true":1,"try":1,"while":1,about:1,acceler:1,accident:1,act:1,actual:1,affect:1,afraid:1,after:1,again:1,all:1,allow:1,alreadi:1,also:1,alternatingli:1,ambient:1,angular:1,ani:1,anoth:1,apply:1,aren:1,around:1,ask:1,automat:1,avail:1,avoid:1,batteri:1,batterymod:1,batterymode:1,batteryvalu:1,been:1,beep:1,befor:1,behav:1,behaviour:1,better:1,bit:1,bluetooth:1,bool:1,both:1,brake:1,brakemod:1,brick:1,bug:1,buggi:1,bump:1,c_output:1,call:1,can:1,cannot:1,central:1,chang:1,charg:1,check:1,clear:1,coast:1,code:1,col:1,color:1,com:1,comm:1,command:1,comment:1,commun:1,confus:1,connect:1,connectiontyp:1,consist:1,consol:1,constantli:1,content:0,continu:1,conveni:1,correctli:1,count:1,counter:1,cours:1,creat:1,current:1,currentspe:1,debug:1,defin:1,degre:1,delet:1,deliber:1,deliv:1,depend:1,descript:[],desir:1,destroi:1,dev:1,devic:1,devicemod:1,devicetyp:1,differ:1,direct:1,disconnect:1,distcm:1,distin:1,doe:1,doesn:1,don:1,done:1,down:1,durat:1,each:1,eas:1,effect:1,either:1,enabl:1,equal:1,error:1,establish:1,even:1,everytim:1,exampl:1,excerpt:1,execut:1,exit:1,expect:1,facilit:1,fals:1,far:1,feedback:1,finish:1,firmwar:1,first:1,follow:1,forward:1,four:1,frequenc:1,from:1,fun:1,get:1,given:1,glanc:1,goe:1,greater:1,gyro:1,happen:1,have:1,heavi:1,hertz:1,high:1,highest:1,hold:1,how:1,howev:1,hysic:1,immedi:1,index:0,indic:1,individu:1,infinit:1,infrare:1,input:1,inputpars:1,instanc:1,instead:1,interfac:1,intern:1,internalreset:1,interpret:1,isconnect:1,isrun:1,iter:1,itself:1,keep:1,kind:1,know:1,largemotor:1,last:1,later:1,layer:1,lead:1,left:1,less:1,level:1,like:1,limit:1,limitmod:1,limitvalu:1,listen:1,load:1,loop:1,low:1,lower:1,mai:1,mainli:1,make:1,manual:1,master:1,mean:1,mediummotor:1,messag:1,method:1,millisecond:1,mind:1,mode:1,modul:0,mostli:1,motor:[],motora:1,motorb:1,motorc:1,motord:1,move:1,multipl:1,name:1,necessari:1,need:1,neg:1,none:1,note:1,now:1,numer:1,nxtcolor:1,nxtlight:1,nxtsound:1,nxttemperatur:1,nxttouch:1,nxtultrason:1,object:1,off:1,old:1,onc:1,once:1,onli:1,only:1,opcod:1,opposit:1,optional:1,other:1,otherwis:1,output:1,outputreadi:1,outputtest:1,packet:1,page:0,paramet:1,pass:1,path:1,paus:1,percent:1,percentag:1,physic:1,plai:1,playton:1,point:1,poll:1,port:1,posit:1,possibl:1,power:1,pretti:1,previous:1,print:1,probabl:1,program:1,properti:1,pull:1,push:1,rais:1,rate:1,ratio:1,reach:1,read:1,realli:1,reason:1,receiv:1,reflect:1,regul:1,releas:1,repli:1,repres:1,request:1,reset:1,resetposit:1,resettachocount:1,respect:1,respons:1,result:1,rfcomm0:1,rfcomm1:1,rfcomm2:1,right:1,run:1,same:1,search:0,second:1,secur:1,see:1,seem:1,send:1,sensor1:1,sensor2:1,sensor3:1,sensor4:1,sensor:[],sent:1,serial:1,serport:1,set:1,setbrak:1,setpow:1,setproperti:1,setup:1,should:1,slave:1,slow:1,slowli:1,smoothli:1,smoothstart:1,smoothstop:1,some:1,sometim:1,somewhat:1,soon:1,sooner:1,sourc:1,special:1,specifi:1,speed:1,speedregul:1,spin:1,start:1,state:1,statu:1,stop:1,stopallmotor:1,stopton:1,straight:1,string:1,stuff:1,sublay:1,suppos:1,sync:1,syncedstart:1,syncedstop:1,synchron:1,syncmotor:1,tacho:1,tachocount:1,tacholimit:1,take:1,test:1,than:1,them:1,thi:1,thoroughli:1,tight:1,time:1,timeout:1,tone:1,toneplai:1,too:1,touch:1,tricki:1,turn:1,turn_ratio:[],turnratio:1,type:1,ultrason:1,undefin:1,unexpect:1,unknown:1,until:1,usb:1,use:1,user:1,valu:1,varargin:1,via:1,view:1,virtual:1,voltag:1,volum:1,waitfor:1,want:1,wast:1,weird:1,what:1,whatev:1,when:1,which:1,without:1,work:1,workaround:1,would:1,wrap:1,writable:1,wrong:1,yet:1,you:1,zero:1},titles:["Toolbox for controlling Lego Mindstorms EV3 with MATLAB","EV3"],titleterms:{control:0,ev3:[0,1],indice:0,lego:0,matlab:0,mindstorm:0,motor:1,sensor:1,tabl:0,toolbox:0}}) \ No newline at end of file diff --git a/docs/_build/html/source.html b/docs/_build/html/source.html index 034dfb7b65e39ecad962f52f4d93207e5145c87a..f88c5c1c82f7a33be8a99fd1603792f6e9a73900 100644 --- a/docs/_build/html/source.html +++ b/docs/_build/html/source.html @@ -5,7 +5,7 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>EV3 — Mindstorms EV3 Toolbox v0.3-rc.6 documentation</title> + <title>EV3 — Mindstorms EV3 Toolbox v0.3-rc.8 documentation</title> <link rel="stylesheet" href="_static/basic.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> @@ -16,7 +16,7 @@ <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: './', - VERSION: 'v0.3-rc.6', + VERSION: 'v0.3-rc.8', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -31,7 +31,7 @@ <script type="text/javascript" src="_static/bootstrap-sphinx.js"></script> <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="search.html" /> - <link rel="top" title="Mindstorms EV3 Toolbox v0.3-rc.6 documentation" href="index.html" /> + <link rel="top" title="Mindstorms EV3 Toolbox v0.3-rc.8 documentation" href="index.html" /> <link rel="prev" title="Toolbox for controlling Lego Mindstorms EV3 with MATLAB" href="index.html" /> <meta charset='utf-8'> <meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'> @@ -195,11 +195,11 @@ been thoroughly tested yet, but seems to work on a first glance.</li> <dl class="attribute"> <dt id="source.EV3.debug"> <code class="descname">debug</code><a class="headerlink" href="#source.EV3.debug" title="Permalink to this definition">¶</a></dt> -<dd><p><em>numeric in {0,1,2}</em> – Debug mode. [<strong>WRITABLE</strong>]</p> +<dd><p><em>numeric in {0,1,2}</em> – Debug mode. <em>[WRITABLE]</em></p> <ul class="simple"> <li>0: Debug turned off</li> <li>1: Debug turned on for EV3-object -> enables feedback in the console about what firmware-commands have been called when using a method</li> -<li>2: Low-level-Debug turned on - each packet sent and received is printed to the console</li> +<li>2: Low-level-Debug turned on -> each packet sent and received is printed to the console</li> </ul> </dd></dl> @@ -207,29 +207,32 @@ been thoroughly tested yet, but seems to work on a first glance.</li> <dt id="source.EV3.batteryMode"> <code class="descname">batteryMode</code><a class="headerlink" href="#source.EV3.batteryMode" title="Permalink to this definition">¶</a></dt> <dd><p><em>string in {‘Percentage’, ‘Voltage’}</em> – Mode for reading battery charge. -[<strong>WRITABLE</strong>]</p> +<em>[WRITABLE]</em></p> </dd></dl> <dl class="attribute"> <dt id="source.EV3.batteryValue"> <code class="descname">batteryValue</code><a class="headerlink" href="#source.EV3.batteryValue" title="Permalink to this definition">¶</a></dt> <dd><p><em>numeric</em> – Current battery charge. Depending on batteryMode, the reading -is either in percentage or voltage. [<strong>READ-ONLY</strong>]</p> +is either in percentage or voltage. <em>[READ-ONLY]</em></p> </dd></dl> <dl class="attribute"> <dt id="source.EV3.isConnected"> <code class="descname">isConnected</code><a class="headerlink" href="#source.EV3.isConnected" title="Permalink to this definition">¶</a></dt> -<dd><p><em>bool</em> – True if virtual brick-object is connected to physical one. [<strong>READ-ONLY</strong>]</p> +<dd><p><em>bool</em> – True if virtual brick-object is connected to physical one. <em>[READ-ONLY]</em></p> </dd></dl> <p class="rubric">Examples</p> <p>b = EV3(); <br /> b.connect(‘usb’); <br /> ma = b.motorA; <br /> +ma.setProperties(‘power’, 50, ‘limitValue’, 720); <br /> ma.start(); <br /> % fun <br /> -ma.stop(); <br /> +b.sensor1.value <br /> +b.waitFor(); <br /> +b.beep(); <br /> delete b; <br /></p> <dl class="method"> <dt id="source.EV3.beep"> @@ -240,9 +243,9 @@ delete b; <br /></p> <li>This equals playTone(10, 1000, 100) (Wraps the same opCode in comm-layer)</li> </ul> <p class="rubric">Example</p> -<p>b = EV3(); -b.connect(‘bt’, ‘serPort’, ‘/dev/rfcomm0’); -b.beep();</p> +<p>b = EV3(); <br /> +b.connect(‘bt’, ‘serPort’, ‘/dev/rfcomm0’); <br /> +b.beep(); <br /></p> </dd></dl> <dl class="method"> @@ -255,7 +258,7 @@ b.beep();</p> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> <li><strong>connectionType</strong> (<em>string in {'bt', 'usb'}</em>) – Connection type</li> -<li><strong>serPort</strong> (<em>string {'/dev/rfcomm1', '/dev/rfcomm2', ...}</em>) – Path to serial port +<li><strong>serPort</strong> (<em>string in {'/dev/rfcomm1', '/dev/rfcomm2', ...}</em>) – Path to serial port (if ‘bt’)</li> <li><strong>beep</strong> (<em>bool</em>) – If true, EV3 beeps if connection has been established</li> </ul> @@ -264,8 +267,12 @@ b.beep();</p> </tbody> </table> <p class="rubric">Examples</p> -<p>b = EV3(); b.connect(‘bt’, ‘serPort’, ‘/dev/rfcomm0’); -b = EV3(); b.connect(‘usb’, ‘beep’, ‘on’, );</p> +<p>% Setup bluetooth connection via com-port 0 <br /> +b = EV3(); <br /> +b.connect(‘bt’, ‘serPort’, ‘/dev/rfcomm0’); <br /> +% Setup usb connection, beep when connection has been established +b = EV3(); <br /> +b.connect(‘usb’, ‘beep’, ‘on’, ); <br /></p> <p>Check connection</p> </dd></dl> @@ -294,8 +301,8 @@ b.disconnect();</p> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> -<li><strong>volume</strong> (<em>numeric in [0, 100]</em>) – </li> -<li><strong>frequency</strong> (<em>numeric in [250, 10000]</em>) – </li> +<li><strong>volume</strong> (<em>numeric in [0, 100]</em>) – in percent</li> +<li><strong>frequency</strong> (<em>numeric in [250, 10000]</em>) – in Hertz</li> <li><strong>duration</strong> (<em>numeric >0</em>) – in milliseconds</li> </ul> </td> @@ -303,11 +310,10 @@ b.disconnect();</p> </tbody> </table> <p class="rubric">Example</p> -<p>b = EV3(); -b.connect(‘bt’, ‘serPort’, ‘/dev/rfcomm0’); -b.playTone(50, 5000, 1000); % Plays tone with 50% volume and 5000Hz for 1</p> -<blockquote> -<div>% second.</div></blockquote> +<p>b = EV3(); <br /> +b.connect(‘bt’, ‘serPort’, ‘/dev/rfcomm0’); <br /> +b.playTone(50, 5000, 1000); % Plays tone with 50% volume and 5000Hz for 1 +second. <br /></p> </dd></dl> <dl class="method"> @@ -319,18 +325,18 @@ b.playTone(50, 5000, 1000); % Plays tone with 50% volume and 5000Hz for 1</p> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> -<li><strong>debug</strong> (<em>numeric in {0,1,2}</em>) – see EV3.debug</li> -<li><strong>batteryMode</strong> (<em>string in {'Voltage'/'Percentage'}</em>) – see EV3.batteryMode</li> +<li><strong>debug</strong> (<em>numeric in {0,1,2}</em>) – see EV3.debug <em>[OPTIONAL]</em></li> +<li><strong>batteryMode</strong> (<em>string in {'Voltage'/'Percentage'}</em>) – see EV3.batteryMode <em>[OPTIONAL]</em></li> </ul> </td> </tr> </tbody> </table> <p class="rubric">Example</p> -<p>b = EV3(); -b.connect(‘bt’, ‘serPort’, ‘/dev/rfcomm0’); -b.setProperties(‘debug’, ‘on’, ‘batteryMode’, ‘Voltage’); -% Instead of: b.debug = ‘on’; b.batteryMode = ‘Voltage’;</p> +<p>b = EV3(); <br /> +b.connect(‘bt’, ‘serPort’, ‘/dev/rfcomm0’); <br /> +b.setProperties(‘debug’, ‘on’, ‘batteryMode’, ‘Voltage’); <br /> +% Instead of: b.debug = ‘on’; b.batteryMode = ‘Voltage’; <br /></p> <p>See also EV3.DEBUG, EV3.BATTERYMODE</p> </dd></dl> @@ -345,10 +351,10 @@ b.setProperties(‘debug’, ‘on’, ‘batteryMode’ <code class="descname">stopTone</code><span class="sig-paren">(</span><em>ev3</em><span class="sig-paren">)</span><a class="headerlink" href="#source.EV3.stopTone" title="Permalink to this definition">¶</a></dt> <dd><p>Stops tone currently played</p> <p class="rubric">Example</p> -<p>b = EV3(); -b.connect(‘bt’, ‘serPort’, ‘/dev/rfcomm0’); -b.playTone(10,100,100000000); % Accidentally given wrong tone duration. -b.stopTone(); % Stops tone immediately.</p> +<p>b = EV3(); <br /> +b.connect(‘bt’, ‘serPort’, ‘/dev/rfcomm0’); <br /> +b.playTone(10,100,100000000); % Accidentally given wrong tone duration :) <br /> +b.stopTone(); % Stops tone immediately. <br /></p> </dd></dl> <dl class="method"> @@ -367,11 +373,11 @@ b.stopTone(); % Stops tone immediately.</p> </table> <dl class="docutils"> <dt>Example</dt> -<dd>b = EV3(); -b.connect(‘bt’, ‘serPort’, ‘/dev/rfcomm0’); -b.playTone(10, 100, 1000); -pause(0.5); -b.tonePlayed() -> Outputs 1 to console.</dd> +<dd>b = EV3(); <br /> +b.connect(‘bt’, ‘serPort’, ‘/dev/rfcomm0’); <br /> +b.playTone(10, 100, 1000); <br /> +pause(0.5); <br /> +b.tonePlayed() -> Outputs 1 to console. <br /></dd> </dl> </dd></dl> @@ -396,7 +402,7 @@ instances for each motor port, and you can work with them via the EV3-object.</l <dl class="attribute"> <dt id="source.Motor.power"> <code class="descname">power</code><a class="headerlink" href="#source.Motor.power" title="Permalink to this definition">¶</a></dt> -<dd><p><em>numeric in [-100, 100]</em> – Power level of motor in percent. [WRITABLE]</p> +<dd><p><em>numeric in [-100, 100]</em> – Power level of motor in percent. <em>[WRITABLE]</em></p> </dd></dl> <dl class="attribute"> @@ -407,7 +413,7 @@ try to ‘hold’ its speed at given power level, whatever the load. In highest possible speed depends on the load and mostly goes up to around 70-80 (at this point, the Brick internally input 100% power). When turned off, motor will constantly input the same power into the motor. The resulting speed will be -somewhat lower, depending on the load. [WRITABLE]</p> +somewhat lower, depending on the load. <em>[WRITABLE]</em></p> </dd></dl> <dl class="attribute"> @@ -417,7 +423,7 @@ somewhat lower, depending on the load. [WRITABLE]</p> indicating how far/long the motor should smoothly start. Depending on limitMode, the input is interpreted either in degrees or milliseconds. The first {smoothStart}-milliseconds/degrees of limitValue the motor will slowly accelerate -until reaching its defined speed. [WRITABLE]</p> +until reaching its defined speed. <em>[WRITABLE]</em></p> </dd></dl> <dl class="attribute"> @@ -427,7 +433,7 @@ until reaching its defined speed. [WRITABLE]</p> indicating how far/long the motor should smoothly stop. Depending on limitMode, the input is interpreted either in degrees or milliseconds. The last [smoothStop]-milliseconds/degrees of limitValue the motor will slowly slow down -until it has stopped. [WRITABLE]</p> +until it has stopped. <em>[WRITABLE]</em></p> </dd></dl> <dl class="attribute"> @@ -435,13 +441,13 @@ until it has stopped. [WRITABLE]</p> <code class="descname">limitValue</code><a class="headerlink" href="#source.Motor.limitValue" title="Permalink to this definition">¶</a></dt> <dd><p><em>numeric>=0</em> – Degrees/Time indicating how far/long the motor should run. Depending on limitMode, the input is interpreted either in degrees or -milliseconds. [WRITABLE]</p> +milliseconds. <em>[WRITABLE]</em></p> </dd></dl> <dl class="attribute"> <dt id="source.Motor.limitMode"> <code class="descname">limitMode</code><a class="headerlink" href="#source.Motor.limitMode" title="Permalink to this definition">¶</a></dt> -<dd><p><em>‘Tacho’|’Time’</em> – Mode for motor limit. [WRITABLE]</p> +<dd><p><em>‘Tacho’|’Time’</em> – Mode for motor limit. <em>[WRITABLE]</em></p> </dd></dl> <dl class="attribute"> @@ -449,7 +455,7 @@ milliseconds. [WRITABLE]</p> <code class="descname">brakeMode</code><a class="headerlink" href="#source.Motor.brakeMode" title="Permalink to this definition">¶</a></dt> <dd><p><em>‘Brake’|’Coast’</em> – Mode for braking. If ‘Coast’, the motor will (at tacholimit, if ~=0) coast to a stop. If ‘Brake’, the motor will stop immediately -(at tacholimit, if ~=0) and hold the brake. [WRITABLE]</p> +(at tacholimit, if ~=0) and hold the brake. <em>[WRITABLE]</em></p> </dd></dl> <dl class="attribute"> @@ -457,32 +463,32 @@ tacholimit, if ~=0) coast to a stop. If ‘Brake’, the motor will stop <code class="descname">debug</code><a class="headerlink" href="#source.Motor.debug" title="Permalink to this definition">¶</a></dt> <dd><p><em>bool</em> – Debug turned on or off. In debug mode, everytime a command is passed to the sublayer (‘communication layer’), there is feedback in the console about what -command has been called. [WRITABLE]</p> +command has been called. <em>[WRITABLE]</em></p> </dd></dl> <dl class="attribute"> <dt id="source.Motor.isRunning"> <code class="descname">isRunning</code><a class="headerlink" href="#source.Motor.isRunning" title="Permalink to this definition">¶</a></dt> -<dd><p><em>bool</em> – True if motor is running. [READ-ONLY]</p> +<dd><p><em>bool</em> – True if motor is running. <em>[READ-ONLY]</em></p> </dd></dl> <dl class="attribute"> <dt id="source.Motor.tachoCount"> <code class="descname">tachoCount</code><a class="headerlink" href="#source.Motor.tachoCount" title="Permalink to this definition">¶</a></dt> -<dd><p><em>numeric</em> – Current tacho count. [READ-ONLY]</p> +<dd><p><em>numeric</em> – Current tacho count. <em>[READ-ONLY]</em></p> </dd></dl> <dl class="attribute"> <dt id="source.Motor.currentSpeed"> <code class="descname">currentSpeed</code><a class="headerlink" href="#source.Motor.currentSpeed" title="Permalink to this definition">¶</a></dt> <dd><p><em>numeric</em> – Current speed of motor. If speedRegulation=on this should equal power, -otherwise it will probably be lower than that. [READ-ONLY]</p> +otherwise it will probably be lower than that. <em>[READ-ONLY]</em></p> </dd></dl> <dl class="attribute"> <dt id="source.Motor.type"> <code class="descname">type</code><a class="headerlink" href="#source.Motor.type" title="Permalink to this definition">¶</a></dt> -<dd><p><em>DeviceType</em> – Type of connected device if any. [READ-ONLY]</p> +<dd><p><em>DeviceType</em> – Type of connected device if any. <em>[READ-ONLY]</em></p> </dd></dl> <dl class="method"> @@ -495,6 +501,10 @@ motor is running with a tacho limit, internally it uses another counter than the one read by tachoCount. This internal tacho count needs to be reset if you physically change the motor’s position or it coasted into a stop. If the motor’s brakemode is ‘Coast’, this function is called automatically.</p> +<p class="rubric">Notes</p> +<ul class="simple"> +<li>A better name would probably be resetPosition...</li> +</ul> <p>See also MOTOR.RESETTACHOCOUNT</p> </dd></dl> @@ -542,13 +552,13 @@ brakemode is ‘Coast’, this function is called automatically.</p> </tbody> </table> <p class="rubric">Example</p> -<p>b = EV3(); -b.connect(‘bt’, ‘serPort’, ‘/dev/rfcomm0’); -b.motorA.setProperties(‘debug’, ‘on’, ‘power’, 50, ‘limitValue’, 720, ‘speedRegulation’, ‘on’); -% Instead of: b.motorA.debug = ‘on’; -% b.motorA.power = 50; -% b.motorA.limitValue = 720; -% b.motorA.speedRegulation = ‘on’;</p> +<p>b = EV3(); <br /> +b.connect(‘bt’, ‘serPort’, ‘/dev/rfcomm0’); <br /> +b.motorA.setProperties(‘debug’, ‘on’, ‘power’, 50, ‘limitValue’, 720, ‘speedRegulation’, ‘on’); <br /> +% Instead of: b.motorA.debug = ‘on’; <br /> +% b.motorA.power = 50; <br /> +% b.motorA.limitValue = 720; <br /> +% b.motorA.speedRegulation = ‘on’; <br /></p> </dd></dl> <dl class="method"> @@ -598,8 +608,8 @@ limitValue, speedRegulation</p> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> <li><strong>syncMotor</strong> (<em>Motor</em>) – the motor-object to sync with</li> -<li><strong>turnRatio</strong> (<em>numeric in [-200,200]</em>) – <p>Description of turn_ratio (Excerpt of Firmware-comments, in c_output.c): -“Turn ratio is how tight you turn and to what direction you turn. [OPTIONAL]</p> +<li><strong>turnRatio</strong> (<em>numeric in [-200,200]</em>) – <p><em>[OPTIONAL]</em> <br /> (Excerpt of Firmware-comments, in c_output.c): +“Turn ratio is how tight you turn and to what direction you turn.</p> <blockquote> <div><ul> <li>0 value is moving straight forward</li> @@ -607,16 +617,8 @@ limitValue, speedRegulation</p> <li>Positive values turn to the right</li> <li>Value -100 stops the left motor</li> <li>Value +100 stops the right motor</li> -<li><dl class="first docutils"> -<dt>Values less than -100 makes the left motor run the opposite</dt> -<dd>direction of the right motor (Spin)</dd> -</dl> -</li> -<li><dl class="first docutils"> -<dt>Values greater than +100 makes the right motor run the opposite</dt> -<dd>direction of the left motor (Spin)”</dd> -</dl> -</li> +<li>Values less than -100 makes the left motor run the opposite direction of the right motor (Spin)</li> +<li>Values greater than +100 makes the right motor run the opposite direction of the left motor (Spin)”</li> </ul> </div></blockquote> </li> @@ -633,13 +635,14 @@ connected AND aren’t running, wasting four packets, keep that in mind</li> (otherwise the sync-state cannot be exited correctly)</li> </ul> <p class="rubric">Example</p> -<p>b = EV3(); b.connect(‘usb’); -m = b.motorA; -slave = b.motorB; -m.power = 50; -m.syncedStart(slave); +<p>b = EV3(); <br /> +b.connect(‘usb’); <br /> +m = b.motorA; <br /> +slave = b.motorB; <br /> +m.power = 50; <br /> +m.syncedStart(slave); <br /> % Do stuff -m.syncedStop();</p> +m.syncedStop(); <br /></p> </dd></dl> <dl class="method"> @@ -654,26 +657,20 @@ m.syncedStop();</p> <code class="descname">waitFor</code><span class="sig-paren">(</span><em>motor</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Motor.waitFor" title="Permalink to this definition">¶</a></dt> <dd><p>Stops execution of program as long as motor is running</p> <p class="rubric">Notes</p> -<ul> -<li><p class="first">(OLD)This one’s a bit tricky. The opCode OutputReady makes the brick stop sending +<ul class="simple"> +<li>(OLD)This one’s a bit tricky. The opCode OutputReady makes the brick stop sending responses until the motor has stopped. For security reasons, in this toolbox there is an internal timeout for receiving messages from the brick. It raises an error if a reply takes too long, which would happen in this case. As a workaround, there is an infinite loop that catches errors from outputReady and -continues then, until outputReady will actually finish without an error.</p> -</li> -<li><p class="first">(OLD)OutputReady (like OutputTest in isRunning) sometimes doesn’t work. If +continues then, until outputReady will actually finish without an error.</li> +<li>(OLD)OutputReady (like OutputTest in isRunning) sometimes doesn’t work. If outputReady returns in less than a second, another while-loop iterates until the motor has stopped, this time using motor.isRunning() (this only works as -long as not both OutputTest and OutputReady are buggy).</p> -</li> -<li><dl class="first docutils"> -<dt>(OLD)Workaround: Poll isRunning (which itself return (speed>0)) until it is false</dt> -<dd><p class="first last">(No need to check if motor is connected as speed correctly returns 0 if -it’s not)</p> -</dd> -</dl> -</li> +long as not both OutputTest and OutputReady are buggy).</li> +<li>(OLD)Workaround: Poll isRunning (which itself return (speed>0)) until it +is false (No need to check if motor is connected as speed correctly +returns 0 if it’s not)</li> </ul> </dd></dl> @@ -701,7 +698,7 @@ instances for each sensor port, and you can work with them via the EV3-object.</ mode is set to DeviceMode.Default.Undefined. Once a physical sensor is connected to the port <em>and</em> the physical Brick is connected to the EV3-object, the allowed mode and the default mode for a Sensor-object are the following (depending on the -sensor type): [WRITABLE]</p> +sensor type): <em>[WRITABLE]</em></p> <ul> <li><dl class="first docutils"> <dt>Touch-Sensor:</dt> @@ -749,14 +746,14 @@ sensor type): [WRITABLE]</p> <code class="descname">debug</code><a class="headerlink" href="#source.Sensor.debug" title="Permalink to this definition">¶</a></dt> <dd><p><em>bool</em> – Debug turned on or off. In debug mode, everytime a command is passed to the sublayer (‘communication layer’), there is feedback in the console about what -command has been called. [WRITABLE]</p> +command has been called. <em>[WRITABLE]</em></p> </dd></dl> <dl class="attribute"> <dt id="source.Sensor.value"> <code class="descname">value</code><a class="headerlink" href="#source.Sensor.value" title="Permalink to this definition">¶</a></dt> <dd><p><em>numeric</em> – Value read from hysical sensor. What the value represents depends on -sensor.mode. [READ-ONLY]</p> +sensor.mode. <em>[READ-ONLY]</em></p> </dd></dl> <dl class="attribute"> @@ -810,11 +807,11 @@ sensor.mode. [READ-ONLY]</p> </tbody> </table> <p class="rubric">Example</p> -<p>b = EV3(); -b.connect(‘bt’, ‘serPort’, ‘/dev/rfcomm0’); -b.sensor1.setProperties(‘debug’, ‘on’, ‘mode’, DeviceMode.Color.Ambient); -% Instead of: b.sensor1.debug = ‘on’; -% b.sensor1.mode = DeviceMode.Color.Ambient;</p> +<p>b = EV3(); <br /> +b.connect(‘bt’, ‘serPort’, ‘/dev/rfcomm0’); <br /> +b.sensor1.setProperties(‘debug’, ‘on’, ‘mode’, DeviceMode.Color.Ambient); <br /> +% Instead of: b.sensor1.debug = ‘on’; <br /> +% b.sensor1.mode = DeviceMode.Color.Ambient; <br /></p> </dd></dl> </dd></dl> @@ -833,7 +830,7 @@ b.sensor1.setProperties(‘debug’, ‘on’, ‘mode’ </p> <p> - © Copyright 2016, Tim Stadtmann.<br/> + © Copyright 2016, LfB RWTH-Aachen.<br/> Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.8.<br/> </p> </div> diff --git a/source/EV3.m b/source/EV3.m index b6cfd734aefd4ca159cbe30e39c6c8d640acd84a..07e0e39a9c712a5949d22f4ce04305fe30a88d2a 100755 --- a/source/EV3.m +++ b/source/EV3.m @@ -9,6 +9,7 @@ classdef EV3 < MaskedHandle % * Creating multiple EV3 objects and connecting them to different physical bricks has not % been thoroughly tested yet, but seems to work on a first glance. % + % % Attributes: % motorA (Motor): Motor-object interfacing port A % motorB (Motor): Motor-object interfacing port B @@ -18,25 +19,29 @@ classdef EV3 < MaskedHandle % sensor2 (Sensor): Motor-object interfacing port 2 % sensor3 (Sensor): Motor-object interfacing port 3 % sensor4 (Sensor): Motor-object interfacing port 4 - % debug (numeric in {0,1,2}): Debug mode. [**WRITABLE**] + % debug (numeric in {0,1,2}): Debug mode. *[WRITABLE]* % % - 0: Debug turned off % - 1: Debug turned on for EV3-object -> enables feedback in the console about what firmware-commands have been called when using a method - % - 2: Low-level-Debug turned on - each packet sent and received is printed to the console + % - 2: Low-level-Debug turned on -> each packet sent and received is printed to the console % % batteryMode (string in {'Percentage', 'Voltage'}): Mode for reading battery charge. - % [**WRITABLE**] + % *[WRITABLE]* % batteryValue (numeric): Current battery charge. Depending on batteryMode, the reading - % is either in percentage or voltage. [**READ-ONLY**] - % isConnected (bool): True if virtual brick-object is connected to physical one. [**READ-ONLY**] + % is either in percentage or voltage. *[READ-ONLY]* + % isConnected (bool): True if virtual brick-object is connected to physical one. *[READ-ONLY]* + % % % Examples: % b = EV3(); |br| % b.connect('usb'); |br| - % ma = b.motorA; |br| + % ma = b.motorA; |br| + % ma.setProperties('power', 50, 'limitValue', 720); |br| % ma.start(); |br| % % fun |br| - % ma.stop(); |br| + % b.sensor1.value |br| + % b.waitFor(); |br| + % b.beep(); |br| % delete b; |br| properties @@ -56,6 +61,7 @@ classdef EV3 < MaskedHandle properties (Dependent) % Parameters to be read directly from physical brick % batteryValue (numeric): Current battery charge. Depending on batteryMode, the reading % is either in percentage or voltage. [READ-ONLY] + % See also BATTERYMODE batteryValue; end @@ -95,7 +101,6 @@ classdef EV3 < MaskedHandle % commInterface (CommunicationInterface): Interface to communication layer % All commands sent to the Brick are created and written through this object. Each % Motor- and Sensor-object has a reference to it. - % commInterface = 0; end @@ -145,14 +150,18 @@ classdef EV3 < MaskedHandle % % Arguments: % connectionType (string in {'bt', 'usb'}): Connection type - % serPort (string {'/dev/rfcomm1', '/dev/rfcomm2', ...}): Path to serial port + % serPort (string in {'/dev/rfcomm1', '/dev/rfcomm2', ...}): Path to serial port % (if 'bt') % beep (bool): If true, EV3 beeps if connection has been established % % Examples: - % b = EV3(); b.connect('bt', 'serPort', '/dev/rfcomm0'); - % b = EV3(); b.connect('usb', 'beep', 'on', ); - % + % % Setup bluetooth connection via com-port 0 |br| + % b = EV3(); |br| + % b.connect('bt', 'serPort', '/dev/rfcomm0'); |br| + % % Setup usb connection, beep when connection has been established + % b = EV3(); |br| + % b.connect('usb', 'beep', 'on', ); |br| + % % Check connection if ev3.isConnected @@ -273,9 +282,9 @@ classdef EV3 < MaskedHandle % * This equals playTone(10, 1000, 100) (Wraps the same opCode in comm-layer) % % Example: - % b = EV3(); - % b.connect('bt', 'serPort', '/dev/rfcomm0'); - % b.beep(); + % b = EV3(); |br| + % b.connect('bt', 'serPort', '/dev/rfcomm0'); |br| + % b.beep(); |br| % if ~ev3.isConnected @@ -294,15 +303,15 @@ classdef EV3 < MaskedHandle % Plays tone on brick. % % Arguments: - % volume (numeric in [0, 100]) - % frequency (numeric in [250, 10000]) + % volume (numeric in [0, 100]): in percent + % frequency (numeric in [250, 10000]): in Hertz % duration (numeric >0): in milliseconds % % Example: - % b = EV3(); - % b.connect('bt', 'serPort', '/dev/rfcomm0'); + % b = EV3(); |br| + % b.connect('bt', 'serPort', '/dev/rfcomm0'); |br| % b.playTone(50, 5000, 1000); % Plays tone with 50% volume and 5000Hz for 1 - % % second. + % second. |br| % if ~ev3.isConnected @@ -321,10 +330,10 @@ classdef EV3 < MaskedHandle % Stops tone currently played % % Example: - % b = EV3(); - % b.connect('bt', 'serPort', '/dev/rfcomm0'); - % b.playTone(10,100,100000000); % Accidentally given wrong tone duration. - % b.stopTone(); % Stops tone immediately. + % b = EV3(); |br| + % b.connect('bt', 'serPort', '/dev/rfcomm0'); |br| + % b.playTone(10,100,100000000); % Accidentally given wrong tone duration :) |br| + % b.stopTone(); % Stops tone immediately. |br| % if ~ev3.isConnected @@ -346,11 +355,11 @@ classdef EV3 < MaskedHandle % status (bool): True if a tone is being played % % Example - % b = EV3(); - % b.connect('bt', 'serPort', '/dev/rfcomm0'); - % b.playTone(10, 100, 1000); - % pause(0.5); - % b.tonePlayed() -> Outputs 1 to console. + % b = EV3(); |br| + % b.connect('bt', 'serPort', '/dev/rfcomm0'); |br| + % b.playTone(10, 100, 1000); |br| + % pause(0.5); |br| + % b.tonePlayed() -> Outputs 1 to console. |br| % if ~ev3.isConnected @@ -399,14 +408,14 @@ classdef EV3 < MaskedHandle % Set multiple EV3 properties at once using MATLAB's inputParser. % % Arguments: - % debug (numeric in {0,1,2}): see EV3.debug - % batteryMode (string in {'Voltage'/'Percentage'}): see EV3.batteryMode + % debug (numeric in {0,1,2}): see EV3.debug *[OPTIONAL]* + % batteryMode (string in {'Voltage'/'Percentage'}): see EV3.batteryMode *[OPTIONAL]* % % Example: - % b = EV3(); - % b.connect('bt', 'serPort', '/dev/rfcomm0'); - % b.setProperties('debug', 'on', 'batteryMode', 'Voltage'); - % % Instead of: b.debug = 'on'; b.batteryMode = 'Voltage'; + % b = EV3(); |br| + % b.connect('bt', 'serPort', '/dev/rfcomm0'); |br| + % b.setProperties('debug', 'on', 'batteryMode', 'Voltage'); |br| + % % Instead of: b.debug = 'on'; b.batteryMode = 'Voltage'; |br| % % See also EV3.DEBUG, EV3.BATTERYMODE @@ -446,6 +455,8 @@ classdef EV3 < MaskedHandle end function display(ev3) + % Displays EV3-properties and its devices + displayProperties(ev3); fprintf('\n\tDevices\n'); diff --git a/source/Motor.m b/source/Motor.m index 4c1572cc5e1789529df79bee87f5395f317e762b..121b68abe8ddd59100456ef3b5ad5780ee92604f 100755 --- a/source/Motor.m +++ b/source/Motor.m @@ -11,38 +11,38 @@ classdef Motor < MaskedHandle & dynamicprops % * The Motor-class represents motor ports, not individual motors! % % Attributes: - % power (numeric in [-100, 100]): Power level of motor in percent. [WRITABLE] + % power (numeric in [-100, 100]): Power level of motor in percent. *[WRITABLE]* % speedRegulation (bool): Speed regulation turned on or off. When turned on, motor will % try to 'hold' its speed at given power level, whatever the load. In this mode, the % highest possible speed depends on the load and mostly goes up to around 70-80 (at % this point, the Brick internally input 100% power). When turned off, motor will % constantly input the same power into the motor. The resulting speed will be - % somewhat lower, depending on the load. [WRITABLE] + % somewhat lower, depending on the load. *[WRITABLE]* % smoothStart (numeric s. t. smoothStart+smoothStop < limitValue): Degrees/Time % indicating how far/long the motor should smoothly start. Depending on limitMode, % the input is interpreted either in degrees or milliseconds. The first % {smoothStart}-milliseconds/degrees of limitValue the motor will slowly accelerate - % until reaching its defined speed. [WRITABLE] + % until reaching its defined speed. *[WRITABLE]* % smoothStop (numeric s. t. smoothStart+smoothStop < limitValue): Degrees/Time % indicating how far/long the motor should smoothly stop. Depending on limitMode, the % input is interpreted either in degrees or milliseconds. The last % [smoothStop]-milliseconds/degrees of limitValue the motor will slowly slow down - % until it has stopped. [WRITABLE] + % until it has stopped. *[WRITABLE]* % limitValue (numeric>=0): Degrees/Time indicating how far/long the motor should run. % Depending on limitMode, the input is interpreted either in degrees or - % milliseconds. [WRITABLE] - % limitMode ('Tacho'|'Time'): Mode for motor limit. [WRITABLE] + % milliseconds. *[WRITABLE]* + % limitMode ('Tacho'|'Time'): Mode for motor limit. *[WRITABLE]* % brakeMode ('Brake'|'Coast'): Mode for braking. If 'Coast', the motor will (at % tacholimit, if ~=0) coast to a stop. If 'Brake', the motor will stop immediately - % (at tacholimit, if ~=0) and hold the brake. [WRITABLE] + % (at tacholimit, if ~=0) and hold the brake. *[WRITABLE]* % debug (bool): Debug turned on or off. In debug mode, everytime a command is passed to % the sublayer ('communication layer'), there is feedback in the console about what - % command has been called. [WRITABLE] - % isRunning (bool): True if motor is running. [READ-ONLY] - % tachoCount (numeric): Current tacho count. [READ-ONLY] + % command has been called. *[WRITABLE]* + % isRunning (bool): True if motor is running. *[READ-ONLY]* + % tachoCount (numeric): Current tacho count. *[READ-ONLY]* % currentSpeed (numeric): Current speed of motor. If speedRegulation=on this should equal power, - % otherwise it will probably be lower than that. [READ-ONLY] - % type (DeviceType): Type of connected device if any. [READ-ONLY] + % otherwise it will probably be lower than that. *[READ-ONLY]* + % type (DeviceType): Type of connected device if any. *[READ-ONLY]* properties % Standard properties to be set by user @@ -73,7 +73,7 @@ classdef Motor < MaskedHandle & dynamicprops % limitValue (numeric>=0): Degrees/Time indicating how far/long the motor should run. % Depending on limitMode, the input is interpreted either in degrees or - % milliseconds. [WRITABLE] + % milliseconds. [WRITABLE] % See also MOTOR.LIMITMODE limitValue; @@ -139,18 +139,18 @@ classdef Motor < MaskedHandle & dynamicprops properties (Hidden, Dependent, Access = private) % Hidden, dependent properties for internal use only % portNo (PortNo): Internal number of motor port. - % * Port 'A': 0 - % * Port 'B': 1 - % * Port 'C': 2 - % * Port 'D': 3 + % - Port 'A': 0 + % - Port 'B': 1 + % - Port 'C': 2 + % - Port 'D': 3 % See also PORTNO portNo; %portInput (PortInput): Internal number of motor port if accessed via input-opCodes - % * Port 'A': 16 - % * Port 'B': 17 - % * Port 'C': 18 - % * Port 'D': 19 + % - Port 'A': 16 + % - Port 'B': 17 + % - Port 'C': 18 + % - Port 'D': 19 % See also PORTINPUT portInput; @@ -362,17 +362,15 @@ classdef Motor < MaskedHandle & dynamicprops % % Arguments: % syncMotor (Motor): the motor-object to sync with - % turnRatio (numeric in [-200,200]): Description of turn_ratio (Excerpt of Firmware-comments, in c_output.c): - % "Turn ratio is how tight you turn and to what direction you turn. [OPTIONAL] + % turnRatio (numeric in [-200,200]): *[OPTIONAL]* |br| (Excerpt of Firmware-comments, in c_output.c): + % "Turn ratio is how tight you turn and to what direction you turn. % * 0 value is moving straight forward % * Negative values turn to the left % * Positive values turn to the right % * Value -100 stops the left motor % * Value +100 stops the right motor - % * Values less than -100 makes the left motor run the opposite - % direction of the right motor (Spin) - % * Values greater than +100 makes the right motor run the opposite - % direction of the left motor (Spin)" + % * Values less than -100 makes the left motor run the opposite direction of the right motor (Spin) + % * Values greater than +100 makes the right motor run the opposite direction of the left motor (Spin)" % % Notes: % * This is right now a pretty 'heavy' function, as it tests if both motors are @@ -381,13 +379,14 @@ classdef Motor < MaskedHandle & dynamicprops % (otherwise the sync-state cannot be exited correctly) % % Example: - % b = EV3(); b.connect('usb'); - % m = b.motorA; - % slave = b.motorB; - % m.power = 50; - % m.syncedStart(slave); + % b = EV3(); |br| + % b.connect('usb'); |br| + % m = b.motorA; |br| + % slave = b.motorB; |br| + % m.power = 50; |br| + % m.syncedStart(slave); |br| % % Do stuff - % m.syncedStop(); + % m.syncedStop(); |br| % turnRatio = 0; @@ -542,9 +541,9 @@ classdef Motor < MaskedHandle & dynamicprops % outputReady returns in less than a second, another while-loop iterates until % the motor has stopped, this time using motor.isRunning() (this only works as % long as not both OutputTest and OutputReady are buggy). - % * (OLD)Workaround: Poll isRunning (which itself return (speed>0)) until it is false - % (No need to check if motor is connected as speed correctly returns 0 if - % it's not) + % * (OLD)Workaround: Poll isRunning (which itself return (speed>0)) until it + % is false (No need to check if motor is connected as speed correctly + % returns 0 if it's not) if ~motor.connectedToBrick error('Motor::waitFor: Motor-Object not connected to comm handle.'); @@ -595,6 +594,9 @@ classdef Motor < MaskedHandle & dynamicprops % physically change the motor's position or it coasted into a stop. If the motor's % brakemode is 'Coast', this function is called automatically. % + % Notes: + % * A better name would probably be resetPosition... + % % See also MOTOR.RESETTACHOCOUNT if ~motor.connectedToBrick @@ -796,24 +798,24 @@ classdef Motor < MaskedHandle & dynamicprops % Sets multiple Motor properties at once using MATLAB's inputParser. % % Arguments: - % debug (bool) [OPTIONAL] - % smoothStart (numeric in [0, limitValue]) [OPTIONAL] - % smoothStop (numeric in [0, limitValue]) [OPTIONAL] - % speedRegulation (bool) [OPTIONAL] - % brakeMode ('Coast'|'Brake') [OPTIONAL] - % limitMode ('Time'|'Tacho') [OPTIONAL] - % limitValue (numeric > 0) [OPTIONAL] - % power (numeric in [-100,100]) [OPTIONAL] - % batteryMode ('Voltage'|'Percentage') [OPTIONAL] + % debug (bool) *[OPTIONAL]* + % smoothStart (numeric in [0, limitValue]) *[OPTIONAL]* + % smoothStop (numeric in [0, limitValue]) *[OPTIONAL]* + % speedRegulation (bool) *[OPTIONAL]* + % brakeMode ('Coast'|'Brake') *[OPTIONAL]* + % limitMode ('Time'|'Tacho') *[OPTIONAL]* + % limitValue (numeric > 0) *[OPTIONAL]* + % power (numeric in [-100,100]) *[OPTIONAL]* + % batteryMode ('Voltage'|'Percentage') *[OPTIONAL]* % % Example: - % b = EV3(); - % b.connect('bt', 'serPort', '/dev/rfcomm0'); - % b.motorA.setProperties('debug', 'on', 'power', 50, 'limitValue', 720, 'speedRegulation', 'on'); - % % Instead of: b.motorA.debug = 'on'; - % % b.motorA.power = 50; - % % b.motorA.limitValue = 720; - % % b.motorA.speedRegulation = 'on'; + % b = EV3(); |br| + % b.connect('bt', 'serPort', '/dev/rfcomm0'); |br| + % b.motorA.setProperties('debug', 'on', 'power', 50, 'limitValue', 720, 'speedRegulation', 'on'); |br| + % % Instead of: b.motorA.debug = 'on'; |br| + % % b.motorA.power = 50; |br| + % % b.motorA.limitValue = 720; |br| + % % b.motorA.speedRegulation = 'on'; |br| % p = inputParser(); diff --git a/source/Sensor.m b/source/Sensor.m index 3082f40aab0e1a983f5d36192520b7599720d528..bf01571bbafa73e5a0259a623e987890a54333dc 100755 --- a/source/Sensor.m +++ b/source/Sensor.m @@ -15,7 +15,7 @@ classdef Sensor < MaskedHandle % mode is set to DeviceMode.Default.Undefined. Once a physical sensor is connected % to the port *and* the physical Brick is connected to the EV3-object, the allowed % mode and the default mode for a Sensor-object are the following (depending on the - % sensor type): [WRITABLE] + % sensor type): *[WRITABLE]* % % * Touch-Sensor: % * DeviceMode.Touch.Pushed [Default] @@ -33,9 +33,9 @@ classdef Sensor < MaskedHandle % * DeviceMode.Gyro.Rate % debug (bool): Debug turned on or off. In debug mode, everytime a command is passed to % the sublayer ('communication layer'), there is feedback in the console about what - % command has been called. [WRITABLE] + % command has been called. *[WRITABLE]* % value (numeric): Value read from hysical sensor. What the value represents depends on - % sensor.mode. [READ-ONLY] + % sensor.mode. *[READ-ONLY]* % type (DeviceType): Type of physical sensor connected to the port. Possible types are: [READ-ONLY] % % * DeviceType.NXTTouch @@ -88,11 +88,12 @@ classdef Sensor < MaskedHandle properties (Dependent) % Parameters to be read directly from physical brick % value (numeric): Value read from hysical sensor. What the value represents depends on - % sensor.mode. [READ-ONLY] + % sensor.mode. *[READ-ONLY]* % See also SENSOR.MODE value; - % type (DeviceType): Type of physical sensor connected to the port. Possible types are: [READ-ONLY] + % type (DeviceType): Type of physical sensor connected to the port. Possible types are + % *[READ-ONLY]*: % * DeviceType.NXTTouch % * DeviceType.NXTLight % * DeviceType.NXTSound @@ -225,15 +226,15 @@ classdef Sensor < MaskedHandle % Sets multiple Sensor properties at once using MATLAB's inputParser. % % Arguments: - % debug (bool) [OPTIONAL] - % mode (DeviceMode.{Type}) [OPTIONAL] + % debug (bool) *[OPTIONAL]* + % mode (DeviceMode.{Type}) *[OPTIONAL]* % % Example: - % b = EV3(); - % b.connect('bt', 'serPort', '/dev/rfcomm0'); - % b.sensor1.setProperties('debug', 'on', 'mode', DeviceMode.Color.Ambient); - % % Instead of: b.sensor1.debug = 'on'; - % % b.sensor1.mode = DeviceMode.Color.Ambient; + % b = EV3(); |br| + % b.connect('bt', 'serPort', '/dev/rfcomm0'); |br| + % b.sensor1.setProperties('debug', 'on', 'mode', DeviceMode.Color.Ambient); |br| + % % Instead of: b.sensor1.debug = 'on'; |br| + % % b.sensor1.mode = DeviceMode.Color.Ambient; |br| % p = inputParser();