Added support for the leds on the Technic color sensor
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-31 13:31:53 -07:00
parent 2e2f565ed7
commit 1b2c988409
95 changed files with 333 additions and 96 deletions

View File

@ -2128,7 +2128,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1325,7 +1325,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1622,7 +1622,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -2715,7 +2715,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -2394,7 +2394,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -2715,7 +2715,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1170,7 +1170,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -968,7 +968,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -2079,7 +2079,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1506,7 +1506,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1658,7 +1658,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1350,7 +1350,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1022,7 +1022,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -3758,7 +3758,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1398,7 +1398,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -2037,7 +2037,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1398,7 +1398,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1471,7 +1471,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1170,7 +1170,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -2124,7 +2124,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1471,7 +1471,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1194,7 +1194,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -3936,7 +3936,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -3936,7 +3936,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1212,7 +1212,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -2124,7 +2124,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1170,7 +1170,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1022,7 +1022,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -2812,7 +2812,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -970,6 +970,220 @@
<h3 class="subsection-title">Methods</h3>
<dl>
<hr>
<dt>
<h4 class="name" id="setBrightness"><span class="type-signature"></span>setBrightness(firstSegment, secondSegment, thirdSegment)</h4>
</dt>
<dd>
<div class="description">
<p>Set the brightness (or turn on/off) of the lights around the sensor.</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>firstSegment</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>First light segment. 0-100 brightness.</p></td>
</tr>
<tr>
<td class="name"><code>secondSegment</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Second light segment. 0-100 brightness.</p></td>
</tr>
<tr>
<td class="name"><code>thirdSegment</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Third light segment. 0-100 brightness.</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_techniccolorsensor.js.html">devices/techniccolorsensor.js</a>,
<a href="devices_techniccolorsensor.js.html#sunlight-1-line-57">line 57</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Resolved upon successful issuance of the command.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise</span>
</dd>
</dl>
</dd>
</dl>
@ -1458,7 +1672,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -984,7 +984,7 @@
<div class="description">
<p>Set the brightness (or turn on/off) the lights around the eyes.</p>
<p>Set the brightness (or turn on/off) of the lights around the eyes.</p>
</div>
@ -1552,7 +1552,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1458,7 +1458,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -2164,7 +2164,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -2164,7 +2164,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -2164,7 +2164,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -2124,7 +2124,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1218,7 +1218,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1218,7 +1218,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1218,7 +1218,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -2164,7 +2164,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1194,7 +1194,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1658,7 +1658,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1170,7 +1170,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1854,7 +1854,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -9831,7 +9831,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -250,7 +250,7 @@ exports.ModeMap = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -192,7 +192,7 @@ exports.BasicMotor = BasicMotor;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -319,7 +319,7 @@ var Output;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -186,7 +186,7 @@ const MaxCurrentRaw = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -288,7 +288,7 @@ exports.Device = Device;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -195,7 +195,7 @@ exports.ModeMap = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -143,7 +143,7 @@ exports.DuploTrainBaseMotor = DuploTrainBaseMotor;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -171,7 +171,7 @@ var Mode;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -165,7 +165,7 @@ exports.ModeMap = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -191,7 +191,7 @@ var Mode;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -177,7 +177,7 @@ exports.Light = Light;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -143,7 +143,7 @@ exports.MediumLinearMotor = MediumLinearMotor;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -169,7 +169,7 @@ exports.ModeMap = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -143,7 +143,7 @@ exports.MoveHubMediumLinearMotor = MoveHubMediumLinearMotor;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -167,7 +167,7 @@ exports.ModeMap = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -159,7 +159,7 @@ exports.PiezoBuzzer = PiezoBuzzer;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -171,7 +171,7 @@ exports.ButtonState = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -143,7 +143,7 @@ exports.SimpleMediumLinearMotor = SimpleMediumLinearMotor;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -300,7 +300,7 @@ exports.ModeMap = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -133,6 +133,17 @@ class TechnicColorSensor extends device_1.Device {
break;
}
}
/**
* Set the brightness (or turn on/off) of the lights around the sensor.
* @method TechnicColorSensor#setBrightness
* @param {number} firstSegment First light segment. 0-100 brightness.
* @param {number} secondSegment Second light segment. 0-100 brightness.
* @param {number} thirdSegment Third light segment. 0-100 brightness.
* @returns {Promise} Resolved upon successful issuance of the command.
*/
setBrightness(firstSegment, secondSegment, thirdSegment) {
this.writeDirect(0x03, Buffer.from([firstSegment, secondSegment, thirdSegment]));
}
}
exports.TechnicColorSensor = TechnicColorSensor;
var Mode;
@ -191,7 +202,7 @@ exports.ModeMap = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -122,7 +122,7 @@ class TechnicDistanceSensor extends device_1.Device {
}
}
/**
* Set the brightness (or turn on/off) the lights around the eyes.
* Set the brightness (or turn on/off) of the lights around the eyes.
* @method TechnicDistanceSensor#setBrightness
* @param {number} topLeft Top left quadrant (above left eye). 0-100 brightness.
* @param {number} bottomLeft Bottom left quadrant (below left eye). 0-100 brightness.
@ -189,7 +189,7 @@ exports.ModeMap = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -189,7 +189,7 @@ exports.ModeMap = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -143,7 +143,7 @@ exports.TechnicLargeAngularMotor = TechnicLargeAngularMotor;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -143,7 +143,7 @@ exports.TechnicLargeLinearMotor = TechnicLargeLinearMotor;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -143,7 +143,7 @@ exports.TechnicMediumAngularMotor = TechnicMediumAngularMotor;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -169,7 +169,7 @@ exports.ModeMap = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -169,7 +169,7 @@ exports.ModeMap = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -169,7 +169,7 @@ exports.ModeMap = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -143,7 +143,7 @@ exports.TechnicXLargeLinearMotor = TechnicXLargeLinearMotor;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -167,7 +167,7 @@ exports.ModeMap = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -143,7 +143,7 @@ exports.TrainMotor = TrainMotor;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -190,7 +190,7 @@ const MaxVoltageRaw = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -477,7 +477,7 @@ exports.BaseHub = BaseHub;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -182,7 +182,7 @@ exports.BoostMoveHub = BoostMoveHub;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -179,7 +179,7 @@ exports.ControlPlusHub = ControlPlusHub;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -166,7 +166,7 @@ exports.PortMap = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -178,7 +178,7 @@ exports.PortMap = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -456,7 +456,7 @@ exports.LPF2Hub = LPF2Hub;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -180,7 +180,7 @@ exports.PortMap = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -179,7 +179,7 @@ exports.PUPHub = PUPHub;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -172,7 +172,7 @@ exports.PUPRemote = PUPRemote;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -168,7 +168,7 @@ exports.PortMap = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -174,7 +174,7 @@ exports.PortMap = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -319,7 +319,7 @@ exports.PortMap = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -410,7 +410,7 @@ console.log(&quot;Scanning for Hubs...&quot;);
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Sun May 24th 2020
on Sun May 31st 2020
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

File diff suppressed because one or more lines are too long

2
package-lock.json generated
View File

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

View File

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

View File

@ -58,6 +58,18 @@ export class TechnicColorSensor extends Device {
}
}
/**
* Set the brightness (or turn on/off) of the lights around the sensor.
* @method TechnicColorSensor#setBrightness
* @param {number} firstSegment First light segment. 0-100 brightness.
* @param {number} secondSegment Second light segment. 0-100 brightness.
* @param {number} thirdSegment Third light segment. 0-100 brightness.
* @returns {Promise} Resolved upon successful issuance of the command.
*/
public setBrightness (firstSegment: number, secondSegment: number, thirdSegment: number) {
this.writeDirect(0x03, Buffer.from([firstSegment, secondSegment, thirdSegment]));
}
}
export enum Mode {

View File

@ -45,7 +45,7 @@ export class TechnicDistanceSensor extends Device {
}
/**
* Set the brightness (or turn on/off) the lights around the eyes.
* Set the brightness (or turn on/off) of the lights around the eyes.
* @method TechnicDistanceSensor#setBrightness
* @param {number} topLeft Top left quadrant (above left eye). 0-100 brightness.
* @param {number} bottomLeft Bottom left quadrant (below left eye). 0-100 brightness.