372 lines
15 KiB
HTML
372 lines
15 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width">
|
|
<title>DocStrap Source: consts.js</title>
|
|
|
|
<!--[if lt IE 9]>
|
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
<![endif]-->
|
|
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
|
|
|
<link type="text/css" rel="stylesheet" href="styles/site.simplex.css">
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
|
|
<div class="container">
|
|
<div class="navbar-header">
|
|
<a class="navbar-brand" href="index.html">DocStrap</a>
|
|
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
</div>
|
|
<div class="navbar-collapse collapse" id="topNavigation">
|
|
<ul class="nav navbar-nav">
|
|
|
|
<li class="dropdown">
|
|
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
|
|
<ul class="dropdown-menu ">
|
|
<li><a href="BoostMoveHub.html">BoostMoveHub</a></li><li><a href="DuploTrainBase.html">DuploTrainBase</a></li><li><a href="Hub.html">Hub</a></li><li><a href="LPF2Hub.html">LPF2Hub</a></li><li><a href="PoweredUP.html">PoweredUP</a></li><li><a href="PUPHub.html">PUPHub</a></li><li><a href="PUPRemote.html">PUPRemote</a></li><li><a href="WeDo2SmartHub.html">WeDo2SmartHub</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li class="dropdown">
|
|
<a href="events.list.html" class="dropdown-toggle" data-toggle="dropdown">Events<b class="caret"></b></a>
|
|
<ul class="dropdown-menu ">
|
|
<li><a href="BoostMoveHub.html#event:attach">BoostMoveHub#event:attach</a></li><li><a href="BoostMoveHub.html#event:button">BoostMoveHub#event:button</a></li><li><a href="BoostMoveHub.html#event:color">BoostMoveHub#event:color</a></li><li><a href="BoostMoveHub.html#event:colorAndDistance">BoostMoveHub#event:colorAndDistance</a></li><li><a href="BoostMoveHub.html#event:detach">BoostMoveHub#event:detach</a></li><li><a href="BoostMoveHub.html#event:distance">BoostMoveHub#event:distance</a></li><li><a href="BoostMoveHub.html#event:rotate">BoostMoveHub#event:rotate</a></li><li><a href="BoostMoveHub.html#event:tilt">BoostMoveHub#event:tilt</a></li><li><a href="DuploTrainBase.html#event:color">DuploTrainBase#event:color</a></li><li><a href="DuploTrainBase.html#event:speed">DuploTrainBase#event:speed</a></li><li><a href="Hub.html#event:attach">Hub#event:attach</a></li><li><a href="Hub.html#event:detach">Hub#event:detach</a></li><li><a href="LPF2Hub.html#event:attach">LPF2Hub#event:attach</a></li><li><a href="LPF2Hub.html#event:button">LPF2Hub#event:button</a></li><li><a href="LPF2Hub.html#event:color">LPF2Hub#event:color</a></li><li><a href="LPF2Hub.html#event:colorAndDistance">LPF2Hub#event:colorAndDistance</a></li><li><a href="LPF2Hub.html#event:detach">LPF2Hub#event:detach</a></li><li><a href="LPF2Hub.html#event:distance">LPF2Hub#event:distance</a></li><li><a href="LPF2Hub.html#event:rotate">LPF2Hub#event:rotate</a></li><li><a href="LPF2Hub.html#event:speed">LPF2Hub#event:speed</a></li><li><a href="LPF2Hub.html#event:tilt">LPF2Hub#event:tilt</a></li><li><a href="PoweredUP.html#event:discover">PoweredUP#event:discover</a></li><li><a href="PUPHub.html#event:attach">PUPHub#event:attach</a></li><li><a href="PUPHub.html#event:button">PUPHub#event:button</a></li><li><a href="PUPHub.html#event:color">PUPHub#event:color</a></li><li><a href="PUPHub.html#event:colorAndDistance">PUPHub#event:colorAndDistance</a></li><li><a href="PUPHub.html#event:detach">PUPHub#event:detach</a></li><li><a href="PUPHub.html#event:distance">PUPHub#event:distance</a></li><li><a href="PUPHub.html#event:tilt">PUPHub#event:tilt</a></li><li><a href="PUPRemote.html#event:button">PUPRemote#event:button</a></li><li><a href="PUPRemote.html#event:colorAndDistance">PUPRemote#event:colorAndDistance</a></li><li><a href="WeDo2SmartHub.html#event:attach">WeDo2SmartHub#event:attach</a></li><li><a href="WeDo2SmartHub.html#event:button">WeDo2SmartHub#event:button</a></li><li><a href="WeDo2SmartHub.html#event:color">WeDo2SmartHub#event:color</a></li><li><a href="WeDo2SmartHub.html#event:detach">WeDo2SmartHub#event:detach</a></li><li><a href="WeDo2SmartHub.html#event:distance">WeDo2SmartHub#event:distance</a></li><li><a href="WeDo2SmartHub.html#event:rotate">WeDo2SmartHub#event:rotate</a></li><li><a href="WeDo2SmartHub.html#event:tilt">WeDo2SmartHub#event:tilt</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li class="dropdown">
|
|
<a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
|
|
<ul class="dropdown-menu ">
|
|
<li><a href="global.html">Global</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<div class="col-sm-3 col-md-3">
|
|
<form class="navbar-form" role="search">
|
|
<div class="input-group">
|
|
<input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
|
|
<div class="input-group-btn">
|
|
<button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="container" id="toc-content">
|
|
<div class="row">
|
|
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div id="main">
|
|
|
|
|
|
<h1 class="page-title">Source: consts.js</h1>
|
|
|
|
<section>
|
|
<article>
|
|
<pre
|
|
class="sunlight-highlight-javascript linenums">"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
/**
|
|
* @typedef HubType
|
|
* @property {number} UNKNOWN 0
|
|
* @property {number} WEDO2_SMART_HUB 1
|
|
* @property {number} BOOST_MOVE_HUB 2
|
|
* @property {number} POWERED_UP_HUB 3
|
|
* @property {number} POWERED_UP_REMOTE 4
|
|
* @property {number} DUPLO_TRAIN_HUB 5
|
|
*/
|
|
var HubType;
|
|
(function (HubType) {
|
|
HubType[HubType["UNKNOWN"] = 0] = "UNKNOWN";
|
|
HubType[HubType["WEDO2_SMART_HUB"] = 1] = "WEDO2_SMART_HUB";
|
|
HubType[HubType["BOOST_MOVE_HUB"] = 2] = "BOOST_MOVE_HUB";
|
|
HubType[HubType["POWERED_UP_HUB"] = 3] = "POWERED_UP_HUB";
|
|
HubType[HubType["POWERED_UP_REMOTE"] = 4] = "POWERED_UP_REMOTE";
|
|
HubType[HubType["DUPLO_TRAIN_HUB"] = 5] = "DUPLO_TRAIN_HUB";
|
|
})(HubType = exports.HubType || (exports.HubType = {}));
|
|
/**
|
|
* @typedef DeviceType
|
|
* @property {number} UNKNOWN 0
|
|
* @property {number} BASIC_MOTOR 1
|
|
* @property {number} TRAIN_MOTOR 2
|
|
* @property {number} LED_LIGHTS 8
|
|
* @property {number} BOOST_LED 22
|
|
* @property {number} WEDO2_TILT 34
|
|
* @property {number} WEDO2_DISTANCE 35
|
|
* @property {number} BOOST_DISTANCE 37
|
|
* @property {number} BOOST_TACHO_MOTOR 38
|
|
* @property {number} BOOST_MOVE_HUB_MOTOR 39
|
|
* @property {number} BOOST_TILT 40
|
|
* @property {number} DUPLO_TRAIN_BASE_MOTOR 41
|
|
* @property {number} DUPLO_TRAIN_BASE_SPEAKER 42
|
|
* @property {number} DUPLO_TRAIN_BASE_COLOR 43
|
|
* @property {number} DUPLO_TRAIN_BASE_SPEEDOMETER 44
|
|
* @property {number} POWERED_UP_REMOTE_BUTTON 55
|
|
*/
|
|
var DeviceType;
|
|
(function (DeviceType) {
|
|
DeviceType[DeviceType["UNKNOWN"] = 0] = "UNKNOWN";
|
|
DeviceType[DeviceType["BASIC_MOTOR"] = 1] = "BASIC_MOTOR";
|
|
DeviceType[DeviceType["TRAIN_MOTOR"] = 2] = "TRAIN_MOTOR";
|
|
DeviceType[DeviceType["LED_LIGHTS"] = 8] = "LED_LIGHTS";
|
|
DeviceType[DeviceType["BOOST_LED"] = 22] = "BOOST_LED";
|
|
DeviceType[DeviceType["WEDO2_TILT"] = 34] = "WEDO2_TILT";
|
|
DeviceType[DeviceType["WEDO2_DISTANCE"] = 35] = "WEDO2_DISTANCE";
|
|
DeviceType[DeviceType["BOOST_DISTANCE"] = 37] = "BOOST_DISTANCE";
|
|
DeviceType[DeviceType["BOOST_TACHO_MOTOR"] = 38] = "BOOST_TACHO_MOTOR";
|
|
DeviceType[DeviceType["BOOST_MOVE_HUB_MOTOR"] = 39] = "BOOST_MOVE_HUB_MOTOR";
|
|
DeviceType[DeviceType["BOOST_TILT"] = 40] = "BOOST_TILT";
|
|
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"] = 43] = "DUPLO_TRAIN_BASE_COLOR";
|
|
DeviceType[DeviceType["DUPLO_TRAIN_BASE_SPEEDOMETER"] = 44] = "DUPLO_TRAIN_BASE_SPEEDOMETER";
|
|
DeviceType[DeviceType["POWERED_UP_REMOTE_BUTTON"] = 55] = "POWERED_UP_REMOTE_BUTTON";
|
|
})(DeviceType = exports.DeviceType || (exports.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 = {}));
|
|
/**
|
|
* @typedef ButtonState
|
|
* @property {number} PRESSED 0
|
|
* @property {number} RELEASED 1
|
|
* @property {number} UP 2
|
|
* @property {number} DOWN 3
|
|
* @property {number} STOP 4
|
|
*/
|
|
var ButtonState;
|
|
(function (ButtonState) {
|
|
ButtonState[ButtonState["PRESSED"] = 0] = "PRESSED";
|
|
ButtonState[ButtonState["RELEASED"] = 1] = "RELEASED";
|
|
ButtonState[ButtonState["UP"] = 2] = "UP";
|
|
ButtonState[ButtonState["DOWN"] = 3] = "DOWN";
|
|
ButtonState[ButtonState["STOP"] = 4] = "STOP";
|
|
})(ButtonState = exports.ButtonState || (exports.ButtonState = {}));
|
|
/**
|
|
* @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["BOOST_MOVE_HUB_ID"] = 64] = "BOOST_MOVE_HUB_ID";
|
|
BLEManufacturerData[BLEManufacturerData["POWERED_UP_HUB_ID"] = 65] = "POWERED_UP_HUB_ID";
|
|
BLEManufacturerData[BLEManufacturerData["POWERED_UP_REMOTE_ID"] = 66] = "POWERED_UP_REMOTE_ID";
|
|
BLEManufacturerData[BLEManufacturerData["DUPLO_TRAIN_HUB_ID"] = 32] = "DUPLO_TRAIN_HUB_ID";
|
|
})(BLEManufacturerData = exports.BLEManufacturerData || (exports.BLEManufacturerData = {}));
|
|
var BLEService;
|
|
(function (BLEService) {
|
|
BLEService["WEDO2_SMART_HUB"] = "00001523-1212-efde-1523-785feabcd123";
|
|
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_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 = {}));
|
|
</pre>
|
|
</article>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="modal fade" id="searchResults">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
<h4 class="modal-title">Search results</h4>
|
|
</div>
|
|
<div class="modal-body"></div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
</div>
|
|
</div><!-- /.modal-content -->
|
|
</div><!-- /.modal-dialog -->
|
|
</div>
|
|
|
|
|
|
<footer>
|
|
|
|
|
|
<span class="copyright">
|
|
node-poweredup by Nathan Kellenicki licensed under the MIT license.
|
|
</span>
|
|
|
|
<span class="jsdoc-message">
|
|
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
|
|
|
|
on Fri Feb 1st 2019
|
|
|
|
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
|
</span>
|
|
</footer>
|
|
|
|
<script src="scripts/docstrap.lib.js"></script>
|
|
<script src="scripts/toc.js"></script>
|
|
|
|
<script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
|
|
|
|
|
|
<script>
|
|
$( function () {
|
|
$( "[id*='$']" ).each( function () {
|
|
var $this = $( this );
|
|
|
|
$this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
|
|
} );
|
|
|
|
$( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
|
|
var $this = $( this );
|
|
|
|
var example = $this.find( "code" );
|
|
exampleText = example.html();
|
|
var lang = /{@lang (.*?)}/.exec( exampleText );
|
|
if ( lang && lang[1] ) {
|
|
exampleText = exampleText.replace( lang[0], "" );
|
|
example.html( exampleText );
|
|
lang = lang[1];
|
|
} else {
|
|
var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
|
|
lang = langClassMatch ? langClassMatch[1] : "javascript";
|
|
}
|
|
|
|
if ( lang ) {
|
|
|
|
$this
|
|
.addClass( "sunlight-highlight-" + lang )
|
|
.addClass( "linenums" )
|
|
.html( example.html() );
|
|
|
|
}
|
|
} );
|
|
|
|
Sunlight.highlightAll( {
|
|
lineNumbers : true,
|
|
showMenu : true,
|
|
enableDoclinks : true
|
|
} );
|
|
|
|
$.catchAnchorLinks( {
|
|
navbarOffset: 10
|
|
} );
|
|
$( "#toc" ).toc( {
|
|
anchorName : function ( i, heading, prefix ) {
|
|
return $( heading ).attr( "id" ) || ( prefix + i );
|
|
},
|
|
selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
|
|
showAndHide : false,
|
|
smoothScrolling: true
|
|
} );
|
|
|
|
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
|
$( '.dropdown-toggle' ).dropdown();
|
|
|
|
$( "table" ).each( function () {
|
|
var $this = $( this );
|
|
$this.addClass('table');
|
|
} );
|
|
|
|
} );
|
|
</script>
|
|
|
|
|
|
|
|
<!--Navigation and Symbol Display-->
|
|
|
|
|
|
<!--Google Analytics-->
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
SearcherDisplay.init();
|
|
});
|
|
</script>
|
|
|
|
|
|
</body>
|
|
</html>
|