792 lines
63 KiB
HTML
792 lines
63 KiB
HTML
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<title>
|
|
consts.js - Documentation
|
|
</title>
|
|
|
|
<link href="https://www.braintreepayments.com/images/favicon-ccda0b14.png" rel="icon" type="image/png">
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/highlight.min.js"></script>
|
|
<script>hljs.initHighlightingOnLoad();</script>
|
|
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
|
|
|
|
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
|
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
|
|
|
|
|
|
|
|
|
<!-- start Mixpanel -->
|
|
<script type="text/javascript">(function(e,a){if(!a.__SV){var b=window;try{var c,l,i,j=b.location,g=j.hash;c=function(a,b){return(l=a.match(RegExp(b+"=([^&]*)")))?l[1]:null};g&&c(g,"state")&&(i=JSON.parse(decodeURIComponent(c(g,"state"))),"mpeditor"===i.action&&(b.sessionStorage.setItem("_mpcehash",g),history.replaceState(i.desiredHash||"",e.title,j.pathname+j.search)))}catch(m){}var k,h;window.mixpanel=a;a._i=[];a.init=function(b,c,f){function e(b,a){var c=a.split(".");2==c.length&&(b=b[c[0]],a=c[1]);b[a]=function(){b.push([a].concat(Array.prototype.slice.call(arguments,
|
|
0)))}}var d=a;"undefined"!==typeof f?d=a[f]=[]:f="mixpanel";d.people=d.people||[];d.toString=function(b){var a="mixpanel";"mixpanel"!==f&&(a+="."+f);b||(a+=" (stub)");return a};d.people.toString=function(){return d.toString(1)+".people (stub)"};k="disable time_event track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config reset people.set people.set_once people.increment people.append people.union people.track_charge people.clear_charges people.delete_user".split(" ");
|
|
for(h=0;h<k.length;h++)e(d,k[h]);a._i.push([b,c,f])};a.__SV=1.2;b=e.createElement("script");b.type="text/javascript";b.async=!0;b.src="undefined"!==typeof MIXPANEL_CUSTOM_LIB_URL?MIXPANEL_CUSTOM_LIB_URL:"file:"===e.location.protocol&&"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js".match(/^\/\//)?"https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js":"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";c=e.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c)}})(document,window.mixpanel||[]);
|
|
mixpanel.init("1919205b2da72e4da3b9b6639b444d59");</script>
|
|
<!-- end Mixpanel -->
|
|
</head>
|
|
|
|
<body>
|
|
<svg style="display: none;">
|
|
<defs>
|
|
<symbol id="linkIcon" fill="#706d77" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M0 0h24v24H0z" fill="none"/>
|
|
<path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/>
|
|
</symbol>
|
|
</defs>
|
|
</svg>
|
|
|
|
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
|
|
<label for="nav-trigger" class="navicon-button x">
|
|
<div class="navicon"></div>
|
|
</label>
|
|
|
|
<label for="nav-trigger" class="overlay"></label>
|
|
|
|
<div class="top-nav-wrapper">
|
|
<ul>
|
|
<li >
|
|
<a href="index.html">
|
|
|
|
<svg fill="#6D6D6D" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
|
|
<path d="M0 0h24v24H0z" fill="none"/>
|
|
</svg>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
<nav>
|
|
<h3 class="reference-title">
|
|
node-poweredup Reference
|
|
</h3>
|
|
|
|
|
|
|
|
<h3>Classes</h3><ul><li id="AbsoluteMotor-nav"><a href="AbsoluteMotor.html">AbsoluteMotor</a><ul class='methods'><li data-type="method" id="AbsoluteMotor-gotoAngle-nav"><a href="AbsoluteMotor.html#gotoAngle">gotoAngle</a></li><li data-type="method" id="AbsoluteMotor-gotoRealZero-nav"><a href="AbsoluteMotor.html#gotoRealZero">gotoRealZero</a></li><li data-type="method" id="AbsoluteMotor-resetZero-nav"><a href="AbsoluteMotor.html#resetZero">resetZero</a></li><li data-type="method" id="AbsoluteMotor-rotateByDegrees-nav"><a href="AbsoluteMotor.html#rotateByDegrees">rotateByDegrees</a></li><li data-type="method" id="AbsoluteMotor-setAccelerationTime-nav"><a href="AbsoluteMotor.html#setAccelerationTime">setAccelerationTime</a></li><li data-type="method" id="AbsoluteMotor-setBrakingStyle-nav"><a href="AbsoluteMotor.html#setBrakingStyle">setBrakingStyle</a></li><li data-type="method" id="AbsoluteMotor-setDecelerationTime-nav"><a href="AbsoluteMotor.html#setDecelerationTime">setDecelerationTime</a></li><li data-type="method" id="AbsoluteMotor-setMaxPower-nav"><a href="AbsoluteMotor.html#setMaxPower">setMaxPower</a></li><li data-type="method" id="AbsoluteMotor-setSpeed-nav"><a href="AbsoluteMotor.html#setSpeed">setSpeed</a></li></ul></li><li id="BaseHub-nav"><a href="BaseHub.html">BaseHub</a></li><li id="BasicMotor-nav"><a href="BasicMotor.html">BasicMotor</a><ul class='methods'><li data-type="method" id="BasicMotor-brake-nav"><a href="BasicMotor.html#brake">brake</a></li><li data-type="method" id="BasicMotor-rampPower-nav"><a href="BasicMotor.html#rampPower">rampPower</a></li><li data-type="method" id="BasicMotor-setPower-nav"><a href="BasicMotor.html#setPower">setPower</a></li><li data-type="method" id="BasicMotor-stop-nav"><a href="BasicMotor.html#stop">stop</a></li></ul></li><li id="ColorDistanceSensor-nav"><a href="ColorDistanceSensor.html">ColorDistanceSensor</a><ul class='methods'><li data-type="method" id="ColorDistanceSensor-sendPFIRMessage-nav"><a href="ColorDistanceSensor.html#sendPFIRMessage">sendPFIRMessage</a></li><li data-type="method" id="ColorDistanceSensor-setColor-nav"><a href="ColorDistanceSensor.html#setColor">setColor</a></li><li data-type="method" id="ColorDistanceSensor-setDistanceCount-nav"><a href="ColorDistanceSensor.html#setDistanceCount">setDistanceCount</a></li><li data-type="method" id="ColorDistanceSensor-setPFExtendedChannel-nav"><a href="ColorDistanceSensor.html#setPFExtendedChannel">setPFExtendedChannel</a></li><li data-type="method" id="ColorDistanceSensor-setPFPower-nav"><a href="ColorDistanceSensor.html#setPFPower">setPFPower</a></li><li data-type="method" id="ColorDistanceSensor-startPFMotors-nav"><a href="ColorDistanceSensor.html#startPFMotors">startPFMotors</a></li></ul></li><li id="CurrentSensor-nav"><a href="CurrentSensor.html">CurrentSensor</a></li><li id="Device-nav"><a href="Device.html">Device</a></li><li id="DuploTrainBase-nav"><a href="DuploTrainBase.html">DuploTrainBase</a><ul class='methods'><li data-type="method" id="DuploTrainBase-createVirtualPort-nav"><a href="DuploTrainBase.html#createVirtualPort">createVirtualPort</a></li><li data-type="method" id="DuploTrainBase-setName-nav"><a href="DuploTrainBase.html#setName">setName</a></li><li data-type="method" id="DuploTrainBase-shutdown-nav"><a href="DuploTrainBase.html#shutdown">shutdown</a></li></ul></li><li id="DuploTrainBaseColorSensor-nav"><a href="DuploTrainBaseColorSensor.html">DuploTrainBaseColorSensor</a></li><li id="DuploTrainBaseMotor-nav"><a href="DuploTrainBaseMotor.html">DuploTrainBaseMotor</a><ul class='methods'><li data-type="method" id="DuploTrainBaseMotor-brake-nav"><a href="DuploTrainBaseMotor.html#brake">brake</a></li><li data-type="method" id="DuploTrainBaseMotor-rampPower-nav"><a href="DuploTrainBaseMotor.html#rampPower">rampPower</a></li><li data-type="method" id="DuploTrainBaseMotor-setPower-nav"><a href="DuploTrainBaseMotor.html#setPower">setPower</a></li><li data-type="method" id="DuploTrainBaseMotor-stop-nav"><a href="DuploTrainBaseMotor.html#stop">stop</a></li></ul></li><li id="DuploTrainBaseSpeaker-nav"><a href="DuploTrainBaseSpeaker.html">DuploTrainBaseSpeaker</a><ul class='methods'><li data-type="method" id="DuploTrainBaseSpeaker-playSound-nav"><a href="DuploTrainBaseSpeaker.html#playSound">playSound</a></li><li data-type="method" id="DuploTrainBaseSpeaker-playTone-nav"><a href="DuploTrainBaseSpeaker.html#playTone">playTone</a></li></ul></li><li id="DuploTraniBaseSpeedometer-nav"><a href="DuploTraniBaseSpeedometer.html">DuploTraniBaseSpeedometer</a></li><li id="Hub-nav"><a href="Hub.html">Hub</a><ul class='methods'><li data-type="method" id="Hub-connect-nav"><a href="Hub.html#connect">connect</a></li><li data-type="method" id="Hub-createVirtualPort-nav"><a href="Hub.html#createVirtualPort">createVirtualPort</a></li><li data-type="method" id="Hub-disconnect-nav"><a href="Hub.html#disconnect">disconnect</a></li><li data-type="method" id="Hub-getDeviceAtPort-nav"><a href="Hub.html#getDeviceAtPort">getDeviceAtPort</a></li><li data-type="method" id="Hub-getDevices-nav"><a href="Hub.html#getDevices">getDevices</a></li><li data-type="method" id="Hub-getDevicesByType-nav"><a href="Hub.html#getDevicesByType">getDevicesByType</a></li><li data-type="method" id="Hub-setName-nav"><a href="Hub.html#setName">setName</a></li><li data-type="method" id="Hub-shutdown-nav"><a href="Hub.html#shutdown">shutdown</a></li><li data-type="method" id="Hub-sleep-nav"><a href="Hub.html#sleep">sleep</a></li><li data-type="method" id="Hub-wait-nav"><a href="Hub.html#wait">wait</a></li><li data-type="method" id="Hub-waitForDeviceAtPort-nav"><a href="Hub.html#waitForDeviceAtPort">waitForDeviceAtPort</a></li><li data-type="method" id="Hub-waitForDeviceByType-nav"><a href="Hub.html#waitForDeviceByType">waitForDeviceByType</a></li></ul></li><li id="HubLED-nav"><a href="HubLED.html">HubLED</a><ul class='methods'><li data-type="method" id="HubLED-setColor-nav"><a href="HubLED.html#setColor">setColor</a></li><li data-type="method" id="HubLED-setRGB-nav"><a href="HubLED.html#setRGB">setRGB</a></li></ul></li><li id="Light-nav"><a href="Light.html">Light</a><ul class='methods'><li data-type="method" id="Light-rampBrightness-nav"><a href="Light.html#rampBrightness">rampBrightness</a></li><li data-type="method" id="Light-setBrightness-nav"><a href="Light.html#setBrightness">setBrightness</a></li></ul></li><li id="LPF2Hub-nav"><a href="LPF2Hub.html">LPF2Hub</a><ul class='methods'><li data-type="method" id="LPF2Hub-createVirtualPort-nav"><a href="LPF2Hub.html#createVirtualPort">createVirtualPort</a></li><li data-type="method" id="LPF2Hub-setName-nav"><a href="LPF2Hub.html#setName">setName</a></li><li data-type="method" id="LPF2Hub-shutdown-nav"><a href="LPF2Hub.html#shutdown">shutdown</a></li></ul></li><li id="Mario-nav"><a href="Mario.html">Mario</a><ul class='methods'><li data-type="method" id="Mario-createVirtualPort-nav"><a href="Mario.html#createVirtualPort">createVirtualPort</a></li><li data-type="method" id="Mario-setName-nav"><a href="Mario.html#setName">setName</a></li><li data-type="method" id="Mario-shutdown-nav"><a href="Mario.html#shutdown">shutdown</a></li></ul></li><li id="MarioAccelerometer-nav"><a href="MarioAccelerometer.html">MarioAccelerometer</a></li><li id="MarioBarcodeSensor-nav"><a href="MarioBarcodeSensor.html">MarioBarcodeSensor</a></li><li id="MarioPantsSensor-nav"><a href="MarioPantsSensor.html">MarioPantsSensor</a></li><li id="MediumLinearMotor-nav"><a href="MediumLinearMotor.html">MediumLinearMotor</a><ul class='methods'><li data-type="method" id="MediumLinearMotor-rotateByDegrees-nav"><a href="MediumLinearMotor.html#rotateByDegrees">rotateByDegrees</a></li><li data-type="method" id="MediumLinearMotor-setAccelerationTime-nav"><a href="MediumLinearMotor.html#setAccelerationTime">setAccelerationTime</a></li><li data-type="method" id="MediumLinearMotor-setBrakingStyle-nav"><a href="MediumLinearMotor.html#setBrakingStyle">setBrakingStyle</a></li><li data-type="method" id="MediumLinearMotor-setDecelerationTime-nav"><a href="MediumLinearMotor.html#setDecelerationTime">setDecelerationTime</a></li><li data-type="method" id="MediumLinearMotor-setMaxPower-nav"><a href="MediumLinearMotor.html#setMaxPower">setMaxPower</a></li><li data-type="method" id="MediumLinearMotor-setSpeed-nav"><a href="MediumLinearMotor.html#setSpeed">setSpeed</a></li></ul></li><li id="MotionSensor-nav"><a href="MotionSensor.html">MotionSensor</a></li><li id="MoveHub-nav"><a href="MoveHub.html">MoveHub</a><ul class='methods'><li data-type="method" id="MoveHub-createVirtualPort-nav"><a href="MoveHub.html#createVirtualPort">createVirtualPort</a></li><li data-type="method" id="MoveHub-setName-nav"><a href="MoveHub.html#setName">setName</a></li><li data-type="method" id="MoveHub-shutdown-nav"><a href="MoveHub.html#shutdown">shutdown</a></li></ul></li><li id="MoveHubMediumLinearMotor-nav"><a href="MoveHubMediumLinearMotor.html">MoveHubMediumLinearMotor</a><ul class='methods'><li data-type="method" id="MoveHubMediumLinearMotor-rotateByDegrees-nav"><a href="MoveHubMediumLinearMotor.html#rotateByDegrees">rotateByDegrees</a></li><li data-type="method" id="MoveHubMediumLinearMotor-setAccelerationTime-nav"><a href="MoveHubMediumLinearMotor.html#setAccelerationTime">setAccelerationTime</a></li><li data-type="method" id="MoveHubMediumLinearMotor-setBrakingStyle-nav"><a href="MoveHubMediumLinearMotor.html#setBrakingStyle">setBrakingStyle</a></li><li data-type="method" id="MoveHubMediumLinearMotor-setDecelerationTime-nav"><a href="MoveHubMediumLinearMotor.html#setDecelerationTime">setDecelerationTime</a></li><li data-type="method" id="MoveHubMediumLinearMotor-setMaxPower-nav"><a href="MoveHubMediumLinearMotor.html#setMaxPower">setMaxPower</a></li><li data-type="method" id="MoveHubMediumLinearMotor-setSpeed-nav"><a href="MoveHubMediumLinearMotor.html#setSpeed">setSpeed</a></li></ul></li><li id="MoveHubTiltSensor-nav"><a href="MoveHubTiltSensor.html">MoveHubTiltSensor</a></li><li id="PiezoBuzzer-nav"><a href="PiezoBuzzer.html">PiezoBuzzer</a><ul class='methods'><li data-type="method" id="PiezoBuzzer-playTone-nav"><a href="PiezoBuzzer.html#playTone">playTone</a></li></ul></li><li id="PoweredUP-nav"><a href="PoweredUP.html">PoweredUP</a><ul class='methods'><li data-type="method" id="PoweredUP-getHubByPrimaryMACAddress-nav"><a href="PoweredUP.html#getHubByPrimaryMACAddress">getHubByPrimaryMACAddress</a></li><li data-type="method" id="PoweredUP-getHubByPrimaryMACAddress-nav"><a href="PoweredUP.html#getHubByPrimaryMACAddress">getHubByPrimaryMACAddress</a></li><li data-type="method" id="PoweredUP-getHubByUUID-nav"><a href="PoweredUP.html#getHubByUUID">getHubByUUID</a></li><li data-type="method" id="PoweredUP-getHubByUUID-nav"><a href="PoweredUP.html#getHubByUUID">getHubByUUID</a></li><li data-type="method" id="PoweredUP-getHubs-nav"><a href="PoweredUP.html#getHubs">getHubs</a></li><li data-type="method" id="PoweredUP-getHubs-nav"><a href="PoweredUP.html#getHubs">getHubs</a></li><li data-type="method" id="PoweredUP-getHubsByName-nav"><a href="PoweredUP.html#getHubsByName">getHubsByName</a></li><li data-type="method" id="PoweredUP-getHubsByName-nav"><a href="PoweredUP.html#getHubsByName">getHubsByName</a></li><li data-type="method" id="PoweredUP-getHubsByType-nav"><a href="PoweredUP.html#getHubsByType">getHubsByType</a></li><li data-type="method" id="PoweredUP-getHubsByType-nav"><a href="PoweredUP.html#getHubsByType">getHubsByType</a></li><li data-type="method" id="PoweredUP-scan-nav"><a href="PoweredUP.html#scan">scan</a></li><li data-type="method" id="PoweredUP-scan-nav"><a href="PoweredUP.html#scan">scan</a></li><li data-type="method" id="PoweredUP-stop-nav"><a href="PoweredUP.html#stop">stop</a></li></ul></li><li id="RemoteControl-nav"><a href="RemoteControl.html">RemoteControl</a><ul class='methods'><li data-type="method" id="RemoteControl-createVirtualPort-nav"><a href="RemoteControl.html#createVirtualPort">createVirtualPort</a></li><li data-type="method" id="RemoteControl-setName-nav"><a href="RemoteControl.html#setName">setName</a></li><li data-type="method" id="RemoteControl-shutdown-nav"><a href="RemoteControl.html#shutdown">shutdown</a></li></ul></li><li id="RemoteControlButton-nav"><a href="RemoteControlButton.html">RemoteControlButton</a></li><li id="SimpleMediumLinearMotor-nav"><a href="SimpleMediumLinearMotor.html">SimpleMediumLinearMotor</a></li><li id="TachoMotor-nav"><a href="TachoMotor.html">TachoMotor</a><ul class='methods'><li data-type="method" id="TachoMotor-brake-nav"><a href="TachoMotor.html#brake">brake</a></li><li data-type="method" id="TachoMotor-rampPower-nav"><a href="TachoMotor.html#rampPower">rampPower</a></li><li data-type="method" id="TachoMotor-rotateByDegrees-nav"><a href="TachoMotor.html#rotateByDegrees">rotateByDegrees</a></li><li data-type="method" id="TachoMotor-setAccelerationTime-nav"><a href="TachoMotor.html#setAccelerationTime">setAccelerationTime</a></li><li data-type="method" id="TachoMotor-setBrakingStyle-nav"><a href="TachoMotor.html#setBrakingStyle">setBrakingStyle</a></li><li data-type="method" id="TachoMotor-setDecelerationTime-nav"><a href="TachoMotor.html#setDecelerationTime">setDecelerationTime</a></li><li data-type="method" id="TachoMotor-setMaxPower-nav"><a href="TachoMotor.html#setMaxPower">setMaxPower</a></li><li data-type="method" id="TachoMotor-setPower-nav"><a href="TachoMotor.html#setPower">setPower</a></li><li data-type="method" id="TachoMotor-setSpeed-nav"><a href="TachoMotor.html#setSpeed">setSpeed</a></li><li data-type="method" id="TachoMotor-stop-nav"><a href="TachoMotor.html#stop">stop</a></li></ul></li><li id="Technic3x3ColorLightMatrix-nav"><a href="Technic3x3ColorLightMatrix.html">Technic3x3ColorLightMatrix</a><ul class='methods'><li data-type="method" id="Technic3x3ColorLightMatrix-setMatrix-nav"><a href="Technic3x3ColorLightMatrix.html#setMatrix">setMatrix</a></li></ul></li><li id="TechnicColorSensor-nav"><a href="TechnicColorSensor.html">TechnicColorSensor</a><ul class='methods'><li data-type="method" id="TechnicColorSensor-setBrightness-nav"><a href="TechnicColorSensor.html#setBrightness">setBrightness</a></li></ul></li><li id="TechnicDistanceSensor-nav"><a href="TechnicDistanceSensor.html">TechnicDistanceSensor</a><ul class='methods'><li data-type="method" id="TechnicDistanceSensor-setBrightness-nav"><a href="TechnicDistanceSensor.html#setBrightness">setBrightness</a></li></ul></li><li id="TechnicForceSensor-nav"><a href="TechnicForceSensor.html">TechnicForceSensor</a></li><li id="TechnicLargeAngularMotor-nav"><a href="TechnicLargeAngularMotor.html">TechnicLargeAngularMotor</a><ul class='methods'><li data-type="method" id="TechnicLargeAngularMotor-gotoAngle-nav"><a href="TechnicLargeAngularMotor.html#gotoAngle">gotoAngle</a></li><li data-type="method" id="TechnicLargeAngularMotor-gotoRealZero-nav"><a href="TechnicLargeAngularMotor.html#gotoRealZero">gotoRealZero</a></li><li data-type="method" id="TechnicLargeAngularMotor-resetZero-nav"><a href="TechnicLargeAngularMotor.html#resetZero">resetZero</a></li><li data-type="method" id="TechnicLargeAngularMotor-rotateByDegrees-nav"><a href="TechnicLargeAngularMotor.html#rotateByDegrees">rotateByDegrees</a></li><li data-type="method" id="TechnicLargeAngularMotor-setAccelerationTime-nav"><a href="TechnicLargeAngularMotor.html#setAccelerationTime">setAccelerationTime</a></li><li data-type="method" id="TechnicLargeAngularMotor-setBrakingStyle-nav"><a href="TechnicLargeAngularMotor.html#setBrakingStyle">setBrakingStyle</a></li><li data-type="method" id="TechnicLargeAngularMotor-setDecelerationTime-nav"><a href="TechnicLargeAngularMotor.html#setDecelerationTime">setDecelerationTime</a></li><li data-type="method" id="TechnicLargeAngularMotor-setMaxPower-nav"><a href="TechnicLargeAngularMotor.html#setMaxPower">setMaxPower</a></li><li data-type="method" id="TechnicLargeAngularMotor-setSpeed-nav"><a href="TechnicLargeAngularMotor.html#setSpeed">setSpeed</a></li></ul></li><li id="TechnicLargeLinearMotor-nav"><a href="TechnicLargeLinearMotor.html">TechnicLargeLinearMotor</a><ul class='methods'><li data-type="method" id="TechnicLargeLinearMotor-gotoAngle-nav"><a href="TechnicLargeLinearMotor.html#gotoAngle">gotoAngle</a></li><li data-type="method" id="TechnicLargeLinearMotor-gotoRealZero-nav"><a href="TechnicLargeLinearMotor.html#gotoRealZero">gotoRealZero</a></li><li data-type="method" id="TechnicLargeLinearMotor-resetZero-nav"><a href="TechnicLargeLinearMotor.html#resetZero">resetZero</a></li><li data-type="method" id="TechnicLargeLinearMotor-rotateByDegrees-nav"><a href="TechnicLargeLinearMotor.html#rotateByDegrees">rotateByDegrees</a></li><li data-type="method" id="TechnicLargeLinearMotor-setAccelerationTime-nav"><a href="TechnicLargeLinearMotor.html#setAccelerationTime">setAccelerationTime</a></li><li data-type="method" id="TechnicLargeLinearMotor-setBrakingStyle-nav"><a href="TechnicLargeLinearMotor.html#setBrakingStyle">setBrakingStyle</a></li><li data-type="method" id="TechnicLargeLinearMotor-setDecelerationTime-nav"><a href="TechnicLargeLinearMotor.html#setDecelerationTime">setDecelerationTime</a></li><li data-type="method" id="TechnicLargeLinearMotor-setMaxPower-nav"><a href="TechnicLargeLinearMotor.html#setMaxPower">setMaxPower</a></li><li data-type="method" id="TechnicLargeLinearMotor-setSpeed-nav"><a href="TechnicLargeLinearMotor.html#setSpeed">setSpeed</a></li></ul></li><li id="TechnicMediumAngularMotor-nav"><a href="TechnicMediumAngularMotor.html">TechnicMediumAngularMotor</a><ul class='methods'><li data-type="method" id="TechnicMediumAngularMotor-gotoAngle-nav"><a href="TechnicMediumAngularMotor.html#gotoAngle">gotoAngle</a></li><li data-type="method" id="TechnicMediumAngularMotor-gotoRealZero-nav"><a href="TechnicMediumAngularMotor.html#gotoRealZero">gotoRealZero</a></li><li data-type="method" id="TechnicMediumAngularMotor-resetZero-nav"><a href="TechnicMediumAngularMotor.html#resetZero">resetZero</a></li><li data-type="method" id="TechnicMediumAngularMotor-rotateByDegrees-nav"><a href="TechnicMediumAngularMotor.html#rotateByDegrees">rotateByDegrees</a></li><li data-type="method" id="TechnicMediumAngularMotor-setAccelerationTime-nav"><a href="TechnicMediumAngularMotor.html#setAccelerationTime">setAccelerationTime</a></li><li data-type="method" id="TechnicMediumAngularMotor-setBrakingStyle-nav"><a href="TechnicMediumAngularMotor.html#setBrakingStyle">setBrakingStyle</a></li><li data-type="method" id="TechnicMediumAngularMotor-setDecelerationTime-nav"><a href="TechnicMediumAngularMotor.html#setDecelerationTime">setDecelerationTime</a></li><li data-type="method" id="TechnicMediumAngularMotor-setMaxPower-nav"><a href="TechnicMediumAngularMotor.html#setMaxPower">setMaxPower</a></li><li data-type="method" id="TechnicMediumAngularMotor-setSpeed-nav"><a href="TechnicMediumAngularMotor.html#setSpeed">setSpeed</a></li></ul></li><li id="TechnicMediumHub-nav"><a href="TechnicMediumHub.html">TechnicMediumHub</a><ul class='methods'><li data-type="method" id="TechnicMediumHub-createVirtualPort-nav"><a href="TechnicMediumHub.html#createVirtualPort">createVirtualPort</a></li><li data-type="method" id="TechnicMediumHub-setName-nav"><a href="TechnicMediumHub.html#setName">setName</a></li><li data-type="method" id="TechnicMediumHub-shutdown-nav"><a href="TechnicMediumHub.html#shutdown">shutdown</a></li></ul></li><li id="TechnicMediumHubAccelerometerSensor-nav"><a href="TechnicMediumHubAccelerometerSensor.html">TechnicMediumHubAccelerometerSensor</a></li><li id="TechnicMediumHubGyroSensor-nav"><a href="TechnicMediumHubGyroSensor.html">TechnicMediumHubGyroSensor</a></li><li id="TechnicMediumHubTiltSensor-nav"><a href="TechnicMediumHubTiltSensor.html">TechnicMediumHubTiltSensor</a><ul class='methods'><li data-type="method" id="TechnicMediumHubTiltSensor-setImpactCount-nav"><a href="TechnicMediumHubTiltSensor.html#setImpactCount">setImpactCount</a></li><li data-type="method" id="TechnicMediumHubTiltSensor-setImpactHoldoff-nav"><a href="TechnicMediumHubTiltSensor.html#setImpactHoldoff">setImpactHoldoff</a></li><li data-type="method" id="TechnicMediumHubTiltSensor-setImpactThreshold-nav"><a href="TechnicMediumHubTiltSensor.html#setImpactThreshold">setImpactThreshold</a></li></ul></li><li id="TechnicSmallAngularMotor-nav"><a href="TechnicSmallAngularMotor.html">TechnicSmallAngularMotor</a><ul class='methods'><li data-type="method" id="TechnicSmallAngularMotor-gotoAngle-nav"><a href="TechnicSmallAngularMotor.html#gotoAngle">gotoAngle</a></li><li data-type="method" id="TechnicSmallAngularMotor-gotoRealZero-nav"><a href="TechnicSmallAngularMotor.html#gotoRealZero">gotoRealZero</a></li><li data-type="method" id="TechnicSmallAngularMotor-resetZero-nav"><a href="TechnicSmallAngularMotor.html#resetZero">resetZero</a></li><li data-type="method" id="TechnicSmallAngularMotor-rotateByDegrees-nav"><a href="TechnicSmallAngularMotor.html#rotateByDegrees">rotateByDegrees</a></li><li data-type="method" id="TechnicSmallAngularMotor-setAccelerationTime-nav"><a href="TechnicSmallAngularMotor.html#setAccelerationTime">setAccelerationTime</a></li><li data-type="method" id="TechnicSmallAngularMotor-setBrakingStyle-nav"><a href="TechnicSmallAngularMotor.html#setBrakingStyle">setBrakingStyle</a></li><li data-type="method" id="TechnicSmallAngularMotor-setDecelerationTime-nav"><a href="TechnicSmallAngularMotor.html#setDecelerationTime">setDecelerationTime</a></li><li data-type="method" id="TechnicSmallAngularMotor-setMaxPower-nav"><a href="TechnicSmallAngularMotor.html#setMaxPower">setMaxPower</a></li><li data-type="method" id="TechnicSmallAngularMotor-setSpeed-nav"><a href="TechnicSmallAngularMotor.html#setSpeed">setSpeed</a></li></ul></li><li id="TechnicXLargeLinearMotor-nav"><a href="TechnicXLargeLinearMotor.html">TechnicXLargeLinearMotor</a><ul class='methods'><li data-type="method" id="TechnicXLargeLinearMotor-gotoAngle-nav"><a href="TechnicXLargeLinearMotor.html#gotoAngle">gotoAngle</a></li><li data-type="method" id="TechnicXLargeLinearMotor-gotoRealZero-nav"><a href="TechnicXLargeLinearMotor.html#gotoRealZero">gotoRealZero</a></li><li data-type="method" id="TechnicXLargeLinearMotor-resetZero-nav"><a href="TechnicXLargeLinearMotor.html#resetZero">resetZero</a></li><li data-type="method" id="TechnicXLargeLinearMotor-rotateByDegrees-nav"><a href="TechnicXLargeLinearMotor.html#rotateByDegrees">rotateByDegrees</a></li><li data-type="method" id="TechnicXLargeLinearMotor-setAccelerationTime-nav"><a href="TechnicXLargeLinearMotor.html#setAccelerationTime">setAccelerationTime</a></li><li data-type="method" id="TechnicXLargeLinearMotor-setBrakingStyle-nav"><a href="TechnicXLargeLinearMotor.html#setBrakingStyle">setBrakingStyle</a></li><li data-type="method" id="TechnicXLargeLinearMotor-setDecelerationTime-nav"><a href="TechnicXLargeLinearMotor.html#setDecelerationTime">setDecelerationTime</a></li><li data-type="method" id="TechnicXLargeLinearMotor-setMaxPower-nav"><a href="TechnicXLargeLinearMotor.html#setMaxPower">setMaxPower</a></li><li data-type="method" id="TechnicXLargeLinearMotor-setSpeed-nav"><a href="TechnicXLargeLinearMotor.html#setSpeed">setSpeed</a></li></ul></li><li id="TiltSensor-nav"><a href="TiltSensor.html">TiltSensor</a></li><li id="TrainMotor-nav"><a href="TrainMotor.html">TrainMotor</a><ul class='methods'><li data-type="method" id="TrainMotor-brake-nav"><a href="TrainMotor.html#brake">brake</a></li><li data-type="method" id="TrainMotor-rampPower-nav"><a href="TrainMotor.html#rampPower">rampPower</a></li><li data-type="method" id="TrainMotor-setPower-nav"><a href="TrainMotor.html#setPower">setPower</a></li><li data-type="method" id="TrainMotor-stop-nav"><a href="TrainMotor.html#stop">stop</a></li></ul></li><li id="VoltageSensor-nav"><a href="VoltageSensor.html">VoltageSensor</a></li><li id="WeDo2SmartHub-nav"><a href="WeDo2SmartHub.html">WeDo2SmartHub</a><ul class='methods'><li data-type="method" id="WeDo2SmartHub-setName-nav"><a href="WeDo2SmartHub.html#setName">setName</a></li><li data-type="method" id="WeDo2SmartHub-shutdown-nav"><a href="WeDo2SmartHub.html#shutdown">shutdown</a></li></ul></li></ul><h3 id="global-nav"><a href="global.html">Global</a></h3>
|
|
</nav>
|
|
|
|
<div id="main">
|
|
|
|
<h1 class="page-title">
|
|
consts.js
|
|
</h1>
|
|
|
|
|
|
|
|
|
|
|
|
<section>
|
|
<article>
|
|
<pre class="prettyprint source linenums"><code>"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.MarioColor = exports.MarioPantsType = exports.PortInputFormatSetupSubCommand = exports.ModeInformationType = exports.HWNetworkSubFamily = exports.HWNetworkFamily = exports.HWNetWorkCommandType = exports.ErrorCode = exports.IOTypeID = exports.Event = exports.AlertPayload = exports.AlertOperation = exports.AlertType = exports.ActionType = exports.HubPropertyPayload = exports.HubPropertyOperation = exports.HubPropertyReference = exports.MessageType = exports.BLECharacteristic = exports.BLEService = exports.BLEManufacturerData = exports.DuploTrainBaseSound = exports.BrakingStyle = exports.ButtonState = exports.ColorNames = exports.Color = exports.DeviceTypeNames = exports.DeviceType = exports.HubTypeNames = exports.HubType = void 0;
|
|
/**
|
|
* @typedef HubType
|
|
* @property {number} UNKNOWN 0
|
|
* @property {number} WEDO2_SMART_HUB 1
|
|
* @property {number} MOVE_HUB 2
|
|
* @property {number} HUB 3
|
|
* @property {number} REMOTE_CONTROL 4
|
|
* @property {number} DUPLO_TRAIN_BASE 5
|
|
* @property {number} TECHNIC_MEDIUM_HUB 6
|
|
* @property {number} MARIO 7
|
|
* @property {number} TECHNIC_SMALL_HUB 8
|
|
*/
|
|
var HubType;
|
|
(function (HubType) {
|
|
HubType[HubType["UNKNOWN"] = 0] = "UNKNOWN";
|
|
HubType[HubType["WEDO2_SMART_HUB"] = 1] = "WEDO2_SMART_HUB";
|
|
HubType[HubType["MOVE_HUB"] = 2] = "MOVE_HUB";
|
|
HubType[HubType["HUB"] = 3] = "HUB";
|
|
HubType[HubType["REMOTE_CONTROL"] = 4] = "REMOTE_CONTROL";
|
|
HubType[HubType["DUPLO_TRAIN_BASE"] = 5] = "DUPLO_TRAIN_BASE";
|
|
HubType[HubType["TECHNIC_MEDIUM_HUB"] = 6] = "TECHNIC_MEDIUM_HUB";
|
|
HubType[HubType["MARIO"] = 7] = "MARIO";
|
|
HubType[HubType["TECHNIC_SMALL_HUB"] = 8] = "TECHNIC_SMALL_HUB";
|
|
})(HubType = exports.HubType || (exports.HubType = {}));
|
|
// tslint:disable-next-line
|
|
exports.HubTypeNames = HubType;
|
|
/**
|
|
* @typedef DeviceType
|
|
* @property {number} UNKNOWN 0
|
|
* @property {number} SIMPLE_MEDIUM_LINEAR_MOTOR 1
|
|
* @property {number} TRAIN_MOTOR 2
|
|
* @property {number} LIGHT 8
|
|
* @property {number} VOLTAGE_SENSOR 20
|
|
* @property {number} CURRENT_SENSOR 21
|
|
* @property {number} PIEZO_BUZZER 22
|
|
* @property {number} HUB_LED 23
|
|
* @property {number} TILT_SENSOR 34
|
|
* @property {number} MOTION_SENSOR 35
|
|
* @property {number} COLOR_DISTANCE_SENSOR 37
|
|
* @property {number} MEDIUM_LINEAR_MOTOR 38
|
|
* @property {number} MOVE_HUB_MEDIUM_LINEAR_MOTOR 39
|
|
* @property {number} MOVE_HUB_TILT_SENSOR 40
|
|
* @property {number} DUPLO_TRAIN_BASE_MOTOR 41
|
|
* @property {number} DUPLO_TRAIN_BASE_SPEAKER 42
|
|
* @property {number} DUPLO_TRAIN_BASE_COLOR_SENSOR 43
|
|
* @property {number} DUPLO_TRAIN_BASE_SPEEDOMETER 44
|
|
* @property {number} TECHNIC_LARGE_LINEAR_MOTOR 46
|
|
* @property {number} TECHNIC_XLARGE_LINEAR_MOTOR 47
|
|
* @property {number} TECHNIC_MEDIUM_ANGULAR_MOTOR 48
|
|
* @property {number} TECHNIC_LARGE_ANGULAR_MOTOR 49
|
|
* @property {number} TECHNIC_MEDIUM_HUB_GEST_SENSOR 54
|
|
* @property {number} REMOTE_CONTROL_BUTTON 55
|
|
* @property {number} REMOTE_CONTROL_RSSI 56
|
|
* @property {number} TECHNIC_MEDIUM_HUB_ACCELEROMETER 57
|
|
* @property {number} TECHNIC_MEDIUM_HUB_GYRO_SENSOR 58
|
|
* @property {number} TECHNIC_MEDIUM_HUB_TILT_SENSOR 59
|
|
* @property {number} TECHNIC_MEDIUM_HUB_TEMPERATURE_SENSOR 60
|
|
* @property {number} TECHNIC_COLOR_SENSOR 61
|
|
* @property {number} TECHNIC_DISTANCE_SENSOR 62
|
|
* @property {number} TECHNIC_FORCE_SENSOR 63
|
|
* @property {number} TECHNIC_3X3_COLOR_LIGHT_MATRIX 64
|
|
* @property {number} TECHNIC_SMALL_ANGULAR_MOTOR 65
|
|
* @property {number} MARIO_ACCELEROMETER 71
|
|
* @property {number} MARIO_BARCODE_SENSOR 73
|
|
* @property {number} MARIO_PANTS_SENSOR 74
|
|
* @property {number} TECHNIC_MEDIUM_ANGULAR_MOTOR_GREY 75
|
|
* @property {number} TECHNIC_LARGE_ANGULAR_MOTOR_GREY 76
|
|
*/
|
|
var DeviceType;
|
|
(function (DeviceType) {
|
|
DeviceType[DeviceType["UNKNOWN"] = 0] = "UNKNOWN";
|
|
DeviceType[DeviceType["SIMPLE_MEDIUM_LINEAR_MOTOR"] = 1] = "SIMPLE_MEDIUM_LINEAR_MOTOR";
|
|
DeviceType[DeviceType["TRAIN_MOTOR"] = 2] = "TRAIN_MOTOR";
|
|
DeviceType[DeviceType["LIGHT"] = 8] = "LIGHT";
|
|
DeviceType[DeviceType["VOLTAGE_SENSOR"] = 20] = "VOLTAGE_SENSOR";
|
|
DeviceType[DeviceType["CURRENT_SENSOR"] = 21] = "CURRENT_SENSOR";
|
|
DeviceType[DeviceType["PIEZO_BUZZER"] = 22] = "PIEZO_BUZZER";
|
|
DeviceType[DeviceType["HUB_LED"] = 23] = "HUB_LED";
|
|
DeviceType[DeviceType["TILT_SENSOR"] = 34] = "TILT_SENSOR";
|
|
DeviceType[DeviceType["MOTION_SENSOR"] = 35] = "MOTION_SENSOR";
|
|
DeviceType[DeviceType["COLOR_DISTANCE_SENSOR"] = 37] = "COLOR_DISTANCE_SENSOR";
|
|
DeviceType[DeviceType["MEDIUM_LINEAR_MOTOR"] = 38] = "MEDIUM_LINEAR_MOTOR";
|
|
DeviceType[DeviceType["MOVE_HUB_MEDIUM_LINEAR_MOTOR"] = 39] = "MOVE_HUB_MEDIUM_LINEAR_MOTOR";
|
|
DeviceType[DeviceType["MOVE_HUB_TILT_SENSOR"] = 40] = "MOVE_HUB_TILT_SENSOR";
|
|
DeviceType[DeviceType["DUPLO_TRAIN_BASE_MOTOR"] = 41] = "DUPLO_TRAIN_BASE_MOTOR";
|
|
DeviceType[DeviceType["DUPLO_TRAIN_BASE_SPEAKER"] = 42] = "DUPLO_TRAIN_BASE_SPEAKER";
|
|
DeviceType[DeviceType["DUPLO_TRAIN_BASE_COLOR_SENSOR"] = 43] = "DUPLO_TRAIN_BASE_COLOR_SENSOR";
|
|
DeviceType[DeviceType["DUPLO_TRAIN_BASE_SPEEDOMETER"] = 44] = "DUPLO_TRAIN_BASE_SPEEDOMETER";
|
|
DeviceType[DeviceType["TECHNIC_LARGE_LINEAR_MOTOR"] = 46] = "TECHNIC_LARGE_LINEAR_MOTOR";
|
|
DeviceType[DeviceType["TECHNIC_XLARGE_LINEAR_MOTOR"] = 47] = "TECHNIC_XLARGE_LINEAR_MOTOR";
|
|
DeviceType[DeviceType["TECHNIC_MEDIUM_ANGULAR_MOTOR"] = 48] = "TECHNIC_MEDIUM_ANGULAR_MOTOR";
|
|
DeviceType[DeviceType["TECHNIC_LARGE_ANGULAR_MOTOR"] = 49] = "TECHNIC_LARGE_ANGULAR_MOTOR";
|
|
DeviceType[DeviceType["TECHNIC_MEDIUM_HUB_GEST_SENSOR"] = 54] = "TECHNIC_MEDIUM_HUB_GEST_SENSOR";
|
|
DeviceType[DeviceType["REMOTE_CONTROL_BUTTON"] = 55] = "REMOTE_CONTROL_BUTTON";
|
|
DeviceType[DeviceType["REMOTE_CONTROL_RSSI"] = 56] = "REMOTE_CONTROL_RSSI";
|
|
DeviceType[DeviceType["TECHNIC_MEDIUM_HUB_ACCELEROMETER"] = 57] = "TECHNIC_MEDIUM_HUB_ACCELEROMETER";
|
|
DeviceType[DeviceType["TECHNIC_MEDIUM_HUB_GYRO_SENSOR"] = 58] = "TECHNIC_MEDIUM_HUB_GYRO_SENSOR";
|
|
DeviceType[DeviceType["TECHNIC_MEDIUM_HUB_TILT_SENSOR"] = 59] = "TECHNIC_MEDIUM_HUB_TILT_SENSOR";
|
|
DeviceType[DeviceType["TECHNIC_MEDIUM_HUB_TEMPERATURE_SENSOR"] = 60] = "TECHNIC_MEDIUM_HUB_TEMPERATURE_SENSOR";
|
|
DeviceType[DeviceType["TECHNIC_COLOR_SENSOR"] = 61] = "TECHNIC_COLOR_SENSOR";
|
|
DeviceType[DeviceType["TECHNIC_DISTANCE_SENSOR"] = 62] = "TECHNIC_DISTANCE_SENSOR";
|
|
DeviceType[DeviceType["TECHNIC_FORCE_SENSOR"] = 63] = "TECHNIC_FORCE_SENSOR";
|
|
DeviceType[DeviceType["TECHNIC_3X3_COLOR_LIGHT_MATRIX"] = 64] = "TECHNIC_3X3_COLOR_LIGHT_MATRIX";
|
|
DeviceType[DeviceType["TECHNIC_SMALL_ANGULAR_MOTOR"] = 65] = "TECHNIC_SMALL_ANGULAR_MOTOR";
|
|
DeviceType[DeviceType["MARIO_ACCELEROMETER"] = 71] = "MARIO_ACCELEROMETER";
|
|
DeviceType[DeviceType["MARIO_BARCODE_SENSOR"] = 73] = "MARIO_BARCODE_SENSOR";
|
|
DeviceType[DeviceType["MARIO_PANTS_SENSOR"] = 74] = "MARIO_PANTS_SENSOR";
|
|
DeviceType[DeviceType["TECHNIC_MEDIUM_ANGULAR_MOTOR_GREY"] = 75] = "TECHNIC_MEDIUM_ANGULAR_MOTOR_GREY";
|
|
DeviceType[DeviceType["TECHNIC_LARGE_ANGULAR_MOTOR_GREY"] = 76] = "TECHNIC_LARGE_ANGULAR_MOTOR_GREY";
|
|
})(DeviceType = exports.DeviceType || (exports.DeviceType = {}));
|
|
// tslint:disable-next-line
|
|
exports.DeviceTypeNames = DeviceType;
|
|
/**
|
|
* @typedef Color
|
|
* @property {number} BLACK 0
|
|
* @property {number} PINK 1
|
|
* @property {number} PURPLE 2
|
|
* @property {number} BLUE 3
|
|
* @property {number} LIGHT_BLUE 4
|
|
* @property {number} CYAN 5
|
|
* @property {number} GREEN 6
|
|
* @property {number} YELLOW 7
|
|
* @property {number} ORANGE 8
|
|
* @property {number} RED 9
|
|
* @property {number} WHITE 10
|
|
* @property {number} NONE 255
|
|
*/
|
|
var Color;
|
|
(function (Color) {
|
|
Color[Color["BLACK"] = 0] = "BLACK";
|
|
Color[Color["PINK"] = 1] = "PINK";
|
|
Color[Color["PURPLE"] = 2] = "PURPLE";
|
|
Color[Color["BLUE"] = 3] = "BLUE";
|
|
Color[Color["LIGHT_BLUE"] = 4] = "LIGHT_BLUE";
|
|
Color[Color["CYAN"] = 5] = "CYAN";
|
|
Color[Color["GREEN"] = 6] = "GREEN";
|
|
Color[Color["YELLOW"] = 7] = "YELLOW";
|
|
Color[Color["ORANGE"] = 8] = "ORANGE";
|
|
Color[Color["RED"] = 9] = "RED";
|
|
Color[Color["WHITE"] = 10] = "WHITE";
|
|
Color[Color["NONE"] = 255] = "NONE";
|
|
})(Color = exports.Color || (exports.Color = {}));
|
|
// tslint:disable-next-line
|
|
exports.ColorNames = Color;
|
|
/**
|
|
* @typedef ButtonState
|
|
* @property {number} PRESSED 2
|
|
* @property {number} RELEASED 0
|
|
* @property {number} UP 1
|
|
* @property {number} DOWN 255
|
|
* @property {number} STOP 127
|
|
*/
|
|
var ButtonState;
|
|
(function (ButtonState) {
|
|
ButtonState[ButtonState["PRESSED"] = 2] = "PRESSED";
|
|
ButtonState[ButtonState["RELEASED"] = 0] = "RELEASED";
|
|
ButtonState[ButtonState["UP"] = 1] = "UP";
|
|
ButtonState[ButtonState["DOWN"] = 255] = "DOWN";
|
|
ButtonState[ButtonState["STOP"] = 127] = "STOP";
|
|
})(ButtonState = exports.ButtonState || (exports.ButtonState = {}));
|
|
/**
|
|
* @typedef BrakingStyle
|
|
* @property {number} FLOAT 0
|
|
* @property {number} HOLD 127
|
|
* @property {number} BRAKE 128
|
|
*/
|
|
var BrakingStyle;
|
|
(function (BrakingStyle) {
|
|
BrakingStyle[BrakingStyle["FLOAT"] = 0] = "FLOAT";
|
|
BrakingStyle[BrakingStyle["HOLD"] = 126] = "HOLD";
|
|
BrakingStyle[BrakingStyle["BRAKE"] = 127] = "BRAKE";
|
|
})(BrakingStyle = exports.BrakingStyle || (exports.BrakingStyle = {}));
|
|
/**
|
|
* @typedef DuploTrainBaseSound
|
|
* @property {number} BRAKE 3
|
|
* @property {number} STATION_DEPARTURE 5
|
|
* @property {number} WATER_REFILL 7
|
|
* @property {number} HORN 9
|
|
* @property {number} STEAM 10
|
|
*/
|
|
var DuploTrainBaseSound;
|
|
(function (DuploTrainBaseSound) {
|
|
DuploTrainBaseSound[DuploTrainBaseSound["BRAKE"] = 3] = "BRAKE";
|
|
DuploTrainBaseSound[DuploTrainBaseSound["STATION_DEPARTURE"] = 5] = "STATION_DEPARTURE";
|
|
DuploTrainBaseSound[DuploTrainBaseSound["WATER_REFILL"] = 7] = "WATER_REFILL";
|
|
DuploTrainBaseSound[DuploTrainBaseSound["HORN"] = 9] = "HORN";
|
|
DuploTrainBaseSound[DuploTrainBaseSound["STEAM"] = 10] = "STEAM";
|
|
})(DuploTrainBaseSound = exports.DuploTrainBaseSound || (exports.DuploTrainBaseSound = {}));
|
|
var BLEManufacturerData;
|
|
(function (BLEManufacturerData) {
|
|
BLEManufacturerData[BLEManufacturerData["DUPLO_TRAIN_BASE_ID"] = 32] = "DUPLO_TRAIN_BASE_ID";
|
|
BLEManufacturerData[BLEManufacturerData["MOVE_HUB_ID"] = 64] = "MOVE_HUB_ID";
|
|
BLEManufacturerData[BLEManufacturerData["HUB_ID"] = 65] = "HUB_ID";
|
|
BLEManufacturerData[BLEManufacturerData["REMOTE_CONTROL_ID"] = 66] = "REMOTE_CONTROL_ID";
|
|
BLEManufacturerData[BLEManufacturerData["MARIO_ID"] = 67] = "MARIO_ID";
|
|
BLEManufacturerData[BLEManufacturerData["TECHNIC_MEDIUM_HUB_ID"] = 128] = "TECHNIC_MEDIUM_HUB_ID";
|
|
BLEManufacturerData[BLEManufacturerData["TECHNIC_SMALL_HUB_ID"] = 131] = "TECHNIC_SMALL_HUB_ID";
|
|
})(BLEManufacturerData = exports.BLEManufacturerData || (exports.BLEManufacturerData = {}));
|
|
var BLEService;
|
|
(function (BLEService) {
|
|
BLEService["WEDO2_SMART_HUB"] = "00001523-1212-efde-1523-785feabcd123";
|
|
BLEService["WEDO2_SMART_HUB_2"] = "00004f0e-1212-efde-1523-785feabcd123";
|
|
BLEService["WEDO2_SMART_HUB_3"] = "2a19";
|
|
BLEService["WEDO2_SMART_HUB_4"] = "180f";
|
|
BLEService["WEDO2_SMART_HUB_5"] = "180a";
|
|
BLEService["LPF2_HUB"] = "00001623-1212-efde-1623-785feabcd123";
|
|
})(BLEService = exports.BLEService || (exports.BLEService = {}));
|
|
var BLECharacteristic;
|
|
(function (BLECharacteristic) {
|
|
BLECharacteristic["WEDO2_BATTERY"] = "2a19";
|
|
BLECharacteristic["WEDO2_FIRMWARE_REVISION"] = "2a26";
|
|
BLECharacteristic["WEDO2_BUTTON"] = "00001526-1212-efde-1523-785feabcd123";
|
|
BLECharacteristic["WEDO2_PORT_TYPE"] = "00001527-1212-efde-1523-785feabcd123";
|
|
BLECharacteristic["WEDO2_LOW_VOLTAGE_ALERT"] = "00001528-1212-efde-1523-785feabcd123";
|
|
BLECharacteristic["WEDO2_HIGH_CURRENT_ALERT"] = "00001529-1212-efde-1523-785feabcd123";
|
|
BLECharacteristic["WEDO2_LOW_SIGNAL_ALERT"] = "0000152a-1212-efde-1523-785feabcd123";
|
|
BLECharacteristic["WEDO2_DISCONNECT"] = "0000152b-1212-efde-1523-785feabcd123";
|
|
BLECharacteristic["WEDO2_SENSOR_VALUE"] = "00001560-1212-efde-1523-785feabcd123";
|
|
BLECharacteristic["WEDO2_VALUE_FORMAT"] = "00001561-1212-efde-1523-785feabcd123";
|
|
BLECharacteristic["WEDO2_PORT_TYPE_WRITE"] = "00001563-1212-efde-1523-785feabcd123";
|
|
BLECharacteristic["WEDO2_MOTOR_VALUE_WRITE"] = "00001565-1212-efde-1523-785feabcd123";
|
|
BLECharacteristic["WEDO2_NAME_ID"] = "00001524-1212-efde-1523-785feabcd123";
|
|
BLECharacteristic["LPF2_ALL"] = "00001624-1212-efde-1623-785feabcd123";
|
|
})(BLECharacteristic = exports.BLECharacteristic || (exports.BLECharacteristic = {}));
|
|
/**
|
|
* @typedef MessageType
|
|
* @property {number} HUB_PROPERTIES 0x01
|
|
* @property {number} HUB_ACTIONS 0x02
|
|
* @property {number} HUB_ALERTS 0x03
|
|
* @property {number} HUB_ATTACHED_IO 0x04
|
|
* @property {number} GENERIC_ERROR_MESSAGES 0x05
|
|
* @property {number} HW_NETWORK_COMMANDS 0x08
|
|
* @property {number} FW_UPDATE_GO_INTO_BOOT_MODE 0x10
|
|
* @property {number} FW_UPDATE_LOCK_MEMORY 0x11
|
|
* @property {number} FW_UPDATE_LOCK_STATUS_REQUEST 0x12
|
|
* @property {number} FW_LOCK_STATUS 0x13
|
|
* @property {number} PORT_INFORMATION_REQUEST 0x21
|
|
* @property {number} PORT_MODE_INFORMATION_REQUEST 0x22
|
|
* @property {number} PORT_INPUT_FORMAT_SETUP_SINGLE 0x41
|
|
* @property {number} PORT_INPUT_FORMAT_SETUP_COMBINEDMODE 0x42
|
|
* @property {number} PORT_INFORMATION 0x43
|
|
* @property {number} PORT_MODE_INFORMATION 0x44
|
|
* @property {number} PORT_VALUE_SINGLE 0x45
|
|
* @property {number} PORT_VALUE_COMBINEDMODE 0x46
|
|
* @property {number} PORT_INPUT_FORMAT_SINGLE 0x47
|
|
* @property {number} PORT_INPUT_FORMAT_COMBINEDMODE 0x48
|
|
* @property {number} VIRTUAL_PORT_SETUP 0x61
|
|
* @property {number} PORT_OUTPUT_COMMAND 0x81
|
|
* @property {number} PORT_OUTPUT_COMMAND_FEEDBACK 0x82
|
|
* @description https://lego.github.io/lego-ble-wireless-protocol-docs/index.html#message-types
|
|
*/
|
|
var MessageType;
|
|
(function (MessageType) {
|
|
MessageType[MessageType["HUB_PROPERTIES"] = 1] = "HUB_PROPERTIES";
|
|
MessageType[MessageType["HUB_ACTIONS"] = 2] = "HUB_ACTIONS";
|
|
MessageType[MessageType["HUB_ALERTS"] = 3] = "HUB_ALERTS";
|
|
MessageType[MessageType["HUB_ATTACHED_IO"] = 4] = "HUB_ATTACHED_IO";
|
|
MessageType[MessageType["GENERIC_ERROR_MESSAGES"] = 5] = "GENERIC_ERROR_MESSAGES";
|
|
MessageType[MessageType["HW_NETWORK_COMMANDS"] = 8] = "HW_NETWORK_COMMANDS";
|
|
MessageType[MessageType["FW_UPDATE_GO_INTO_BOOT_MODE"] = 16] = "FW_UPDATE_GO_INTO_BOOT_MODE";
|
|
MessageType[MessageType["FW_UPDATE_LOCK_MEMORY"] = 17] = "FW_UPDATE_LOCK_MEMORY";
|
|
MessageType[MessageType["FW_UPDATE_LOCK_STATUS_REQUEST"] = 18] = "FW_UPDATE_LOCK_STATUS_REQUEST";
|
|
MessageType[MessageType["FW_LOCK_STATUS"] = 19] = "FW_LOCK_STATUS";
|
|
MessageType[MessageType["PORT_INFORMATION_REQUEST"] = 33] = "PORT_INFORMATION_REQUEST";
|
|
MessageType[MessageType["PORT_MODE_INFORMATION_REQUEST"] = 34] = "PORT_MODE_INFORMATION_REQUEST";
|
|
MessageType[MessageType["PORT_INPUT_FORMAT_SETUP_SINGLE"] = 65] = "PORT_INPUT_FORMAT_SETUP_SINGLE";
|
|
MessageType[MessageType["PORT_INPUT_FORMAT_SETUP_COMBINEDMODE"] = 66] = "PORT_INPUT_FORMAT_SETUP_COMBINEDMODE";
|
|
MessageType[MessageType["PORT_INFORMATION"] = 67] = "PORT_INFORMATION";
|
|
MessageType[MessageType["PORT_MODE_INFORMATION"] = 68] = "PORT_MODE_INFORMATION";
|
|
MessageType[MessageType["PORT_VALUE_SINGLE"] = 69] = "PORT_VALUE_SINGLE";
|
|
MessageType[MessageType["PORT_VALUE_COMBINEDMODE"] = 70] = "PORT_VALUE_COMBINEDMODE";
|
|
MessageType[MessageType["PORT_INPUT_FORMAT_SINGLE"] = 71] = "PORT_INPUT_FORMAT_SINGLE";
|
|
MessageType[MessageType["PORT_INPUT_FORMAT_COMBINEDMODE"] = 72] = "PORT_INPUT_FORMAT_COMBINEDMODE";
|
|
MessageType[MessageType["VIRTUAL_PORT_SETUP"] = 97] = "VIRTUAL_PORT_SETUP";
|
|
MessageType[MessageType["PORT_OUTPUT_COMMAND"] = 129] = "PORT_OUTPUT_COMMAND";
|
|
MessageType[MessageType["PORT_OUTPUT_COMMAND_FEEDBACK"] = 130] = "PORT_OUTPUT_COMMAND_FEEDBACK";
|
|
})(MessageType = exports.MessageType || (exports.MessageType = {}));
|
|
/**
|
|
* @typedef HubPropertyReference
|
|
* @param {number} ADVERTISING_NAME 0x01
|
|
* @param {number} BUTTON 0x02
|
|
* @param {number} FW_VERSION 0x03
|
|
* @param {number} HW_VERSION 0x04
|
|
* @param {number} RSSI 0x05
|
|
* @param {number} BATTERY_VOLTAGE 0x06
|
|
* @param {number} BATTERY_TYPE 0x07
|
|
* @param {number} MANUFACTURER_NAME 0x08
|
|
* @param {number} RADIO_FIRMWARE_VERSION 0x09
|
|
* @param {number} LEGO_WIRELESS_PROTOCOL_VERSION 0x0A
|
|
* @param {number} SYSTEM_TYPE_ID 0x0B
|
|
* @param {number} HW_NETWORK_ID 0x0C
|
|
* @param {number} PRIMARY_MAC_ADDRESS 0x0D
|
|
* @param {number} SECONDARY_MAC_ADDRESS 0x0E
|
|
* @param {number} HARDWARE_NETWORK_FAMILY 0x0F
|
|
* @description https://lego.github.io/lego-ble-wireless-protocol-docs/index.html#hub-property-reference
|
|
*/
|
|
var HubPropertyReference;
|
|
(function (HubPropertyReference) {
|
|
HubPropertyReference[HubPropertyReference["ADVERTISING_NAME"] = 1] = "ADVERTISING_NAME";
|
|
HubPropertyReference[HubPropertyReference["BUTTON"] = 2] = "BUTTON";
|
|
HubPropertyReference[HubPropertyReference["FW_VERSION"] = 3] = "FW_VERSION";
|
|
HubPropertyReference[HubPropertyReference["HW_VERSION"] = 4] = "HW_VERSION";
|
|
HubPropertyReference[HubPropertyReference["RSSI"] = 5] = "RSSI";
|
|
HubPropertyReference[HubPropertyReference["BATTERY_VOLTAGE"] = 6] = "BATTERY_VOLTAGE";
|
|
HubPropertyReference[HubPropertyReference["BATTERY_TYPE"] = 7] = "BATTERY_TYPE";
|
|
HubPropertyReference[HubPropertyReference["MANUFACTURER_NAME"] = 8] = "MANUFACTURER_NAME";
|
|
HubPropertyReference[HubPropertyReference["RADIO_FIRMWARE_VERSION"] = 9] = "RADIO_FIRMWARE_VERSION";
|
|
HubPropertyReference[HubPropertyReference["LEGO_WIRELESS_PROTOCOL_VERSION"] = 10] = "LEGO_WIRELESS_PROTOCOL_VERSION";
|
|
HubPropertyReference[HubPropertyReference["SYSTEM_TYPE_ID"] = 11] = "SYSTEM_TYPE_ID";
|
|
HubPropertyReference[HubPropertyReference["HW_NETWORK_ID"] = 12] = "HW_NETWORK_ID";
|
|
HubPropertyReference[HubPropertyReference["PRIMARY_MAC_ADDRESS"] = 13] = "PRIMARY_MAC_ADDRESS";
|
|
HubPropertyReference[HubPropertyReference["SECONDARY_MAC_ADDRESS"] = 14] = "SECONDARY_MAC_ADDRESS";
|
|
HubPropertyReference[HubPropertyReference["HARDWARE_NETWORK_FAMILY"] = 15] = "HARDWARE_NETWORK_FAMILY";
|
|
})(HubPropertyReference = exports.HubPropertyReference || (exports.HubPropertyReference = {}));
|
|
/**
|
|
* @typedef HubPropertyOperation
|
|
* @param {number} SET_DOWNSTREAM 0x01
|
|
* @param {number} ENABLE_UPDATES_DOWNSTREAM 0x02
|
|
* @param {number} DISABLE_UPDATES_DOWNSTREAM 0x03
|
|
* @param {number} RESET_DOWNSTREAM 0x04
|
|
* @param {number} REQUEST_UPDATE_DOWNSTREAM 0x05
|
|
* @param {number} UPDATE_UPSTREAM 0x06
|
|
* @description https://lego.github.io/lego-ble-wireless-protocol-docs/index.html#hub-property-reference
|
|
*/
|
|
var HubPropertyOperation;
|
|
(function (HubPropertyOperation) {
|
|
HubPropertyOperation[HubPropertyOperation["SET_DOWNSTREAM"] = 1] = "SET_DOWNSTREAM";
|
|
HubPropertyOperation[HubPropertyOperation["ENABLE_UPDATES_DOWNSTREAM"] = 2] = "ENABLE_UPDATES_DOWNSTREAM";
|
|
HubPropertyOperation[HubPropertyOperation["DISABLE_UPDATES_DOWNSTREAM"] = 3] = "DISABLE_UPDATES_DOWNSTREAM";
|
|
HubPropertyOperation[HubPropertyOperation["RESET_DOWNSTREAM"] = 4] = "RESET_DOWNSTREAM";
|
|
HubPropertyOperation[HubPropertyOperation["REQUEST_UPDATE_DOWNSTREAM"] = 5] = "REQUEST_UPDATE_DOWNSTREAM";
|
|
HubPropertyOperation[HubPropertyOperation["UPDATE_UPSTREAM"] = 6] = "UPDATE_UPSTREAM";
|
|
})(HubPropertyOperation = exports.HubPropertyOperation || (exports.HubPropertyOperation = {}));
|
|
/**
|
|
* @typedef HubPropertyPayload
|
|
* @param {number} ADVERTISING_NAME 0x01
|
|
* @param {number} BUTTON_STATE 0x02
|
|
* @param {number} FW_VERSION 0x03
|
|
* @param {number} HW_VERSION 0x04
|
|
* @param {number} RSSI 0x05
|
|
* @param {number} BATTERY_VOLTAGE 0x06
|
|
* @param {number} BATTERY_TYPE 0x07
|
|
* @param {number} MANUFACTURER_NAME 0x08
|
|
* @param {number} RADIO_FIRMWARE_VERSION 0x09
|
|
* @param {number} LWP_PROTOCOL_VERSION 0x0A
|
|
* @param {number} SYSTEM_TYPE_ID 0x0B
|
|
* @param {number} HW_NETWORK_ID 0x0C
|
|
* @param {number} PRIMARY_MAC_ADDRESS 0x0D
|
|
* @param {number} SECONDARY_MAC_ADDRESS 0x0E
|
|
* @param {number} HW_NETWORK_FAMILY 0x0F
|
|
* @description https://lego.github.io/lego-ble-wireless-protocol-docs/index.html#hub-property-reference
|
|
*/
|
|
var HubPropertyPayload;
|
|
(function (HubPropertyPayload) {
|
|
HubPropertyPayload[HubPropertyPayload["ADVERTISING_NAME"] = 1] = "ADVERTISING_NAME";
|
|
HubPropertyPayload[HubPropertyPayload["BUTTON_STATE"] = 2] = "BUTTON_STATE";
|
|
HubPropertyPayload[HubPropertyPayload["FW_VERSION"] = 3] = "FW_VERSION";
|
|
HubPropertyPayload[HubPropertyPayload["HW_VERSION"] = 4] = "HW_VERSION";
|
|
HubPropertyPayload[HubPropertyPayload["RSSI"] = 5] = "RSSI";
|
|
HubPropertyPayload[HubPropertyPayload["BATTERY_VOLTAGE"] = 6] = "BATTERY_VOLTAGE";
|
|
HubPropertyPayload[HubPropertyPayload["BATTERY_TYPE"] = 7] = "BATTERY_TYPE";
|
|
HubPropertyPayload[HubPropertyPayload["MANUFACTURER_NAME"] = 8] = "MANUFACTURER_NAME";
|
|
HubPropertyPayload[HubPropertyPayload["RADIO_FIRMWARE_VERSION"] = 9] = "RADIO_FIRMWARE_VERSION";
|
|
HubPropertyPayload[HubPropertyPayload["LWP_PROTOCOL_VERSION"] = 10] = "LWP_PROTOCOL_VERSION";
|
|
HubPropertyPayload[HubPropertyPayload["SYSTEM_TYPE_ID"] = 11] = "SYSTEM_TYPE_ID";
|
|
HubPropertyPayload[HubPropertyPayload["HW_NETWORK_ID"] = 12] = "HW_NETWORK_ID";
|
|
HubPropertyPayload[HubPropertyPayload["PRIMARY_MAC_ADDRESS"] = 13] = "PRIMARY_MAC_ADDRESS";
|
|
HubPropertyPayload[HubPropertyPayload["SECONDARY_MAC_ADDRESS"] = 14] = "SECONDARY_MAC_ADDRESS";
|
|
HubPropertyPayload[HubPropertyPayload["HW_NETWORK_FAMILY"] = 15] = "HW_NETWORK_FAMILY";
|
|
})(HubPropertyPayload = exports.HubPropertyPayload || (exports.HubPropertyPayload = {}));
|
|
/**
|
|
* @typedef ActionType
|
|
* @param {number} SWITCH_OFF_HUB 0x01
|
|
* @param {number} DISCONNECT 0x02
|
|
* @param {number} VCC_PORT_CONTROL_ON 0x03
|
|
* @param {number} VCC_PORT_CONTROL_OFF 0x04
|
|
* @param {number} ACTIVATE_BUSY_INDICATION 0x05
|
|
* @param {number} RESET_BUSY_INDICATION 0x06
|
|
* @param {number} SHUTDOWN 0x2F
|
|
* @param {number} HUB_WILL_SWITCH_OFF 0x30
|
|
* @param {number} HUB_WILL_DISCONNECT 0x31
|
|
* @param {number} HUB_WILL_GO_INTO_BOOT_MODE 0x32
|
|
* @description https://lego.github.io/lego-ble-wireless-protocol-docs/index.html#action-types
|
|
*/
|
|
var ActionType;
|
|
(function (ActionType) {
|
|
ActionType[ActionType["SWITCH_OFF_HUB"] = 1] = "SWITCH_OFF_HUB";
|
|
ActionType[ActionType["DISCONNECT"] = 2] = "DISCONNECT";
|
|
ActionType[ActionType["VCC_PORT_CONTROL_ON"] = 3] = "VCC_PORT_CONTROL_ON";
|
|
ActionType[ActionType["VCC_PORT_CONTROL_OFF"] = 4] = "VCC_PORT_CONTROL_OFF";
|
|
ActionType[ActionType["ACTIVATE_BUSY_INDICATION"] = 5] = "ACTIVATE_BUSY_INDICATION";
|
|
ActionType[ActionType["RESET_BUSY_INDICATION"] = 6] = "RESET_BUSY_INDICATION";
|
|
ActionType[ActionType["SHUTDOWN"] = 47] = "SHUTDOWN";
|
|
ActionType[ActionType["HUB_WILL_SWITCH_OFF"] = 48] = "HUB_WILL_SWITCH_OFF";
|
|
ActionType[ActionType["HUB_WILL_DISCONNECT"] = 49] = "HUB_WILL_DISCONNECT";
|
|
ActionType[ActionType["HUB_WILL_GO_INTO_BOOT_MODE"] = 50] = "HUB_WILL_GO_INTO_BOOT_MODE";
|
|
})(ActionType = exports.ActionType || (exports.ActionType = {}));
|
|
/**
|
|
* @typedef AlertType
|
|
* @param {number} LOW_VOLTAGE 0x01
|
|
* @param {number} HIGH_CURRENT 0x02
|
|
* @param {number} LOW_SIGNAL_STRENGTH 0x03
|
|
* @param {number} OVER_POWER_CONDITION 0x04
|
|
* @description https://lego.github.io/lego-ble-wireless-protocol-docs/index.html#alert-type
|
|
*/
|
|
var AlertType;
|
|
(function (AlertType) {
|
|
AlertType[AlertType["LOW_VOLTAGE"] = 1] = "LOW_VOLTAGE";
|
|
AlertType[AlertType["HIGH_CURRENT"] = 2] = "HIGH_CURRENT";
|
|
AlertType[AlertType["LOW_SIGNAL_STRENGTH"] = 3] = "LOW_SIGNAL_STRENGTH";
|
|
AlertType[AlertType["OVER_POWER_CONDITION"] = 4] = "OVER_POWER_CONDITION";
|
|
})(AlertType = exports.AlertType || (exports.AlertType = {}));
|
|
/**
|
|
* @typedef AlertOperation
|
|
* @param {number} ENABLE_UPDATE 0x01
|
|
* @param {number} DISABLE_UPDATE 0x02
|
|
* @param {number} REQUEST_UPDATE 0x03
|
|
* @param {number} UPDATE 0x04
|
|
* @description https://lego.github.io/lego-ble-wireless-protocol-docs/index.html#alert-operation
|
|
*/
|
|
var AlertOperation;
|
|
(function (AlertOperation) {
|
|
AlertOperation[AlertOperation["LOW_VOLTAGE"] = 1] = "LOW_VOLTAGE";
|
|
AlertOperation[AlertOperation["HIGH_CURRENT"] = 2] = "HIGH_CURRENT";
|
|
AlertOperation[AlertOperation["LOW_SIGNAL_STRENGTH"] = 3] = "LOW_SIGNAL_STRENGTH";
|
|
AlertOperation[AlertOperation["OVER_POWER_CONDITION"] = 4] = "OVER_POWER_CONDITION";
|
|
})(AlertOperation = exports.AlertOperation || (exports.AlertOperation = {}));
|
|
/**
|
|
* @typedef AlertPayload
|
|
* @param {number} STATUS_OK 0x00
|
|
* @param {number} ALERT 0xFF
|
|
* @description https://lego.github.io/lego-ble-wireless-protocol-docs/index.html#alert-payload
|
|
*/
|
|
var AlertPayload;
|
|
(function (AlertPayload) {
|
|
AlertPayload[AlertPayload["STATUS_OK"] = 0] = "STATUS_OK";
|
|
AlertPayload[AlertPayload["ALERT"] = 255] = "ALERT";
|
|
})(AlertPayload = exports.AlertPayload || (exports.AlertPayload = {}));
|
|
/**
|
|
* @typedef Event
|
|
* @param {number} DETACHED_IO 0x00
|
|
* @param {number} ATTACHED_IO 0x01
|
|
* @param {number} ATTACHED_VIRTUAL_IO 0x02
|
|
* @description https://lego.github.io/lego-ble-wireless-protocol-docs/index.html#event
|
|
*/
|
|
var Event;
|
|
(function (Event) {
|
|
Event[Event["DETACHED_IO"] = 0] = "DETACHED_IO";
|
|
Event[Event["ATTACHED_IO"] = 1] = "ATTACHED_IO";
|
|
Event[Event["ATTACHED_VIRTUAL_IO"] = 2] = "ATTACHED_VIRTUAL_IO";
|
|
})(Event = exports.Event || (exports.Event = {}));
|
|
/**
|
|
* @typedef IOTypeID
|
|
* @param {number} MOTOR 0x0001
|
|
* @param {number} SYSTEM_TRAIN_MOTOR 0x0002
|
|
* @param {number} BUTTON 0x0005
|
|
* @param {number} LED_LIGHT 0x0008
|
|
* @param {number} VOLTAGE 0x0014
|
|
* @param {number} CURRENT 0x0015
|
|
* @param {number} PIEZO_TONE_SOUND 0x0016
|
|
* @param {number} RGB_LIGHT 0x0017
|
|
* @param {number} EXTERNAL_TILT_SENSOR 0x0022
|
|
* @param {number} MOTION_SENSOR 0x0023
|
|
* @param {number} VISION_SENSOR 0x0025
|
|
* @param {number} EXTERNAL_MOTOR 0x0026
|
|
* @param {number} INTERNAL_MOTOR 0x0027
|
|
* @param {number} INTERNAL_TILT 0x0028
|
|
* @description https://lego.github.io/lego-ble-wireless-protocol-docs/index.html#io-type-id
|
|
*/
|
|
var IOTypeID;
|
|
(function (IOTypeID) {
|
|
IOTypeID[IOTypeID["MOTOR"] = 1] = "MOTOR";
|
|
IOTypeID[IOTypeID["SYSTEM_TRAIN_MOTOR"] = 2] = "SYSTEM_TRAIN_MOTOR";
|
|
IOTypeID[IOTypeID["BUTTON"] = 5] = "BUTTON";
|
|
IOTypeID[IOTypeID["LED_LIGHT"] = 8] = "LED_LIGHT";
|
|
IOTypeID[IOTypeID["VOLTAGE"] = 20] = "VOLTAGE";
|
|
IOTypeID[IOTypeID["CURRENT"] = 21] = "CURRENT";
|
|
IOTypeID[IOTypeID["PIEZO_TONE_SOUND"] = 22] = "PIEZO_TONE_SOUND";
|
|
IOTypeID[IOTypeID["RGB_LIGHT"] = 23] = "RGB_LIGHT";
|
|
IOTypeID[IOTypeID["EXTERNAL_TILT_SENSOR"] = 34] = "EXTERNAL_TILT_SENSOR";
|
|
IOTypeID[IOTypeID["MOTION_SENSOR"] = 35] = "MOTION_SENSOR";
|
|
IOTypeID[IOTypeID["VISION_SENSOR"] = 37] = "VISION_SENSOR";
|
|
IOTypeID[IOTypeID["EXTERNAL_MOTOR"] = 38] = "EXTERNAL_MOTOR";
|
|
IOTypeID[IOTypeID["INTERNAL_MOTOR"] = 39] = "INTERNAL_MOTOR";
|
|
IOTypeID[IOTypeID["INTERNAL_TILT"] = 40] = "INTERNAL_TILT";
|
|
})(IOTypeID = exports.IOTypeID || (exports.IOTypeID = {}));
|
|
/**
|
|
* @typedef ErrorCode
|
|
* @param {number} ACK 0x01
|
|
* @param {number} MACK 0x02
|
|
* @param {number} BUFFER_OVERFLOW 0x03
|
|
* @param {number} TIMEOUT 0x04
|
|
* @param {number} COMMAND_NOT_RECOGNIZED 0x05
|
|
* @param {number} INVALID_USE 0x06
|
|
* @param {number} OVERCURRENT 0x07
|
|
* @param {number} INTERNAL_ERROR 0x08
|
|
* @description https://lego.github.io/lego-ble-wireless-protocol-docs/index.html#error-codes
|
|
*/
|
|
var ErrorCode;
|
|
(function (ErrorCode) {
|
|
ErrorCode[ErrorCode["ACK"] = 1] = "ACK";
|
|
ErrorCode[ErrorCode["MACK"] = 2] = "MACK";
|
|
ErrorCode[ErrorCode["BUFFER_OVERFLOW"] = 3] = "BUFFER_OVERFLOW";
|
|
ErrorCode[ErrorCode["TIMEOUT"] = 4] = "TIMEOUT";
|
|
ErrorCode[ErrorCode["COMMAND_NOT_RECOGNIZED"] = 5] = "COMMAND_NOT_RECOGNIZED";
|
|
ErrorCode[ErrorCode["INVALID_USE"] = 6] = "INVALID_USE";
|
|
ErrorCode[ErrorCode["OVERCURRENT"] = 7] = "OVERCURRENT";
|
|
ErrorCode[ErrorCode["INTERNAL_ERROR"] = 8] = "INTERNAL_ERROR";
|
|
})(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {}));
|
|
/**
|
|
* @typedef HWNetWorkCommandType
|
|
* @param {number} CONNECTION_REQUEST 0x02
|
|
* @param {number} FAMILY_REQUEST 0x03
|
|
* @param {number} FAMILY_SET 0x04
|
|
* @param {number} JOIN_DENIED 0x05
|
|
* @param {number} GET_FAMILY 0x06
|
|
* @param {number} FAMILY 0x07
|
|
* @param {number} GET_SUBFAMILY 0x08
|
|
* @param {number} SUBFAMILY 0x09
|
|
* @param {number} SUBFAMILY_SET 0x0A
|
|
* @param {number} GET_EXTENDED_FAMILY 0x0B
|
|
* @param {number} EXTENDED_FAMILY 0x0C
|
|
* @param {number} EXTENDED_FAMILY_SET 0x0D
|
|
* @param {number} RESET_LONG_PRESS_TIMING 0x0E
|
|
* @description https://lego.github.io/lego-ble-wireless-protocol-docs/index.html#h-w-network-command-type
|
|
*/
|
|
var HWNetWorkCommandType;
|
|
(function (HWNetWorkCommandType) {
|
|
HWNetWorkCommandType[HWNetWorkCommandType["CONNECTION_REQUEST"] = 2] = "CONNECTION_REQUEST";
|
|
HWNetWorkCommandType[HWNetWorkCommandType["FAMILY_REQUEST"] = 3] = "FAMILY_REQUEST";
|
|
HWNetWorkCommandType[HWNetWorkCommandType["FAMILY_SET"] = 4] = "FAMILY_SET";
|
|
HWNetWorkCommandType[HWNetWorkCommandType["JOIN_DENIED"] = 5] = "JOIN_DENIED";
|
|
HWNetWorkCommandType[HWNetWorkCommandType["GET_FAMILY"] = 6] = "GET_FAMILY";
|
|
HWNetWorkCommandType[HWNetWorkCommandType["FAMILY"] = 7] = "FAMILY";
|
|
HWNetWorkCommandType[HWNetWorkCommandType["GET_SUBFAMILY"] = 8] = "GET_SUBFAMILY";
|
|
HWNetWorkCommandType[HWNetWorkCommandType["SUBFAMILY"] = 9] = "SUBFAMILY";
|
|
HWNetWorkCommandType[HWNetWorkCommandType["SUBFAMILY_SET"] = 10] = "SUBFAMILY_SET";
|
|
HWNetWorkCommandType[HWNetWorkCommandType["GET_EXTENDED_FAMILY"] = 11] = "GET_EXTENDED_FAMILY";
|
|
HWNetWorkCommandType[HWNetWorkCommandType["EXTENDED_FAMILY"] = 12] = "EXTENDED_FAMILY";
|
|
HWNetWorkCommandType[HWNetWorkCommandType["EXTENDED_FAMILY_SET"] = 13] = "EXTENDED_FAMILY_SET";
|
|
HWNetWorkCommandType[HWNetWorkCommandType["RESET_LONG_PRESS_TIMING"] = 14] = "RESET_LONG_PRESS_TIMING";
|
|
})(HWNetWorkCommandType = exports.HWNetWorkCommandType || (exports.HWNetWorkCommandType = {}));
|
|
/**
|
|
* @typedef HWNetworkFamily
|
|
* @param {number} GREEN 0x01
|
|
* @param {number} YELLOW 0x02
|
|
* @param {number} RED 0x03
|
|
* @param {number} BLUE 0x04
|
|
* @param {number} PURPLE 0x05
|
|
* @param {number} LIGHT_BLUE 0x06
|
|
* @param {number} TEAL 0x07
|
|
* @param {number} PINK 0x08
|
|
* @param {number} WHITE 0x00
|
|
* @description https://lego.github.io/lego-ble-wireless-protocol-docs/index.html#h-w-network-family
|
|
*/
|
|
var HWNetworkFamily;
|
|
(function (HWNetworkFamily) {
|
|
HWNetworkFamily[HWNetworkFamily["GREEN"] = 1] = "GREEN";
|
|
HWNetworkFamily[HWNetworkFamily["YELLOW"] = 2] = "YELLOW";
|
|
HWNetworkFamily[HWNetworkFamily["RED"] = 3] = "RED";
|
|
HWNetworkFamily[HWNetworkFamily["BLUE"] = 4] = "BLUE";
|
|
HWNetworkFamily[HWNetworkFamily["PURPLE"] = 5] = "PURPLE";
|
|
HWNetworkFamily[HWNetworkFamily["LIGHT_BLUE"] = 6] = "LIGHT_BLUE";
|
|
HWNetworkFamily[HWNetworkFamily["TEAL"] = 7] = "TEAL";
|
|
HWNetworkFamily[HWNetworkFamily["PINK"] = 8] = "PINK";
|
|
HWNetworkFamily[HWNetworkFamily["WHITE"] = 0] = "WHITE";
|
|
})(HWNetworkFamily = exports.HWNetworkFamily || (exports.HWNetworkFamily = {}));
|
|
/**
|
|
* @typedef HWNetworkSubFamily
|
|
* @param {number} ONE_FLASH 0x01
|
|
* @param {number} TWO_FLASHES 0x02
|
|
* @param {number} THREE_FLASHES 0x03
|
|
* @param {number} FOUR_FLASHES 0x04
|
|
* @param {number} FIVE_FLASHES 0x05
|
|
* @param {number} SIX_FLASHES 0x06
|
|
* @param {number} SEVEN_FLASHES 0x07
|
|
* @description https://lego.github.io/lego-ble-wireless-protocol-docs/index.html#h-w-network-sub-family
|
|
*/
|
|
var HWNetworkSubFamily;
|
|
(function (HWNetworkSubFamily) {
|
|
HWNetworkSubFamily[HWNetworkSubFamily["ONE_FLASH"] = 1] = "ONE_FLASH";
|
|
HWNetworkSubFamily[HWNetworkSubFamily["TWO_FLASHES"] = 2] = "TWO_FLASHES";
|
|
HWNetworkSubFamily[HWNetworkSubFamily["THREE_FLASHES"] = 3] = "THREE_FLASHES";
|
|
HWNetworkSubFamily[HWNetworkSubFamily["FOUR_FLASHES"] = 4] = "FOUR_FLASHES";
|
|
HWNetworkSubFamily[HWNetworkSubFamily["FIVE_FLASHES"] = 5] = "FIVE_FLASHES";
|
|
HWNetworkSubFamily[HWNetworkSubFamily["SIX_FLASHES"] = 6] = "SIX_FLASHES";
|
|
HWNetworkSubFamily[HWNetworkSubFamily["SEVEN_FLASHES"] = 7] = "SEVEN_FLASHES";
|
|
})(HWNetworkSubFamily = exports.HWNetworkSubFamily || (exports.HWNetworkSubFamily = {}));
|
|
/**
|
|
* @typedef ModeInformationType
|
|
* @param {number} NAME 0x00
|
|
* @param {number} RAW 0x01
|
|
* @param {number} PCT 0x02
|
|
* @param {number} SI 0x03
|
|
* @param {number} SYMBOL 0x04
|
|
* @param {number} MAPPING 0x05
|
|
* @param {number} USED_INTERNALLY 0x06
|
|
* @param {number} MOTOR_BIAS 0x07
|
|
* @param {number} CAPABILITY_BITS 0x08
|
|
* @param {number} VALUE_FORMAT 0x80
|
|
* @description https://lego.github.io/lego-ble-wireless-protocol-docs/index.html#mode-information-types
|
|
*/
|
|
var ModeInformationType;
|
|
(function (ModeInformationType) {
|
|
ModeInformationType[ModeInformationType["NAME"] = 0] = "NAME";
|
|
ModeInformationType[ModeInformationType["RAW"] = 1] = "RAW";
|
|
ModeInformationType[ModeInformationType["PCT"] = 2] = "PCT";
|
|
ModeInformationType[ModeInformationType["SI"] = 3] = "SI";
|
|
ModeInformationType[ModeInformationType["SYMBOL"] = 4] = "SYMBOL";
|
|
ModeInformationType[ModeInformationType["MAPPING"] = 5] = "MAPPING";
|
|
ModeInformationType[ModeInformationType["USED_INTERNALLY"] = 6] = "USED_INTERNALLY";
|
|
ModeInformationType[ModeInformationType["MOTOR_BIAS"] = 7] = "MOTOR_BIAS";
|
|
ModeInformationType[ModeInformationType["CAPABILITY_BITS"] = 8] = "CAPABILITY_BITS";
|
|
ModeInformationType[ModeInformationType["VALUE_FORMAT"] = 128] = "VALUE_FORMAT";
|
|
})(ModeInformationType = exports.ModeInformationType || (exports.ModeInformationType = {}));
|
|
/**
|
|
* @typedef PortInputFormatSetupSubCommand
|
|
* @param {number} SET_MODEANDDATASET_COMBINATIONS 0x01
|
|
* @param {number} LOCK_LPF2_DEVICE_FOR_SETUP 0x02
|
|
* @param {number} UNLOCKANDSTARTWITHMULTIUPDATEENABLED 0x03
|
|
* @param {number} UNLOCKANDSTARTWITHMULTIUPDATEDISABLED 0x04
|
|
* @param {number} NOT_USED 0x05
|
|
* @param {number} RESET_SENSOR 0x06
|
|
* @description https://lego.github.io/lego-ble-wireless-protocol-docs/index.html#port-input-format-setup-sub-commands
|
|
*/
|
|
var PortInputFormatSetupSubCommand;
|
|
(function (PortInputFormatSetupSubCommand) {
|
|
PortInputFormatSetupSubCommand[PortInputFormatSetupSubCommand["SET_MODEANDDATASET_COMBINATIONS"] = 1] = "SET_MODEANDDATASET_COMBINATIONS";
|
|
PortInputFormatSetupSubCommand[PortInputFormatSetupSubCommand["LOCK_LPF2_DEVICE_FOR_SETUP"] = 2] = "LOCK_LPF2_DEVICE_FOR_SETUP";
|
|
PortInputFormatSetupSubCommand[PortInputFormatSetupSubCommand["UNLOCKANDSTARTWITHMULTIUPDATEENABLED"] = 3] = "UNLOCKANDSTARTWITHMULTIUPDATEENABLED";
|
|
PortInputFormatSetupSubCommand[PortInputFormatSetupSubCommand["UNLOCKANDSTARTWITHMULTIUPDATEDISABLED"] = 4] = "UNLOCKANDSTARTWITHMULTIUPDATEDISABLED";
|
|
PortInputFormatSetupSubCommand[PortInputFormatSetupSubCommand["NOT_USED"] = 5] = "NOT_USED";
|
|
PortInputFormatSetupSubCommand[PortInputFormatSetupSubCommand["RESET_SENSOR"] = 6] = "RESET_SENSOR";
|
|
})(PortInputFormatSetupSubCommand = exports.PortInputFormatSetupSubCommand || (exports.PortInputFormatSetupSubCommand = {}));
|
|
/**
|
|
* @typedef MarioPantsType
|
|
* @param {number} NONE 0x00
|
|
* @param {number} PROPELLER 0x06
|
|
* @param {number} CAT 0x11
|
|
* @param {number} FIRE 0x12
|
|
* @param {number} NORMAL 0x21
|
|
* @param {number} BUILDER 0x22
|
|
*/
|
|
var MarioPantsType;
|
|
(function (MarioPantsType) {
|
|
MarioPantsType[MarioPantsType["NONE"] = 0] = "NONE";
|
|
MarioPantsType[MarioPantsType["PROPELLER"] = 6] = "PROPELLER";
|
|
MarioPantsType[MarioPantsType["CAT"] = 17] = "CAT";
|
|
MarioPantsType[MarioPantsType["FIRE"] = 18] = "FIRE";
|
|
MarioPantsType[MarioPantsType["NORMAL"] = 33] = "NORMAL";
|
|
MarioPantsType[MarioPantsType["BUILDER"] = 34] = "BUILDER";
|
|
})(MarioPantsType = exports.MarioPantsType || (exports.MarioPantsType = {}));
|
|
/**
|
|
* @typedef MarioColor
|
|
* @param {number} WHITE 0x1300
|
|
* @param {number} RED 0x1500
|
|
* @param {number} BLUE 0x1700
|
|
* @param {number} YELLOW 0x1800
|
|
* @param {number} BLACK 0x1a00
|
|
* @param {number} GREEN 0x2500
|
|
* @param {number} BROWN 0x6a00
|
|
* @param {number} CYAN 0x4201
|
|
*/
|
|
var MarioColor;
|
|
(function (MarioColor) {
|
|
MarioColor[MarioColor["WHITE"] = 4864] = "WHITE";
|
|
MarioColor[MarioColor["RED"] = 5376] = "RED";
|
|
MarioColor[MarioColor["BLUE"] = 5888] = "BLUE";
|
|
MarioColor[MarioColor["YELLOW"] = 6144] = "YELLOW";
|
|
MarioColor[MarioColor["BLACK"] = 6656] = "BLACK";
|
|
MarioColor[MarioColor["GREEN"] = 9472] = "GREEN";
|
|
MarioColor[MarioColor["BROWN"] = 27136] = "BROWN";
|
|
MarioColor[MarioColor["CYAN"] = 16897] = "CYAN";
|
|
})(MarioColor = exports.MarioColor || (exports.MarioColor = {}));
|
|
//# sourceMappingURL=consts.js.map</code></pre>
|
|
</article>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<br class="clear">
|
|
|
|
<footer>
|
|
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.7</a>
|
|
</footer>
|
|
|
|
<script src="scripts/linenumber.js"></script>
|
|
<script src="scripts/pagelocation.js"></script>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|