Added maxpower
This commit is contained in:
parent
9234e9af34
commit
bcc59ce81c
@ -887,7 +887,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-115">line 115</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-126">line 126</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1058,7 +1058,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-49">line 49</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-60">line 60</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1230,7 +1230,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-39">line 39</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-40">line 40</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1377,7 +1377,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-60">line 60</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-71">line 71</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1428,6 +1428,154 @@
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<dt>
|
||||
<h4 class="name" id="setMaxPower"><span class="type-signature"></span>setMaxPower(style)</h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Set the max power of the motor.</p>
|
||||
<p>Note: This applies to setSpeed, rotateByDegrees, and gotoAngle.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>style</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Either BRAKE or HOLD</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
|
||||
<dd class="inherited-from">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="TachoMotor.html#setMaxPower">TachoMotor#setMaxPower</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
||||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-50">line 50</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
@ -1572,7 +1720,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-71">line 71</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-82">line 82</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1901,7 +2049,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-29">line 29</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-30">line 30</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1980,7 +2128,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1325,7 +1325,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1622,7 +1622,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -2715,7 +2715,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -2394,7 +2394,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -2715,7 +2715,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1170,7 +1170,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -968,7 +968,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -2079,7 +2079,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1506,7 +1506,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1658,7 +1658,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1350,7 +1350,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1022,7 +1022,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -3758,7 +3758,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1398,7 +1398,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -2037,7 +2037,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1398,7 +1398,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -374,7 +374,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-115">line 115</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-126">line 126</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -545,7 +545,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-49">line 49</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-60">line 60</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -717,7 +717,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-39">line 39</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-40">line 40</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -864,7 +864,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-60">line 60</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-71">line 71</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -915,6 +915,154 @@
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<dt>
|
||||
<h4 class="name" id="setMaxPower"><span class="type-signature"></span>setMaxPower(style)</h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Set the max power of the motor.</p>
|
||||
<p>Note: This applies to setSpeed, rotateByDegrees, and gotoAngle.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>style</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Either BRAKE or HOLD</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
|
||||
<dd class="inherited-from">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="TachoMotor.html#setMaxPower">TachoMotor#setMaxPower</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
||||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-50">line 50</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
@ -1059,7 +1207,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-71">line 71</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-82">line 82</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1244,7 +1392,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-29">line 29</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-30">line 30</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1323,7 +1471,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1170,7 +1170,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -2124,7 +2124,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -374,7 +374,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-115">line 115</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-126">line 126</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -545,7 +545,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-49">line 49</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-60">line 60</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -717,7 +717,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-39">line 39</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-40">line 40</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -864,7 +864,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-60">line 60</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-71">line 71</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -915,6 +915,154 @@
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<dt>
|
||||
<h4 class="name" id="setMaxPower"><span class="type-signature"></span>setMaxPower(style)</h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Set the max power of the motor.</p>
|
||||
<p>Note: This applies to setSpeed, rotateByDegrees, and gotoAngle.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>style</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Either BRAKE or HOLD</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
|
||||
<dd class="inherited-from">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="TachoMotor.html#setMaxPower">TachoMotor#setMaxPower</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
||||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-50">line 50</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
@ -1059,7 +1207,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-71">line 71</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-82">line 82</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1244,7 +1392,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-29">line 29</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-30">line 30</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1323,7 +1471,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1194,7 +1194,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -3936,7 +3936,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -3936,7 +3936,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1212,7 +1212,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -2124,7 +2124,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1170,7 +1170,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1022,7 +1022,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1477,7 +1477,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-115">line 115</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-126">line 126</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1639,7 +1639,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-49">line 49</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-60">line 60</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1802,7 +1802,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-39">line 39</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-40">line 40</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1940,7 +1940,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-60">line 60</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-71">line 71</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1991,6 +1991,145 @@
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<dt>
|
||||
<h4 class="name" id="setMaxPower"><span class="type-signature"></span>setMaxPower(style)</h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Set the max power of the motor.</p>
|
||||
<p>Note: This applies to setSpeed, rotateByDegrees, and gotoAngle.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>style</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Either BRAKE or HOLD</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
||||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-50">line 50</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
@ -2297,7 +2436,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-71">line 71</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-82">line 82</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -2594,7 +2733,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-29">line 29</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-30">line 30</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -2673,7 +2812,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1458,7 +1458,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1552,7 +1552,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1458,7 +1458,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -914,7 +914,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-115">line 115</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-126">line 126</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1085,7 +1085,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-49">line 49</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-60">line 60</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1257,7 +1257,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-39">line 39</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-40">line 40</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1404,7 +1404,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-60">line 60</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-71">line 71</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1455,6 +1455,154 @@
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<dt>
|
||||
<h4 class="name" id="setMaxPower"><span class="type-signature"></span>setMaxPower(style)</h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Set the max power of the motor.</p>
|
||||
<p>Note: This applies to setSpeed, rotateByDegrees, and gotoAngle.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>style</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Either BRAKE or HOLD</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
|
||||
<dd class="inherited-from">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="TachoMotor.html#setMaxPower">TachoMotor#setMaxPower</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
||||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-50">line 50</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
@ -1599,7 +1747,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-71">line 71</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-82">line 82</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1937,7 +2085,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-29">line 29</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-30">line 30</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -2016,7 +2164,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -914,7 +914,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-115">line 115</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-126">line 126</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1085,7 +1085,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-49">line 49</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-60">line 60</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1257,7 +1257,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-39">line 39</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-40">line 40</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1404,7 +1404,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-60">line 60</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-71">line 71</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1455,6 +1455,154 @@
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<dt>
|
||||
<h4 class="name" id="setMaxPower"><span class="type-signature"></span>setMaxPower(style)</h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Set the max power of the motor.</p>
|
||||
<p>Note: This applies to setSpeed, rotateByDegrees, and gotoAngle.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>style</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Either BRAKE or HOLD</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
|
||||
<dd class="inherited-from">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="TachoMotor.html#setMaxPower">TachoMotor#setMaxPower</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
||||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-50">line 50</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
@ -1599,7 +1747,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-71">line 71</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-82">line 82</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1937,7 +2085,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-29">line 29</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-30">line 30</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -2016,7 +2164,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -914,7 +914,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-115">line 115</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-126">line 126</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1085,7 +1085,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-49">line 49</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-60">line 60</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1257,7 +1257,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-39">line 39</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-40">line 40</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1404,7 +1404,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-60">line 60</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-71">line 71</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1455,6 +1455,154 @@
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<dt>
|
||||
<h4 class="name" id="setMaxPower"><span class="type-signature"></span>setMaxPower(style)</h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Set the max power of the motor.</p>
|
||||
<p>Note: This applies to setSpeed, rotateByDegrees, and gotoAngle.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>style</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Either BRAKE or HOLD</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
|
||||
<dd class="inherited-from">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="TachoMotor.html#setMaxPower">TachoMotor#setMaxPower</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
||||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-50">line 50</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
@ -1599,7 +1747,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-71">line 71</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-82">line 82</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1937,7 +2085,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-29">line 29</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-30">line 30</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -2016,7 +2164,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -2124,7 +2124,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1218,7 +1218,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1218,7 +1218,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1218,7 +1218,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -914,7 +914,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-115">line 115</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-126">line 126</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1085,7 +1085,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-49">line 49</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-60">line 60</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1257,7 +1257,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-39">line 39</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-40">line 40</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1404,7 +1404,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-60">line 60</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-71">line 71</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1455,6 +1455,154 @@
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<dt>
|
||||
<h4 class="name" id="setMaxPower"><span class="type-signature"></span>setMaxPower(style)</h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Set the max power of the motor.</p>
|
||||
<p>Note: This applies to setSpeed, rotateByDegrees, and gotoAngle.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>style</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Either BRAKE or HOLD</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
|
||||
<dd class="inherited-from">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="TachoMotor.html#setMaxPower">TachoMotor#setMaxPower</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
||||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-50">line 50</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
@ -1599,7 +1747,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-71">line 71</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-82">line 82</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -1937,7 +2085,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-29">line 29</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-30">line 30</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -2016,7 +2164,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1194,7 +1194,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1658,7 +1658,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1170,7 +1170,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -1854,7 +1854,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -557,7 +557,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-29">line 29</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-30">line 30</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -3926,7 +3926,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-29">line 29</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-30">line 30</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -4394,7 +4394,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-29">line 29</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-30">line 30</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -6155,7 +6155,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-29">line 29</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-30">line 30</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -7613,7 +7613,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-29">line 29</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-30">line 30</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -7919,7 +7919,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-29">line 29</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-30">line 30</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -8225,7 +8225,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-29">line 29</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-30">line 30</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -9278,7 +9278,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>,
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-29">line 29</a>
|
||||
<a href="devices_tachomotor.js.html#sunlight-1-line-30">line 30</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -9831,7 +9831,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -137,12 +137,12 @@ class AbsoluteMotor extends tachomotor_1.TachoMotor {
|
||||
}
|
||||
let message;
|
||||
if (angle instanceof Array) {
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, utils_1.mapSpeed(speed), 0x64, this._brakeStyle, this.useProfile()]);
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, utils_1.mapSpeed(speed), this._maxPower, this._brakeStyle, this.useProfile()]);
|
||||
message.writeInt32LE(utils_1.normalizeAngle(angle[0]), 4);
|
||||
message.writeInt32LE(utils_1.normalizeAngle(angle[1]), 8);
|
||||
}
|
||||
else {
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x0d, 0x00, 0x00, 0x00, 0x00, utils_1.mapSpeed(speed), 0x64, this._brakeStyle, this.useProfile()]);
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x0d, 0x00, 0x00, 0x00, 0x00, utils_1.mapSpeed(speed), this._maxPower, this._brakeStyle, this.useProfile()]);
|
||||
message.writeInt32LE(utils_1.normalizeAngle(angle), 4);
|
||||
}
|
||||
this.send(message);
|
||||
@ -252,7 +252,7 @@ exports.ModeMap = {
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -192,7 +192,7 @@ exports.BasicMotor = BasicMotor;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -319,7 +319,7 @@ var Output;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -186,7 +186,7 @@ const MaxCurrentRaw = {
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -288,7 +288,7 @@ exports.Device = Device;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -195,7 +195,7 @@ exports.ModeMap = {
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -143,7 +143,7 @@ exports.DuploTrainBaseMotor = DuploTrainBaseMotor;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -171,7 +171,7 @@ var Mode;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -165,7 +165,7 @@ exports.ModeMap = {
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -191,7 +191,7 @@ var Mode;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -177,7 +177,7 @@ exports.Light = Light;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -143,7 +143,7 @@ exports.MediumLinearMotor = MediumLinearMotor;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -169,7 +169,7 @@ exports.ModeMap = {
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -143,7 +143,7 @@ exports.MoveHubMediumLinearMotor = MoveHubMediumLinearMotor;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -167,7 +167,7 @@ exports.ModeMap = {
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -159,7 +159,7 @@ exports.PiezoBuzzer = PiezoBuzzer;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -171,7 +171,7 @@ exports.ButtonState = {
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -143,7 +143,7 @@ exports.SimpleMediumLinearMotor = SimpleMediumLinearMotor;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -97,6 +97,7 @@ class TachoMotor extends basicmotor_1.BasicMotor {
|
||||
constructor(hub, portId, modeMap = {}, type = Consts.DeviceType.UNKNOWN) {
|
||||
super(hub, portId, Object.assign({}, modeMap, exports.ModeMap), type);
|
||||
this._brakeStyle = Consts.BrakingStyle.BRAKE;
|
||||
this._maxPower = 100;
|
||||
this.useAccelerationProfile = true;
|
||||
this.useDecelerationProfile = true;
|
||||
}
|
||||
@ -125,6 +126,16 @@ class TachoMotor extends basicmotor_1.BasicMotor {
|
||||
setBrakingStyle(style) {
|
||||
this._brakeStyle = style;
|
||||
}
|
||||
/**
|
||||
* Set the max power of the motor.
|
||||
*
|
||||
* Note: This applies to setSpeed, rotateByDegrees, and gotoAngle.
|
||||
* @method TachoMotor#setMaxPower
|
||||
* @param {number} style Either BRAKE or HOLD
|
||||
*/
|
||||
setMaxPower(maxPower) {
|
||||
this._maxPower = maxPower;
|
||||
}
|
||||
/**
|
||||
* Set the global acceleration time
|
||||
* @method TachoMotor#setAccelerationTime
|
||||
@ -170,19 +181,19 @@ class TachoMotor extends basicmotor_1.BasicMotor {
|
||||
let message;
|
||||
if (time !== undefined) {
|
||||
if (speed instanceof Array) {
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x0a, 0x00, 0x00, utils_1.mapSpeed(speed[0]), utils_1.mapSpeed(speed[1]), 0x64, this._brakeStyle, this.useProfile()]);
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x0a, 0x00, 0x00, utils_1.mapSpeed(speed[0]), utils_1.mapSpeed(speed[1]), this._maxPower, this._brakeStyle, this.useProfile()]);
|
||||
}
|
||||
else {
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x09, 0x00, 0x00, utils_1.mapSpeed(speed), 0x64, this._brakeStyle, this.useProfile()]);
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x09, 0x00, 0x00, utils_1.mapSpeed(speed), this._maxPower, this._brakeStyle, this.useProfile()]);
|
||||
}
|
||||
message.writeUInt16LE(time, 4);
|
||||
}
|
||||
else {
|
||||
if (speed instanceof Array) {
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x08, utils_1.mapSpeed(speed[0]), utils_1.mapSpeed(speed[1]), 0x64, this.useProfile()]);
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x08, utils_1.mapSpeed(speed[0]), utils_1.mapSpeed(speed[1]), this._maxPower, this.useProfile()]);
|
||||
}
|
||||
else {
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x07, utils_1.mapSpeed(speed), 0x64, this.useProfile()]);
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x07, utils_1.mapSpeed(speed), this._maxPower, this.useProfile()]);
|
||||
}
|
||||
}
|
||||
this.send(message);
|
||||
@ -213,10 +224,10 @@ class TachoMotor extends basicmotor_1.BasicMotor {
|
||||
}
|
||||
let message;
|
||||
if (speed instanceof Array) {
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x0c, 0x00, 0x00, 0x00, 0x00, utils_1.mapSpeed(speed[0]), utils_1.mapSpeed(speed[1]), 0x64, this._brakeStyle, this.useProfile()]);
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x0c, 0x00, 0x00, 0x00, 0x00, utils_1.mapSpeed(speed[0]), utils_1.mapSpeed(speed[1]), this._maxPower, this._brakeStyle, this.useProfile()]);
|
||||
}
|
||||
else {
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x0b, 0x00, 0x00, 0x00, 0x00, utils_1.mapSpeed(speed), 0x64, this._brakeStyle, this.useProfile()]);
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x0b, 0x00, 0x00, 0x00, 0x00, utils_1.mapSpeed(speed), this._maxPower, this._brakeStyle, this.useProfile()]);
|
||||
}
|
||||
message.writeUInt32LE(degrees, 4);
|
||||
this.send(message);
|
||||
@ -289,7 +300,7 @@ exports.ModeMap = {
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -191,7 +191,7 @@ exports.ModeMap = {
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -189,7 +189,7 @@ exports.ModeMap = {
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -189,7 +189,7 @@ exports.ModeMap = {
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -143,7 +143,7 @@ exports.TechnicLargeAngularMotor = TechnicLargeAngularMotor;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -143,7 +143,7 @@ exports.TechnicLargeLinearMotor = TechnicLargeLinearMotor;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -143,7 +143,7 @@ exports.TechnicMediumAngularMotor = TechnicMediumAngularMotor;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -169,7 +169,7 @@ exports.ModeMap = {
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -169,7 +169,7 @@ exports.ModeMap = {
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -169,7 +169,7 @@ exports.ModeMap = {
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -143,7 +143,7 @@ exports.TechnicXLargeLinearMotor = TechnicXLargeLinearMotor;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -167,7 +167,7 @@ exports.ModeMap = {
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -143,7 +143,7 @@ exports.TrainMotor = TrainMotor;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -190,7 +190,7 @@ const MaxVoltageRaw = {
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -477,7 +477,7 @@ exports.BaseHub = BaseHub;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -182,7 +182,7 @@ exports.BoostMoveHub = BoostMoveHub;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -179,7 +179,7 @@ exports.ControlPlusHub = ControlPlusHub;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -166,7 +166,7 @@ exports.PortMap = {
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -178,7 +178,7 @@ exports.PortMap = {
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -456,7 +456,7 @@ exports.LPF2Hub = LPF2Hub;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -180,7 +180,7 @@ exports.PortMap = {
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -179,7 +179,7 @@ exports.PUPHub = PUPHub;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -172,7 +172,7 @@ exports.PUPRemote = PUPRemote;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -168,7 +168,7 @@ exports.PortMap = {
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -174,7 +174,7 @@ exports.PortMap = {
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -319,7 +319,7 @@ exports.PortMap = {
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -410,7 +410,7 @@ console.log("Scanning for Hubs...");
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
|
||||
|
||||
on Sat May 23rd 2020
|
||||
on Sun May 24th 2020
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
File diff suppressed because one or more lines are too long
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-poweredup",
|
||||
"version": "6.3.0",
|
||||
"version": "6.4.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-poweredup",
|
||||
"version": "6.3.0",
|
||||
"version": "6.4.0",
|
||||
"description": "A Javascript module to interface with LEGO Powered Up components.",
|
||||
"homepage": "https://github.com/nathankellenicki/node-poweredup/",
|
||||
"main": "dist/node/index-node.js",
|
||||
|
@ -57,11 +57,11 @@ export class AbsoluteMotor extends TachoMotor {
|
||||
}
|
||||
let message;
|
||||
if (angle instanceof Array) {
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, mapSpeed(speed), 0x64, this._brakeStyle, this.useProfile()]);
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, mapSpeed(speed), this._maxPower, this._brakeStyle, this.useProfile()]);
|
||||
message.writeInt32LE(normalizeAngle(angle[0]), 4);
|
||||
message.writeInt32LE(normalizeAngle(angle[1]), 8);
|
||||
} else {
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x0d, 0x00, 0x00, 0x00, 0x00, mapSpeed(speed), 0x64, this._brakeStyle, this.useProfile()]);
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x0d, 0x00, 0x00, 0x00, 0x00, mapSpeed(speed), this._maxPower, this._brakeStyle, this.useProfile()]);
|
||||
message.writeInt32LE(normalizeAngle(angle), 4);
|
||||
}
|
||||
this.send(message);
|
||||
|
@ -12,6 +12,7 @@ import { mapSpeed } from "../utils";
|
||||
export class TachoMotor extends BasicMotor {
|
||||
|
||||
protected _brakeStyle: Consts.BrakingStyle = Consts.BrakingStyle.BRAKE;
|
||||
protected _maxPower: number = 100;
|
||||
public useAccelerationProfile: boolean = true;
|
||||
public useDecelerationProfile: boolean = true;
|
||||
|
||||
@ -49,6 +50,18 @@ export class TachoMotor extends BasicMotor {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the max power of the motor.
|
||||
*
|
||||
* Note: This applies to setSpeed, rotateByDegrees, and gotoAngle.
|
||||
* @method TachoMotor#setMaxPower
|
||||
* @param {number} style Either BRAKE or HOLD
|
||||
*/
|
||||
public setMaxPower (maxPower: number) {
|
||||
this._maxPower = maxPower;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the global acceleration time
|
||||
* @method TachoMotor#setAccelerationTime
|
||||
@ -98,16 +111,16 @@ export class TachoMotor extends BasicMotor {
|
||||
let message;
|
||||
if (time !== undefined) {
|
||||
if (speed instanceof Array) {
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x0a, 0x00, 0x00, mapSpeed(speed[0]), mapSpeed(speed[1]), 0x64, this._brakeStyle, this.useProfile()]);
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x0a, 0x00, 0x00, mapSpeed(speed[0]), mapSpeed(speed[1]), this._maxPower, this._brakeStyle, this.useProfile()]);
|
||||
} else {
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x09, 0x00, 0x00, mapSpeed(speed), 0x64, this._brakeStyle, this.useProfile()]);
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x09, 0x00, 0x00, mapSpeed(speed), this._maxPower, this._brakeStyle, this.useProfile()]);
|
||||
}
|
||||
message.writeUInt16LE(time, 4);
|
||||
} else {
|
||||
if (speed instanceof Array) {
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x08, mapSpeed(speed[0]), mapSpeed(speed[1]), 0x64, this.useProfile()]);
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x08, mapSpeed(speed[0]), mapSpeed(speed[1]), this._maxPower, this.useProfile()]);
|
||||
} else {
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x07, mapSpeed(speed), 0x64, this.useProfile()]);
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x07, mapSpeed(speed), this._maxPower, this.useProfile()]);
|
||||
}
|
||||
}
|
||||
this.send(message);
|
||||
@ -139,9 +152,9 @@ export class TachoMotor extends BasicMotor {
|
||||
}
|
||||
let message;
|
||||
if (speed instanceof Array) {
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x0c, 0x00, 0x00, 0x00, 0x00, mapSpeed(speed[0]), mapSpeed(speed[1]), 0x64, this._brakeStyle, this.useProfile()]);
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x0c, 0x00, 0x00, 0x00, 0x00, mapSpeed(speed[0]), mapSpeed(speed[1]), this._maxPower, this._brakeStyle, this.useProfile()]);
|
||||
} else {
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x0b, 0x00, 0x00, 0x00, 0x00, mapSpeed(speed), 0x64, this._brakeStyle, this.useProfile()]);
|
||||
message = Buffer.from([0x81, this.portId, 0x11, 0x0b, 0x00, 0x00, 0x00, 0x00, mapSpeed(speed), this._maxPower, this._brakeStyle, this.useProfile()]);
|
||||
}
|
||||
message.writeUInt32LE(degrees, 4);
|
||||
this.send(message);
|
||||
|
Loading…
x
Reference in New Issue
Block a user