Added maxpower
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Nathan Kellenicki 2020-05-24 10:15:30 -07:00
parent 9234e9af34
commit bcc59ce81c
95 changed files with 1364 additions and 165 deletions

View File

@ -887,7 +887,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1058,7 +1058,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1230,7 +1230,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1377,7 +1377,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </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> </dd>
@ -1572,7 +1720,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1901,7 +2049,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1980,7 +2128,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1325,7 +1325,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1622,7 +1622,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -2715,7 +2715,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -2394,7 +2394,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -2715,7 +2715,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1170,7 +1170,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -968,7 +968,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -2079,7 +2079,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1506,7 +1506,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1658,7 +1658,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1350,7 +1350,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1022,7 +1022,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -3758,7 +3758,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1398,7 +1398,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -2037,7 +2037,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1398,7 +1398,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -374,7 +374,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -545,7 +545,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -717,7 +717,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -864,7 +864,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </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> </dd>
@ -1059,7 +1207,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1244,7 +1392,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1323,7 +1471,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1170,7 +1170,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -2124,7 +2124,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -374,7 +374,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -545,7 +545,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -717,7 +717,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -864,7 +864,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </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> </dd>
@ -1059,7 +1207,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1244,7 +1392,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1323,7 +1471,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1194,7 +1194,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -3936,7 +3936,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -3936,7 +3936,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1212,7 +1212,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -2124,7 +2124,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1170,7 +1170,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1022,7 +1022,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1477,7 +1477,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1639,7 +1639,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1802,7 +1802,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1940,7 +1940,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </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> </dd>
@ -2297,7 +2436,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -2594,7 +2733,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -2673,7 +2812,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1458,7 +1458,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1552,7 +1552,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1458,7 +1458,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -914,7 +914,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1085,7 +1085,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1257,7 +1257,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1404,7 +1404,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </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> </dd>
@ -1599,7 +1747,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1937,7 +2085,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -2016,7 +2164,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -914,7 +914,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1085,7 +1085,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1257,7 +1257,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1404,7 +1404,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </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> </dd>
@ -1599,7 +1747,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1937,7 +2085,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -2016,7 +2164,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -914,7 +914,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1085,7 +1085,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1257,7 +1257,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1404,7 +1404,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </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> </dd>
@ -1599,7 +1747,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1937,7 +2085,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -2016,7 +2164,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -2124,7 +2124,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1218,7 +1218,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1218,7 +1218,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1218,7 +1218,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -914,7 +914,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1085,7 +1085,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1257,7 +1257,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1404,7 +1404,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </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> </dd>
@ -1599,7 +1747,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -1937,7 +2085,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -2016,7 +2164,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1194,7 +1194,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1658,7 +1658,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1170,7 +1170,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -1854,7 +1854,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -557,7 +557,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -3926,7 +3926,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -4394,7 +4394,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -6155,7 +6155,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -7613,7 +7613,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -7919,7 +7919,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -8225,7 +8225,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -9278,7 +9278,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_tachomotor.js.html">devices/tachomotor.js</a>, <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> </li>
</ul> </ul>
</dd> </dd>
@ -9831,7 +9831,7 @@
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -137,12 +137,12 @@ class AbsoluteMotor extends tachomotor_1.TachoMotor {
} }
let message; let message;
if (angle instanceof Array) { 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[0]), 4);
message.writeInt32LE(utils_1.normalizeAngle(angle[1]), 8); message.writeInt32LE(utils_1.normalizeAngle(angle[1]), 8);
} }
else { 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); message.writeInt32LE(utils_1.normalizeAngle(angle), 4);
} }
this.send(message); this.send(message);
@ -252,7 +252,7 @@ exports.ModeMap = {
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -192,7 +192,7 @@ exports.BasicMotor = BasicMotor;
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -319,7 +319,7 @@ var Output;
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -186,7 +186,7 @@ const MaxCurrentRaw = {
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -288,7 +288,7 @@ exports.Device = Device;
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -195,7 +195,7 @@ exports.ModeMap = {
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -143,7 +143,7 @@ exports.DuploTrainBaseMotor = DuploTrainBaseMotor;
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -171,7 +171,7 @@ var Mode;
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -165,7 +165,7 @@ exports.ModeMap = {
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -191,7 +191,7 @@ var Mode;
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -177,7 +177,7 @@ exports.Light = Light;
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -143,7 +143,7 @@ exports.MediumLinearMotor = MediumLinearMotor;
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -169,7 +169,7 @@ exports.ModeMap = {
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -143,7 +143,7 @@ exports.MoveHubMediumLinearMotor = MoveHubMediumLinearMotor;
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -167,7 +167,7 @@ exports.ModeMap = {
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -159,7 +159,7 @@ exports.PiezoBuzzer = PiezoBuzzer;
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -171,7 +171,7 @@ exports.ButtonState = {
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -143,7 +143,7 @@ exports.SimpleMediumLinearMotor = SimpleMediumLinearMotor;
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -97,6 +97,7 @@ class TachoMotor extends basicmotor_1.BasicMotor {
constructor(hub, portId, modeMap = {}, type = Consts.DeviceType.UNKNOWN) { constructor(hub, portId, modeMap = {}, type = Consts.DeviceType.UNKNOWN) {
super(hub, portId, Object.assign({}, modeMap, exports.ModeMap), type); super(hub, portId, Object.assign({}, modeMap, exports.ModeMap), type);
this._brakeStyle = Consts.BrakingStyle.BRAKE; this._brakeStyle = Consts.BrakingStyle.BRAKE;
this._maxPower = 100;
this.useAccelerationProfile = true; this.useAccelerationProfile = true;
this.useDecelerationProfile = true; this.useDecelerationProfile = true;
} }
@ -125,6 +126,16 @@ class TachoMotor extends basicmotor_1.BasicMotor {
setBrakingStyle(style) { setBrakingStyle(style) {
this._brakeStyle = 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 * Set the global acceleration time
* @method TachoMotor#setAccelerationTime * @method TachoMotor#setAccelerationTime
@ -170,19 +181,19 @@ class TachoMotor extends basicmotor_1.BasicMotor {
let message; let message;
if (time !== undefined) { if (time !== undefined) {
if (speed instanceof Array) { 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 { 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); message.writeUInt16LE(time, 4);
} }
else { else {
if (speed instanceof Array) { 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 { 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); this.send(message);
@ -213,10 +224,10 @@ class TachoMotor extends basicmotor_1.BasicMotor {
} }
let message; let message;
if (speed instanceof Array) { 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 { 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); message.writeUInt32LE(degrees, 4);
this.send(message); this.send(message);
@ -289,7 +300,7 @@ exports.ModeMap = {
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -191,7 +191,7 @@ exports.ModeMap = {
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -189,7 +189,7 @@ exports.ModeMap = {
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -189,7 +189,7 @@ exports.ModeMap = {
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -143,7 +143,7 @@ exports.TechnicLargeAngularMotor = TechnicLargeAngularMotor;
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -143,7 +143,7 @@ exports.TechnicLargeLinearMotor = TechnicLargeLinearMotor;
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -143,7 +143,7 @@ exports.TechnicMediumAngularMotor = TechnicMediumAngularMotor;
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -169,7 +169,7 @@ exports.ModeMap = {
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -169,7 +169,7 @@ exports.ModeMap = {
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -169,7 +169,7 @@ exports.ModeMap = {
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -143,7 +143,7 @@ exports.TechnicXLargeLinearMotor = TechnicXLargeLinearMotor;
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -167,7 +167,7 @@ exports.ModeMap = {
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -143,7 +143,7 @@ exports.TrainMotor = TrainMotor;
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -190,7 +190,7 @@ const MaxVoltageRaw = {
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -477,7 +477,7 @@ exports.BaseHub = BaseHub;
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -182,7 +182,7 @@ exports.BoostMoveHub = BoostMoveHub;
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -179,7 +179,7 @@ exports.ControlPlusHub = ControlPlusHub;
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -166,7 +166,7 @@ exports.PortMap = {
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -178,7 +178,7 @@ exports.PortMap = {
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -456,7 +456,7 @@ exports.LPF2Hub = LPF2Hub;
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -180,7 +180,7 @@ exports.PortMap = {
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -179,7 +179,7 @@ exports.PUPHub = PUPHub;
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -172,7 +172,7 @@ exports.PUPRemote = PUPRemote;
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -168,7 +168,7 @@ exports.PortMap = {
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -174,7 +174,7 @@ exports.PortMap = {
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -319,7 +319,7 @@ exports.PortMap = {
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

View File

@ -410,7 +410,7 @@ console.log(&quot;Scanning for Hubs...&quot;);
<span class="jsdoc-message"> <span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> 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>. using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span> </span>

File diff suppressed because one or more lines are too long

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "node-poweredup", "name": "node-poweredup",
"version": "6.3.0", "version": "6.4.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "node-poweredup", "name": "node-poweredup",
"version": "6.3.0", "version": "6.4.0",
"description": "A Javascript module to interface with LEGO Powered Up components.", "description": "A Javascript module to interface with LEGO Powered Up components.",
"homepage": "https://github.com/nathankellenicki/node-poweredup/", "homepage": "https://github.com/nathankellenicki/node-poweredup/",
"main": "dist/node/index-node.js", "main": "dist/node/index-node.js",

View File

@ -57,11 +57,11 @@ export class AbsoluteMotor extends TachoMotor {
} }
let message; let message;
if (angle instanceof Array) { 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[0]), 4);
message.writeInt32LE(normalizeAngle(angle[1]), 8); message.writeInt32LE(normalizeAngle(angle[1]), 8);
} else { } 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); message.writeInt32LE(normalizeAngle(angle), 4);
} }
this.send(message); this.send(message);

View File

@ -12,6 +12,7 @@ import { mapSpeed } from "../utils";
export class TachoMotor extends BasicMotor { export class TachoMotor extends BasicMotor {
protected _brakeStyle: Consts.BrakingStyle = Consts.BrakingStyle.BRAKE; protected _brakeStyle: Consts.BrakingStyle = Consts.BrakingStyle.BRAKE;
protected _maxPower: number = 100;
public useAccelerationProfile: boolean = true; public useAccelerationProfile: boolean = true;
public useDecelerationProfile: 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 * Set the global acceleration time
* @method TachoMotor#setAccelerationTime * @method TachoMotor#setAccelerationTime
@ -98,16 +111,16 @@ export class TachoMotor extends BasicMotor {
let message; let message;
if (time !== undefined) { if (time !== undefined) {
if (speed instanceof Array) { 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 { } 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); message.writeUInt16LE(time, 4);
} else { } else {
if (speed instanceof Array) { 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 { } 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); this.send(message);
@ -139,9 +152,9 @@ export class TachoMotor extends BasicMotor {
} }
let message; let message;
if (speed instanceof Array) { 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 { } 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); message.writeUInt32LE(degrees, 4);
this.send(message); this.send(message);