Skip to content
Snippets Groups Projects
Commit 1f35b01d authored by Tim Stadtmann's avatar Tim Stadtmann
Browse files

Merge branch 'develop' into issue-motorStartBug

Resolved Conflicts:
	source/EV3.m
parents f14d9558 3a628d2f
No related tags found
No related merge requests found
Showing
with 90 additions and 42 deletions
No preview for this file type
No preview for this file type
No preview for this file type
File added
File added
No preview for this file type
File added
No preview for this file type
No preview for this file type
File added
File added
......@@ -31,8 +31,6 @@
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="top" title="Mindstorms EV3 Toolbox v0.4-rc.10 documentation" href="index.html" />
<link rel="next" title="CommunicationLayer" href="CommunicationLayer.html" />
<link rel="prev" title="Sensor" href="Sensor.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'>
......@@ -76,9 +74,10 @@
<li class="toctree-l1"><a class="reference internal" href="Motor.html">Motor</a></li>
<li class="toctree-l1"><a class="reference internal" href="Sensor.html">Sensor</a></li>
</ul>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">CommandLayer</a></li>
<li class="toctree-l1"><a class="reference internal" href="CommunicationLayer.html">CommunicationLayer</a></li>
<ul>
<li class="toctree-l1"><a class="reference internal" href="hid.html">hidapi</a></li>
<li class="toctree-l1"><a class="reference internal" href="usbBrickIO.html">usbBrickIO</a></li>
<li class="toctree-l1"><a class="reference internal" href="btBrickIO.html">btBrickIO</a></li>
</ul>
</ul>
</li>
......@@ -105,14 +104,6 @@
<li>
<a href="Sensor.html" title="Previous Chapter: Sensor"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm hidden-tablet">&laquo; Sensor</span>
</a>
</li>
<li>
<a href="CommunicationLayer.html" title="Next Chapter: CommunicationLayer"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm hidden-tablet">Communication... &raquo;</span>
</a>
</li>
......
......@@ -31,7 +31,6 @@
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="top" title="Mindstorms EV3 Toolbox v0.4-rc.10 documentation" href="index.html" />
<link rel="prev" title="CommandLayer" href="CommandLayer.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'>
......@@ -75,9 +74,10 @@
<li class="toctree-l1"><a class="reference internal" href="Motor.html">Motor</a></li>
<li class="toctree-l1"><a class="reference internal" href="Sensor.html">Sensor</a></li>
</ul>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="CommandLayer.html">CommandLayer</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">CommunicationLayer</a></li>
<ul>
<li class="toctree-l1"><a class="reference internal" href="hid.html">hidapi</a></li>
<li class="toctree-l1"><a class="reference internal" href="usbBrickIO.html">usbBrickIO</a></li>
<li class="toctree-l1"><a class="reference internal" href="btBrickIO.html">btBrickIO</a></li>
</ul>
</ul>
</li>
......@@ -104,10 +104,6 @@
<li>
<a href="CommandLayer.html" title="Previous Chapter: CommandLayer"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm hidden-tablet">&laquo; CommandLayer</span>
</a>
</li>
......
......@@ -77,8 +77,9 @@
<li class="toctree-l1"><a class="reference internal" href="Sensor.html">Sensor</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="CommandLayer.html">CommandLayer</a></li>
<li class="toctree-l1"><a class="reference internal" href="CommunicationLayer.html">CommunicationLayer</a></li>
<li class="toctree-l1"><a class="reference internal" href="hid.html">hidapi</a></li>
<li class="toctree-l1"><a class="reference internal" href="usbBrickIO.html">usbBrickIO</a></li>
<li class="toctree-l1"><a class="reference internal" href="btBrickIO.html">btBrickIO</a></li>
</ul>
</ul>
</li>
......@@ -145,7 +146,21 @@
<dl class="class">
<dt id="source.EV3">
<em class="property">class </em><code class="descname">EV3</code><span class="sig-paren">(</span><em>varargin</em><span class="sig-paren">)</span><a class="headerlink" href="#source.EV3" title="Permalink to this definition"></a></dt>
<dd><p>High-level class to work with physical bricks.</p>
<dd><dl class="docutils">
<dt><em>List of methods</em>:</dt>
<dd><ul class="first last simple">
<li><a class="reference internal" href="#source.EV3.connect" title="source.EV3.connect"><code class="xref mat mat-meth docutils literal"><span class="pre">connect()</span></code></a></li>
<li><a class="reference internal" href="#source.EV3.disconnect" title="source.EV3.disconnect"><code class="xref mat mat-meth docutils literal"><span class="pre">disconnect()</span></code></a></li>
<li><a class="reference internal" href="#source.EV3.stopAllMotors" title="source.EV3.stopAllMotors"><code class="xref mat mat-meth docutils literal"><span class="pre">stopAllMotors()</span></code></a></li>
<li><a class="reference internal" href="#source.EV3.beep" title="source.EV3.beep"><code class="xref mat mat-meth docutils literal"><span class="pre">beep()</span></code></a></li>
<li><a class="reference internal" href="#source.EV3.playTone" title="source.EV3.playTone"><code class="xref mat mat-meth docutils literal"><span class="pre">playTone()</span></code></a></li>
<li><a class="reference internal" href="#source.EV3.stopTone" title="source.EV3.stopTone"><code class="xref mat mat-meth docutils literal"><span class="pre">stopTone()</span></code></a></li>
<li><a class="reference internal" href="#source.EV3.tonePlayed" title="source.EV3.tonePlayed"><code class="xref mat mat-meth docutils literal"><span class="pre">tonePlayed()</span></code></a></li>
<li><a class="reference internal" href="#source.EV3.setProperties" title="source.EV3.setProperties"><code class="xref mat mat-meth docutils literal"><span class="pre">setProperties()</span></code></a></li>
</ul>
</dd>
</dl>
<p>High-level class to work with physical bricks.</p>
<p>This is the 'central' class (from user's view) when working with this toolbox. It
delivers a convenient interface for creating a connection to the brick and sending
commands to it. An EV3-object creates 4 Motor- and 4 Sensor-objects, one for each port.</p>
......@@ -220,13 +235,13 @@ follows: <em>brickObject.motorA.setProperties('power', 50);</em></li>
<dl class="attribute">
<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> &#8211; Mode for reading battery charge. See also <a class="reference internal" href="source.html#source.EV3.batteryValue" title="source.EV3.batteryValue"><code class="xref mat mat-attr docutils literal"><span class="pre">batteryValue</span></code></a>. <em>[WRITABLE]</em></p>
<dd><p><em>string in {'Percentage', 'Voltage'}</em> &#8211; Mode for reading battery charge. See also <a class="reference internal" href="#source.EV3.batteryValue" title="source.EV3.batteryValue"><code class="xref mat mat-attr docutils literal"><span class="pre">batteryValue</span></code></a>. <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> &#8211; Current battery charge. Depending on batteryMode, the reading is either in percentage or voltage. See also <a class="reference internal" href="source.html#source.EV3.batteryMode" title="source.EV3.batteryMode"><code class="xref mat mat-attr docutils literal"><span class="pre">batteryMode</span></code></a>. <em>[READ-ONLY]</em></p>
<dd><p><em>numeric</em> &#8211; Current battery charge. Depending on batteryMode, the reading is either in percentage or voltage. See also <a class="reference internal" href="#source.EV3.batteryMode" title="source.EV3.batteryMode"><code class="xref mat mat-attr docutils literal"><span class="pre">batteryMode</span></code></a>. <em>[READ-ONLY]</em></p>
</dd></dl>
<dl class="attribute">
......@@ -286,7 +301,7 @@ 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>See also ISCONNECTED / <a class="reference internal" href="source.html#source.EV3.isConnected" title="source.EV3.isConnected"><code class="xref mat mat-attr docutils literal"><span class="pre">isConnected</span></code></a></p>
<p>See also ISCONNECTED / <a class="reference internal" href="#source.EV3.isConnected" title="source.EV3.isConnected"><code class="xref mat mat-attr docutils literal"><span class="pre">isConnected</span></code></a></p>
</dd></dl>
<dl class="method">
......@@ -315,7 +330,7 @@ b.disconnect(); % <br /></p>
<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>) &#8211; in percent</li>
<li><strong>frequency</strong> (<em>numeric in [250, 10000]</em>) &#8211; in Hertz</li>
<li><strong>duration</strong> (<em>numeric &gt;0</em>) &#8211; in milliseconds</li>
<li><strong>duration</strong> (<em>numeric &gt; 0</em>) &#8211; in milliseconds</li>
</ul>
</td>
</tr>
......@@ -349,7 +364,7 @@ second. <br /></p>
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 / <a class="reference internal" href="source.html#source.EV3.debug" title="source.EV3.debug"><code class="xref mat mat-attr docutils literal"><span class="pre">debug</span></code></a>, <a class="reference internal" href="source.html#source.EV3.batteryMode" title="source.EV3.batteryMode"><code class="xref mat mat-attr docutils literal"><span class="pre">batteryMode</span></code></a></p>
<p>See also EV3.DEBUG, EV3.BATTERYMODE / <a class="reference internal" href="#source.EV3.debug" title="source.EV3.debug"><code class="xref mat mat-attr docutils literal"><span class="pre">debug</span></code></a>, <a class="reference internal" href="#source.EV3.batteryMode" title="source.EV3.batteryMode"><code class="xref mat mat-attr docutils literal"><span class="pre">batteryMode</span></code></a></p>
</dd></dl>
<dl class="method">
......
......@@ -77,8 +77,9 @@
<li class="toctree-l1"><a class="reference internal" href="Sensor.html">Sensor</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="CommandLayer.html">CommandLayer</a></li>
<li class="toctree-l1"><a class="reference internal" href="CommunicationLayer.html">CommunicationLayer</a></li>
<li class="toctree-l1"><a class="reference internal" href="hid.html">hidapi</a></li>
<li class="toctree-l1"><a class="reference internal" href="usbBrickIO.html">usbBrickIO</a></li>
<li class="toctree-l1"><a class="reference internal" href="btBrickIO.html">btBrickIO</a></li>
</ul>
</ul>
</li>
......@@ -145,7 +146,22 @@
<dl class="class">
<dt id="source.Motor">
<em class="property">class </em><code class="descname">Motor</code><span class="sig-paren">(</span><em>varargin</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Motor" title="Permalink to this definition"></a></dt>
<dd><p>High-level class to work with motors.</p>
<dd><dl class="docutils">
<dt><em>List of methods</em>:</dt>
<dd><ul class="first last simple">
<li><a class="reference internal" href="#source.Motor.start" title="source.Motor.start"><code class="xref mat mat-meth docutils literal"><span class="pre">start()</span></code></a></li>
<li><a class="reference internal" href="#source.Motor.stop" title="source.Motor.stop"><code class="xref mat mat-meth docutils literal"><span class="pre">stop()</span></code></a></li>
<li><a class="reference internal" href="#source.Motor.syncedStart" title="source.Motor.syncedStart"><code class="xref mat mat-meth docutils literal"><span class="pre">syncedStart()</span></code></a></li>
<li><a class="reference internal" href="#source.Motor.syncedStop" title="source.Motor.syncedStop"><code class="xref mat mat-meth docutils literal"><span class="pre">syncedStop()</span></code></a></li>
<li><a class="reference internal" href="#source.Motor.waitFor" title="source.Motor.waitFor"><code class="xref mat mat-meth docutils literal"><span class="pre">waitFor()</span></code></a></li>
<li><a class="reference internal" href="#source.Motor.internalReset" title="source.Motor.internalReset"><code class="xref mat mat-meth docutils literal"><span class="pre">internalReset()</span></code></a></li>
<li><a class="reference internal" href="#source.Motor.resetTachoCount" title="source.Motor.resetTachoCount"><code class="xref mat mat-meth docutils literal"><span class="pre">resetTachoCount()</span></code></a></li>
<li><a class="reference internal" href="#source.Motor.setBrake" title="source.Motor.setBrake"><code class="xref mat mat-meth docutils literal"><span class="pre">setBrake()</span></code></a></li>
<li><a class="reference internal" href="#source.Motor.setProperties" title="source.Motor.setProperties"><code class="xref mat mat-meth docutils literal"><span class="pre">setProperties()</span></code></a></li>
</ul>
</dd>
</dl>
<p>High-level class to work with motors.</p>
<p>This class is supposed to ease the use of the brick's motors. It is possible to set all
kinds of parameters, request the current status of the motor ports and of course send
commands to the brick to be executed on the respective port.</p>
......
......@@ -31,7 +31,7 @@
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="top" title="Mindstorms EV3 Toolbox v0.4-rc.10 documentation" href="index.html" />
<link rel="next" title="CommandLayer" href="CommandLayer.html" />
<link rel="next" title="hidapi" href="hid.html" />
<link rel="prev" title="Motor" href="Motor.html" />
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
......@@ -77,8 +77,9 @@
<li class="toctree-l1 current"><a class="current reference internal" href="#">Sensor</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="CommandLayer.html">CommandLayer</a></li>
<li class="toctree-l1"><a class="reference internal" href="CommunicationLayer.html">CommunicationLayer</a></li>
<li class="toctree-l1"><a class="reference internal" href="hid.html">hidapi</a></li>
<li class="toctree-l1"><a class="reference internal" href="usbBrickIO.html">usbBrickIO</a></li>
<li class="toctree-l1"><a class="reference internal" href="btBrickIO.html">btBrickIO</a></li>
</ul>
</ul>
</li>
......@@ -106,7 +107,7 @@
</a>
</li>
<li>
<a href="CommandLayer.html" title="Next Chapter: CommandLayer"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm hidden-tablet">CommandLayer &raquo;</span>
<a href="hid.html" title="Next Chapter: hidapi"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm hidden-tablet">hidapi &raquo;</span>
</a>
</li>
......@@ -145,7 +146,15 @@
<dl class="class">
<dt id="source.Sensor">
<em class="property">class </em><code class="descname">Sensor</code><span class="sig-paren">(</span><em>varargin</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Sensor" title="Permalink to this definition"></a></dt>
<dd><p>High-level class to work with sensors.</p>
<dd><dl class="docutils">
<dt><em>List of methods</em>:</dt>
<dd><ul class="first last simple">
<li><a class="reference internal" href="#source.Sensor.reset" title="source.Sensor.reset"><code class="xref mat mat-meth docutils literal"><span class="pre">reset()</span></code></a></li>
<li><a class="reference internal" href="#source.Sensor.setProperties" title="source.Sensor.setProperties"><code class="xref mat mat-meth docutils literal"><span class="pre">setProperties()</span></code></a></li>
</ul>
</dd>
</dl>
<p>High-level class to work with sensors.</p>
<p>The Sensor-class facilitates the communication with sensors. This mainly consists of
reading the sensor's type and current value in a specified mode.</p>
<p class="rubric">Notes</p>
......
.. automodule:: source
.. |br| raw:: html
<br />
btBrickIO
=========
.. autoclass:: btBrickIO
:members: open, close, read, write, setProperties
.. automodule:: source
.. |br| raw:: html
<br />
hidapi
======
.. autoclass:: hidapi
:members: open, close, read, read_timeout, write, getHIDInfoString, setNonBlocking, init, exit, error, enumerate, getManufacturersString, getProductString, getSerialNumberString
......@@ -45,8 +45,9 @@ Toolbox documentation
Advanced
.. toctree::
:maxdepth: 2
CommandLayer.rst
CommunicationLayer.rst
:maxdepth: 3
hid
usbBrickIO
btBrickIO
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment