Debug logging and renamed hardStopMotor to brakeMotor
This commit is contained in:
parent
110f65b291
commit
cdb2562d20
@ -1017,6 +1017,168 @@
|
|||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<dt>
|
||||||
|
<h4 class="name" id="brakeMotor"><span class="type-signature"></span>brakeMotor(port)</h4>
|
||||||
|
|
||||||
|
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="description">
|
||||||
|
<p>Fully (hard) stop the motor on a given port.</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>port</code></td>
|
||||||
|
|
||||||
|
|
||||||
|
<td class="type">
|
||||||
|
|
||||||
|
|
||||||
|
<span class="param-type">string</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<td class="description last"></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="boostmovehub.js.html">boostmovehub.js</a>,
|
||||||
|
<a href="boostmovehub.js.html#sunlight-1-line-183">line 183</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Returns:</h5>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="param-desc">
|
||||||
|
<p>Resolved upon successful completion of command.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<dt>
|
||||||
|
Type
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<span class="param-type">Promise</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<dt>
|
<dt>
|
||||||
<h4 class="name" id="connect"><span class="type-signature"></span>connect()</h4>
|
<h4 class="name" id="connect"><span class="type-signature"></span>connect()</h4>
|
||||||
@ -1559,168 +1721,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
<dt>
|
|
||||||
<h4 class="name" id="hardStopMotor"><span class="type-signature"></span>hardStopMotor(port)</h4>
|
|
||||||
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="description">
|
|
||||||
<p>Fully (hard) stop the motor on a given port.</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>port</code></td>
|
|
||||||
|
|
||||||
|
|
||||||
<td class="type">
|
|
||||||
|
|
||||||
|
|
||||||
<span class="param-type">string</span>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</td>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<td class="description last"></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="boostmovehub.js.html">boostmovehub.js</a>,
|
|
||||||
<a href="boostmovehub.js.html#sunlight-1-line-183">line 183</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h5>Returns:</h5>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="param-desc">
|
|
||||||
<p>Resolved upon successful completion of command.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt>
|
|
||||||
Type
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
|
|
||||||
<span class="param-type">Promise</span>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
|
|
||||||
@ -4330,7 +4330,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-157">line 157</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-159">line 159</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -4501,7 +4501,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-257">line 257</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-259">line 259</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -4696,7 +4696,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-273">line 273</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-275">line 275</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -5019,7 +5019,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-247">line 247</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-249">line 249</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -5190,7 +5190,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-302">line 302</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-304">line 304</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -5385,7 +5385,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-290">line 290</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-292">line 292</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
|
@ -1017,6 +1017,168 @@
|
|||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<dt>
|
||||||
|
<h4 class="name" id="brakeMotor"><span class="type-signature"></span>brakeMotor(port)</h4>
|
||||||
|
|
||||||
|
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="description">
|
||||||
|
<p>Fully (hard) stop the motor on a given port.</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>port</code></td>
|
||||||
|
|
||||||
|
|
||||||
|
<td class="type">
|
||||||
|
|
||||||
|
|
||||||
|
<span class="param-type">string</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<td class="description last"></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="duplotrainbase.js.html">duplotrainbase.js</a>,
|
||||||
|
<a href="duplotrainbase.js.html#sunlight-1-line-146">line 146</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Returns:</h5>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="param-desc">
|
||||||
|
<p>Resolved upon successful completion of command.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<dt>
|
||||||
|
Type
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<span class="param-type">Promise</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<dt>
|
<dt>
|
||||||
<h4 class="name" id="connect"><span class="type-signature"></span>connect()</h4>
|
<h4 class="name" id="connect"><span class="type-signature"></span>connect()</h4>
|
||||||
@ -1559,168 +1721,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
<dt>
|
|
||||||
<h4 class="name" id="hardStopMotor"><span class="type-signature"></span>hardStopMotor(port)</h4>
|
|
||||||
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="description">
|
|
||||||
<p>Fully (hard) stop the motor on a given port.</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>port</code></td>
|
|
||||||
|
|
||||||
|
|
||||||
<td class="type">
|
|
||||||
|
|
||||||
|
|
||||||
<span class="param-type">string</span>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</td>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<td class="description last"></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="duplotrainbase.js.html">duplotrainbase.js</a>,
|
|
||||||
<a href="duplotrainbase.js.html#sunlight-1-line-146">line 146</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h5>Returns:</h5>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="param-desc">
|
|
||||||
<p>Resolved upon successful completion of command.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt>
|
|
||||||
Type
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
|
|
||||||
<span class="param-type">Promise</span>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
|
|
||||||
@ -3817,7 +3817,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-257">line 257</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-259">line 259</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -3988,7 +3988,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-350">line 350</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-352">line 352</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
|
@ -3086,7 +3086,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-157">line 157</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-159">line 159</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -3248,7 +3248,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-257">line 257</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-259">line 259</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -3434,7 +3434,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-273">line 273</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-275">line 275</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -3743,7 +3743,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-247">line 247</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-249">line 249</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -3905,7 +3905,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-302">line 302</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-304">line 304</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -4067,7 +4067,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-350">line 350</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-352">line 352</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -4253,7 +4253,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-290">line 290</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-292">line 292</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
|
334
docs/PUPHub.html
334
docs/PUPHub.html
@ -1017,6 +1017,168 @@
|
|||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<dt>
|
||||||
|
<h4 class="name" id="brakeMotor"><span class="type-signature"></span>brakeMotor(port)</h4>
|
||||||
|
|
||||||
|
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="description">
|
||||||
|
<p>Fully (hard) stop the motor on a given port.</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>port</code></td>
|
||||||
|
|
||||||
|
|
||||||
|
<td class="type">
|
||||||
|
|
||||||
|
|
||||||
|
<span class="param-type">string</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<td class="description last"></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="puphub.js.html">puphub.js</a>,
|
||||||
|
<a href="puphub.js.html#sunlight-1-line-140">line 140</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Returns:</h5>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="param-desc">
|
||||||
|
<p>Resolved upon successful completion of command.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<dt>
|
||||||
|
Type
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<span class="param-type">Promise</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<dt>
|
<dt>
|
||||||
<h4 class="name" id="connect"><span class="type-signature"></span>connect()</h4>
|
<h4 class="name" id="connect"><span class="type-signature"></span>connect()</h4>
|
||||||
@ -1559,168 +1721,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
<dt>
|
|
||||||
<h4 class="name" id="hardStopMotor"><span class="type-signature"></span>hardStopMotor(port)</h4>
|
|
||||||
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="description">
|
|
||||||
<p>Fully (hard) stop the motor on a given port.</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>port</code></td>
|
|
||||||
|
|
||||||
|
|
||||||
<td class="type">
|
|
||||||
|
|
||||||
|
|
||||||
<span class="param-type">string</span>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</td>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<td class="description last"></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="puphub.js.html">puphub.js</a>,
|
|
||||||
<a href="puphub.js.html#sunlight-1-line-140">line 140</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h5>Returns:</h5>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="param-desc">
|
|
||||||
<p>Resolved upon successful completion of command.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt>
|
|
||||||
Type
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
|
|
||||||
<span class="param-type">Promise</span>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
|
|
||||||
@ -4073,7 +4073,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-157">line 157</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-159">line 159</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -4244,7 +4244,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-257">line 257</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-259">line 259</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -4439,7 +4439,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-273">line 273</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-275">line 275</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -4762,7 +4762,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-247">line 247</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-249">line 249</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -4957,7 +4957,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-290">line 290</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-292">line 292</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
|
@ -3014,7 +3014,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-157">line 157</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-159">line 159</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -3209,7 +3209,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-273">line 273</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-275">line 275</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
|
@ -985,6 +985,168 @@
|
|||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<dt>
|
||||||
|
<h4 class="name" id="brakeMotor"><span class="type-signature"></span>brakeMotor(port)</h4>
|
||||||
|
|
||||||
|
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="description">
|
||||||
|
<p>Fully (hard) stop the motor on a given port.</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>port</code></td>
|
||||||
|
|
||||||
|
|
||||||
|
<td class="type">
|
||||||
|
|
||||||
|
|
||||||
|
<span class="param-type">string</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<td class="description last"></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="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
||||||
|
<a href="wedo2smarthub.js.html#sunlight-1-line-171">line 171</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Returns:</h5>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="param-desc">
|
||||||
|
<p>Resolved upon successful completion of command.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<dt>
|
||||||
|
Type
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<span class="param-type">Promise</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<dt>
|
<dt>
|
||||||
<h4 class="name" id="connect"><span class="type-signature"></span>connect()</h4>
|
<h4 class="name" id="connect"><span class="type-signature"></span>connect()</h4>
|
||||||
@ -1512,168 +1674,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
<dt>
|
|
||||||
<h4 class="name" id="hardStopMotor"><span class="type-signature"></span>hardStopMotor(port)</h4>
|
|
||||||
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="description">
|
|
||||||
<p>Fully (hard) stop the motor on a given port.</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>port</code></td>
|
|
||||||
|
|
||||||
|
|
||||||
<td class="type">
|
|
||||||
|
|
||||||
|
|
||||||
<span class="param-type">string</span>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</td>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<td class="description last"></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="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
|
||||||
<a href="wedo2smarthub.js.html#sunlight-1-line-171">line 171</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h5>Returns:</h5>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="param-desc">
|
|
||||||
<p>Resolved upon successful completion of command.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt>
|
|
||||||
Type
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
|
|
||||||
<span class="param-type">Promise</span>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
|
|
||||||
@ -4148,7 +4148,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
||||||
<a href="wedo2smarthub.js.html#sunlight-1-line-262">line 262</a>
|
<a href="wedo2smarthub.js.html#sunlight-1-line-268">line 268</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -4310,7 +4310,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
||||||
<a href="wedo2smarthub.js.html#sunlight-1-line-307">line 307</a>
|
<a href="wedo2smarthub.js.html#sunlight-1-line-313">line 313</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -4619,7 +4619,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
||||||
<a href="wedo2smarthub.js.html#sunlight-1-line-296">line 296</a>
|
<a href="wedo2smarthub.js.html#sunlight-1-line-302">line 302</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -4781,7 +4781,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
||||||
<a href="wedo2smarthub.js.html#sunlight-1-line-337">line 337</a>
|
<a href="wedo2smarthub.js.html#sunlight-1-line-343">line 343</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -4967,7 +4967,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
||||||
<a href="wedo2smarthub.js.html#sunlight-1-line-325">line 325</a>
|
<a href="wedo2smarthub.js.html#sunlight-1-line-331">line 331</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
|
@ -268,11 +268,11 @@ class BoostMoveHub extends lpf2hub_1.LPF2Hub {
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Fully (hard) stop the motor on a given port.
|
* Fully (hard) stop the motor on a given port.
|
||||||
* @method BoostMoveHub#hardStopMotor
|
* @method BoostMoveHub#brakeMotor
|
||||||
* @param {string} port
|
* @param {string} port
|
||||||
* @returns {Promise} Resolved upon successful completion of command.
|
* @returns {Promise} Resolved upon successful completion of command.
|
||||||
*/
|
*/
|
||||||
hardStopMotor(port) {
|
brakeMotor(port) {
|
||||||
return this.setMotorSpeed(port, 127);
|
return this.setMotorSpeed(port, 127);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -506,7 +506,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-157">line 157</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-159">line 159</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -677,7 +677,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-257">line 257</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-259">line 259</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -872,7 +872,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-273">line 273</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-275">line 275</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -1195,7 +1195,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-247">line 247</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-249">line 249</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -1366,7 +1366,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-302">line 302</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-304">line 304</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -1561,7 +1561,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-290">line 290</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-292">line 292</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -1732,7 +1732,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-257">line 257</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-259">line 259</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -1903,7 +1903,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-350">line 350</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-352">line 352</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -2536,7 +2536,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-157">line 157</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-159">line 159</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -2698,7 +2698,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-257">line 257</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-259">line 259</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -2884,7 +2884,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-273">line 273</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-275">line 275</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -3193,7 +3193,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-247">line 247</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-249">line 249</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -3355,7 +3355,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-302">line 302</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-304">line 304</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -3517,7 +3517,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-350">line 350</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-352">line 352</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -3703,7 +3703,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-290">line 290</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-292">line 292</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -4200,7 +4200,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-157">line 157</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-159">line 159</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -4371,7 +4371,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-257">line 257</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-259">line 259</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -4566,7 +4566,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-273">line 273</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-275">line 275</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -4889,7 +4889,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-247">line 247</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-249">line 249</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -5084,7 +5084,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-290">line 290</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-292">line 292</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -5255,7 +5255,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-157">line 157</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-159">line 159</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -5450,7 +5450,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
<a href="lpf2hub.js.html">lpf2hub.js</a>,
|
||||||
<a href="lpf2hub.js.html#sunlight-1-line-273">line 273</a>
|
<a href="lpf2hub.js.html#sunlight-1-line-275">line 275</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -5783,7 +5783,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
||||||
<a href="wedo2smarthub.js.html#sunlight-1-line-262">line 262</a>
|
<a href="wedo2smarthub.js.html#sunlight-1-line-268">line 268</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -5945,7 +5945,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
||||||
<a href="wedo2smarthub.js.html#sunlight-1-line-307">line 307</a>
|
<a href="wedo2smarthub.js.html#sunlight-1-line-313">line 313</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -6254,7 +6254,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
||||||
<a href="wedo2smarthub.js.html#sunlight-1-line-296">line 296</a>
|
<a href="wedo2smarthub.js.html#sunlight-1-line-302">line 302</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -6416,7 +6416,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
||||||
<a href="wedo2smarthub.js.html#sunlight-1-line-337">line 337</a>
|
<a href="wedo2smarthub.js.html#sunlight-1-line-343">line 343</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
@ -6602,7 +6602,7 @@
|
|||||||
<ul class="dummy">
|
<ul class="dummy">
|
||||||
<li>
|
<li>
|
||||||
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
||||||
<a href="wedo2smarthub.js.html#sunlight-1-line-325">line 325</a>
|
<a href="wedo2smarthub.js.html#sunlight-1-line-331">line 331</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
|
@ -231,11 +231,11 @@ class DuploTrainBase extends lpf2hub_1.LPF2Hub {
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Fully (hard) stop the motor on a given port.
|
* Fully (hard) stop the motor on a given port.
|
||||||
* @method DuploTrainBase#hardStopMotor
|
* @method DuploTrainBase#brakeMotor
|
||||||
* @param {string} port
|
* @param {string} port
|
||||||
* @returns {Promise} Resolved upon successful completion of command.
|
* @returns {Promise} Resolved upon successful completion of command.
|
||||||
*/
|
*/
|
||||||
hardStopMotor(port) {
|
brakeMotor(port) {
|
||||||
return this.setMotorSpeed(port, 127);
|
return this.setMotorSpeed(port, 127);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -199,6 +199,7 @@ class LPF2Hub extends hub_1.Hub {
|
|||||||
if (characteristic) {
|
if (characteristic) {
|
||||||
message = Buffer.concat([Buffer.alloc(2), message]);
|
message = Buffer.concat([Buffer.alloc(2), message]);
|
||||||
message[0] = message.length;
|
message[0] = message.length;
|
||||||
|
debug("Sent Message (LPF2_ALL)", message);
|
||||||
characteristic.write(message, false, callback);
|
characteristic.write(message, false, callback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -213,6 +214,7 @@ class LPF2Hub extends hub_1.Hub {
|
|||||||
if (len >= this._messageBuffer.length) {
|
if (len >= this._messageBuffer.length) {
|
||||||
const message = this._messageBuffer.slice(0, len);
|
const message = this._messageBuffer.slice(0, len);
|
||||||
this._messageBuffer = this._messageBuffer.slice(len);
|
this._messageBuffer = this._messageBuffer.slice(len);
|
||||||
|
debug("Received Message (LPF2_ALL)", message);
|
||||||
switch (message[2]) {
|
switch (message[2]) {
|
||||||
case 0x01: {
|
case 0x01: {
|
||||||
this._parseDeviceInfo(message);
|
this._parseDeviceInfo(message);
|
||||||
|
@ -225,11 +225,11 @@ class PUPHub extends lpf2hub_1.LPF2Hub {
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Fully (hard) stop the motor on a given port.
|
* Fully (hard) stop the motor on a given port.
|
||||||
* @method PUPHub#hardStopMotor
|
* @method PUPHub#brakeMotor
|
||||||
* @param {string} port
|
* @param {string} port
|
||||||
* @returns {Promise} Resolved upon successful completion of command.
|
* @returns {Promise} Resolved upon successful completion of command.
|
||||||
*/
|
*/
|
||||||
hardStopMotor(port) {
|
brakeMotor(port) {
|
||||||
return this.setMotorSpeed(port, 127);
|
return this.setMotorSpeed(port, 127);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
File diff suppressed because one or more lines are too long
@ -256,11 +256,11 @@ class WeDo2SmartHub extends hub_1.Hub {
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Fully (hard) stop the motor on a given port.
|
* Fully (hard) stop the motor on a given port.
|
||||||
* @method WeDo2SmartHub#hardStopMotor
|
* @method WeDo2SmartHub#brakeMotor
|
||||||
* @param {string} port
|
* @param {string} port
|
||||||
* @returns {Promise} Resolved upon successful completion of command.
|
* @returns {Promise} Resolved upon successful completion of command.
|
||||||
*/
|
*/
|
||||||
hardStopMotor(port) {
|
brakeMotor(port) {
|
||||||
return this.setMotorSpeed(port, 127);
|
return this.setMotorSpeed(port, 127);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -322,20 +322,25 @@ class WeDo2SmartHub extends hub_1.Hub {
|
|||||||
_writeMessage(uuid, message, callback) {
|
_writeMessage(uuid, message, callback) {
|
||||||
const characteristic = this._getCharacteristic(uuid);
|
const characteristic = this._getCharacteristic(uuid);
|
||||||
if (characteristic) {
|
if (characteristic) {
|
||||||
|
debug(`Sent Message (${uuid})`, message);
|
||||||
characteristic.write(message, false, callback);
|
characteristic.write(message, false, callback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_parseHighCurrentAlert(data) {
|
_parseHighCurrentAlert(data) {
|
||||||
|
debug("Received Message (WEDO2_HIGH_CURRENT_ALERT)", data);
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
}
|
}
|
||||||
_parseBatteryMessage(data) {
|
_parseBatteryMessage(data) {
|
||||||
|
debug("Received Message (WEDO2_BATTERY)", data);
|
||||||
this._batteryLevel = data[0];
|
this._batteryLevel = data[0];
|
||||||
}
|
}
|
||||||
_parseFirmwareRevisionString(data) {
|
_parseFirmwareRevisionString(data) {
|
||||||
|
debug("Received Message (WEDO2_FIRMWARE_REVISION)", data);
|
||||||
const parts = data.toString().split(".");
|
const parts = data.toString().split(".");
|
||||||
this._firmwareInfo = { major: parseInt(parts[0], 10), minor: parseInt(parts[1], 10), bugFix: parseInt(parts[2], 10), build: parseInt(parts[3], 10) };
|
this._firmwareInfo = { major: parseInt(parts[0], 10), minor: parseInt(parts[1], 10), bugFix: parseInt(parts[2], 10), build: parseInt(parts[3], 10) };
|
||||||
}
|
}
|
||||||
_parsePortMessage(data) {
|
_parsePortMessage(data) {
|
||||||
|
debug("Received Message (WEDO2_PORT_TYPE)", data);
|
||||||
const port = this._getPortForPortNumber(data[0]);
|
const port = this._getPortForPortNumber(data[0]);
|
||||||
if (!port) {
|
if (!port) {
|
||||||
return;
|
return;
|
||||||
@ -344,6 +349,7 @@ class WeDo2SmartHub extends hub_1.Hub {
|
|||||||
this._registerDeviceAttachment(port, data[3]);
|
this._registerDeviceAttachment(port, data[3]);
|
||||||
}
|
}
|
||||||
_parseSensorMessage(data) {
|
_parseSensorMessage(data) {
|
||||||
|
debug("Received Message (WEDO2_SENSOR_VALUE)", data);
|
||||||
if (data[0] === 0x01) {
|
if (data[0] === 0x01) {
|
||||||
/**
|
/**
|
||||||
* Emits when a button is pressed.
|
* Emits when a button is pressed.
|
||||||
|
@ -194,11 +194,11 @@ export class BoostMoveHub extends LPF2Hub {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fully (hard) stop the motor on a given port.
|
* Fully (hard) stop the motor on a given port.
|
||||||
* @method BoostMoveHub#hardStopMotor
|
* @method BoostMoveHub#brakeMotor
|
||||||
* @param {string} port
|
* @param {string} port
|
||||||
* @returns {Promise} Resolved upon successful completion of command.
|
* @returns {Promise} Resolved upon successful completion of command.
|
||||||
*/
|
*/
|
||||||
public hardStopMotor (port: string) {
|
public brakeMotor (port: string) {
|
||||||
return this.setMotorSpeed(port, 127);
|
return this.setMotorSpeed(port, 127);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,11 +164,11 @@ export class DuploTrainBase extends LPF2Hub {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fully (hard) stop the motor on a given port.
|
* Fully (hard) stop the motor on a given port.
|
||||||
* @method DuploTrainBase#hardStopMotor
|
* @method DuploTrainBase#brakeMotor
|
||||||
* @param {string} port
|
* @param {string} port
|
||||||
* @returns {Promise} Resolved upon successful completion of command.
|
* @returns {Promise} Resolved upon successful completion of command.
|
||||||
*/
|
*/
|
||||||
public hardStopMotor (port: string) {
|
public brakeMotor (port: string) {
|
||||||
return this.setMotorSpeed(port, 127);
|
return this.setMotorSpeed(port, 127);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,6 +126,7 @@ export class LPF2Hub extends Hub {
|
|||||||
if (characteristic) {
|
if (characteristic) {
|
||||||
message = Buffer.concat([Buffer.alloc(2), message]);
|
message = Buffer.concat([Buffer.alloc(2), message]);
|
||||||
message[0] = message.length;
|
message[0] = message.length;
|
||||||
|
debug("Sent Message (LPF2_ALL)", message);
|
||||||
characteristic.write(message, false, callback);
|
characteristic.write(message, false, callback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -147,6 +148,8 @@ export class LPF2Hub extends Hub {
|
|||||||
const message = this._messageBuffer.slice(0, len);
|
const message = this._messageBuffer.slice(0, len);
|
||||||
this._messageBuffer = this._messageBuffer.slice(len);
|
this._messageBuffer = this._messageBuffer.slice(len);
|
||||||
|
|
||||||
|
debug("Received Message (LPF2_ALL)", message);
|
||||||
|
|
||||||
switch (message[2]) {
|
switch (message[2]) {
|
||||||
case 0x01: {
|
case 0x01: {
|
||||||
this._parseDeviceInfo(message);
|
this._parseDeviceInfo(message);
|
||||||
|
@ -148,11 +148,11 @@ export class PUPHub extends LPF2Hub {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fully (hard) stop the motor on a given port.
|
* Fully (hard) stop the motor on a given port.
|
||||||
* @method PUPHub#hardStopMotor
|
* @method PUPHub#brakeMotor
|
||||||
* @param {string} port
|
* @param {string} port
|
||||||
* @returns {Promise} Resolved upon successful completion of command.
|
* @returns {Promise} Resolved upon successful completion of command.
|
||||||
*/
|
*/
|
||||||
public hardStopMotor (port: string) {
|
public brakeMotor (port: string) {
|
||||||
return this.setMotorSpeed(port, 127);
|
return this.setMotorSpeed(port, 127);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,11 +189,11 @@ export class WeDo2SmartHub extends Hub {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fully (hard) stop the motor on a given port.
|
* Fully (hard) stop the motor on a given port.
|
||||||
* @method WeDo2SmartHub#hardStopMotor
|
* @method WeDo2SmartHub#brakeMotor
|
||||||
* @param {string} port
|
* @param {string} port
|
||||||
* @returns {Promise} Resolved upon successful completion of command.
|
* @returns {Promise} Resolved upon successful completion of command.
|
||||||
*/
|
*/
|
||||||
public hardStopMotor (port: string) {
|
public brakeMotor (port: string) {
|
||||||
return this.setMotorSpeed(port, 127);
|
return this.setMotorSpeed(port, 127);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -266,22 +266,26 @@ export class WeDo2SmartHub extends Hub {
|
|||||||
private _writeMessage (uuid: string, message: Buffer, callback?: () => void) {
|
private _writeMessage (uuid: string, message: Buffer, callback?: () => void) {
|
||||||
const characteristic = this._getCharacteristic(uuid);
|
const characteristic = this._getCharacteristic(uuid);
|
||||||
if (characteristic) {
|
if (characteristic) {
|
||||||
|
debug(`Sent Message (${uuid})`, message);
|
||||||
characteristic.write(message, false, callback);
|
characteristic.write(message, false, callback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private _parseHighCurrentAlert (data: Buffer) {
|
private _parseHighCurrentAlert (data: Buffer) {
|
||||||
|
debug("Received Message (WEDO2_HIGH_CURRENT_ALERT)", data);
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private _parseBatteryMessage (data: Buffer) {
|
private _parseBatteryMessage (data: Buffer) {
|
||||||
|
debug("Received Message (WEDO2_BATTERY)", data);
|
||||||
this._batteryLevel = data[0];
|
this._batteryLevel = data[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private _parseFirmwareRevisionString (data: Buffer) {
|
private _parseFirmwareRevisionString (data: Buffer) {
|
||||||
|
debug("Received Message (WEDO2_FIRMWARE_REVISION)", data);
|
||||||
const parts = data.toString().split(".");
|
const parts = data.toString().split(".");
|
||||||
this._firmwareInfo = { major: parseInt(parts[0], 10), minor: parseInt(parts[1], 10), bugFix: parseInt(parts[2], 10), build: parseInt(parts[3], 10) };
|
this._firmwareInfo = { major: parseInt(parts[0], 10), minor: parseInt(parts[1], 10), bugFix: parseInt(parts[2], 10), build: parseInt(parts[3], 10) };
|
||||||
}
|
}
|
||||||
@ -289,6 +293,8 @@ export class WeDo2SmartHub extends Hub {
|
|||||||
|
|
||||||
private _parsePortMessage (data: Buffer) {
|
private _parsePortMessage (data: Buffer) {
|
||||||
|
|
||||||
|
debug("Received Message (WEDO2_PORT_TYPE)", data);
|
||||||
|
|
||||||
const port = this._getPortForPortNumber(data[0]);
|
const port = this._getPortForPortNumber(data[0]);
|
||||||
|
|
||||||
if (!port) {
|
if (!port) {
|
||||||
@ -303,6 +309,8 @@ export class WeDo2SmartHub extends Hub {
|
|||||||
|
|
||||||
private _parseSensorMessage (data: Buffer) {
|
private _parseSensorMessage (data: Buffer) {
|
||||||
|
|
||||||
|
debug("Received Message (WEDO2_SENSOR_VALUE)", data);
|
||||||
|
|
||||||
if (data[0] === 0x01) {
|
if (data[0] === 0x01) {
|
||||||
/**
|
/**
|
||||||
* Emits when a button is pressed.
|
* Emits when a button is pressed.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user