Updated docs
This commit is contained in:
parent
04e8798c6a
commit
a3f66d5df0
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4030
docs/PUPHub.html
4030
docs/PUPHub.html
File diff suppressed because one or more lines are too long
4030
docs/PUPRemote.html
4030
docs/PUPRemote.html
File diff suppressed because one or more lines are too long
1431
docs/PoweredUP.html
1431
docs/PoweredUP.html
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -1,419 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>node-poweredup 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">node-poweredup</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="PoweredUP.html">PoweredUP</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="PoweredUP.html#event:discover">PoweredUP#event:discover</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} MOVE_HUB 2
|
||||
* @property {number} POWERED_UP_HUB 3
|
||||
* @property {number} POWERED_UP_REMOTE 4
|
||||
* @property {number} DUPLO_TRAIN_HUB 5
|
||||
* @property {number} CONTROL_PLUS_HUB 6
|
||||
*/
|
||||
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 = 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} LED_LIGHTS 8
|
||||
* @property {number} VOLTAGE 20
|
||||
* @property {number} CURRENT 21
|
||||
* @property {number} PIEZO_TONE 22
|
||||
* @property {number} RGB_LIGHT 23
|
||||
* @property {number} WEDO2_TILT 34
|
||||
* @property {number} WEDO2_DISTANCE 35
|
||||
* @property {number} COLOR_DISTANCE_SENSOR 37
|
||||
* @property {number} MEDIUM_LINEAR_MOTOR 38
|
||||
* @property {number} MOVE_HUB_MEDIUM_LINEAR_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} CONTROL_PLUS_LARGE_MOTOR 46
|
||||
* @property {number} CONTROL_PLUS_XLARGE_MOTOR 47
|
||||
* @property {number} POWERED_UP_REMOTE_BUTTON 55
|
||||
* @property {number} RSSI 56
|
||||
* @property {number} CONTROL_PLUS_ACCELEROMETER 58
|
||||
* @property {number} CONTROL_PLUS_TILT 59
|
||||
*/
|
||||
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"; // Spike Prime
|
||||
})(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 0
|
||||
* @property {number} RELEASED 1
|
||||
* @property {number} UP 2
|
||||
* @property {number} DOWN 3
|
||||
* @property {number} STOP 4
|
||||
*/
|
||||
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} HOLD 127
|
||||
* @property {number} BRAKE 128
|
||||
*/
|
||||
var BrakingStyle;
|
||||
(function (BrakingStyle) {
|
||||
BrakingStyle[BrakingStyle["HOLD"] = 127] = "HOLD";
|
||||
BrakingStyle[BrakingStyle["BRAKE"] = 128] = "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["TECHNIC_MEDIUM_HUB"] = 128] = "TECHNIC_MEDIUM_HUB";
|
||||
})(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 = {}));
|
||||
//# sourceMappingURL=consts.js.map</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.6.3</a>
|
||||
|
||||
on Fri Feb 7th 2020
|
||||
|
||||
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>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 116 KiB |
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 118 KiB |
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 120 KiB |
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 114 KiB |
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 120 KiB |
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 117 KiB |
Binary file not shown.
4084
docs/global.html
4084
docs/global.html
File diff suppressed because it is too large
Load Diff
575
docs/hub.js.html
575
docs/hub.js.html
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,384 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>node-poweredup Source: poweredup-node.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">node-poweredup</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="PoweredUP.html">PoweredUP</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="PoweredUP.html#event:discover">PoweredUP#event:discover</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: poweredup-node.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre
|
||||
class="sunlight-highlight-javascript linenums">"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const nobleabstraction_1 = require("./nobleabstraction");
|
||||
const duplotrainbase_1 = require("./hubs/duplotrainbase");
|
||||
const hub_1 = require("./hubs/hub");
|
||||
const movehub_1 = require("./hubs/movehub");
|
||||
const remotecontrol_1 = require("./hubs/remotecontrol");
|
||||
const technicmediumhub_1 = require("./hubs/technicmediumhub");
|
||||
const wedo2smarthub_1 = require("./hubs/wedo2smarthub");
|
||||
const events_1 = require("events");
|
||||
const Debug = require("debug");
|
||||
const debug = Debug("poweredup");
|
||||
const noble = require("@abandonware/noble");
|
||||
let ready = false;
|
||||
let wantScan = false;
|
||||
let discoveryEventAttached = false;
|
||||
const startScanning = () => {
|
||||
noble.startScanning();
|
||||
};
|
||||
noble.on("stateChange", (state) => {
|
||||
ready = (state === "poweredOn");
|
||||
if (ready) {
|
||||
if (wantScan) {
|
||||
debug("Scanning started");
|
||||
startScanning();
|
||||
}
|
||||
}
|
||||
else {
|
||||
noble.stopScanning();
|
||||
}
|
||||
});
|
||||
/**
|
||||
* @class PoweredUP
|
||||
* @extends EventEmitter
|
||||
*/
|
||||
class PoweredUP extends events_1.EventEmitter {
|
||||
constructor() {
|
||||
super();
|
||||
this._connectedHubs = {};
|
||||
this._discoveryEventHandler = this._discoveryEventHandler.bind(this);
|
||||
}
|
||||
/**
|
||||
* Begin scanning for Powered UP Hub devices.
|
||||
* @method PoweredUP#scan
|
||||
*/
|
||||
async scan() {
|
||||
wantScan = true;
|
||||
if (!discoveryEventAttached) {
|
||||
noble.on("discover", this._discoveryEventHandler);
|
||||
discoveryEventAttached = true;
|
||||
}
|
||||
if (ready) {
|
||||
debug("Scanning started");
|
||||
startScanning();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* Stop scanning for Powered UP Hub devices.
|
||||
* @method PoweredUP#stop
|
||||
*/
|
||||
stop() {
|
||||
wantScan = false;
|
||||
if (discoveryEventAttached) {
|
||||
noble.removeListener("discover", this._discoveryEventHandler);
|
||||
discoveryEventAttached = false;
|
||||
}
|
||||
noble.stopScanning();
|
||||
}
|
||||
/**
|
||||
* Retrieve a list of Powered UP Hubs.
|
||||
* @method PoweredUP#getHubs
|
||||
* @returns {BaseHub[]}
|
||||
*/
|
||||
getHubs() {
|
||||
return Object.values(this._connectedHubs);
|
||||
}
|
||||
/**
|
||||
* Retrieve a Powered UP Hub by UUID.
|
||||
* @method PoweredUP#getHubByUUID
|
||||
* @param {string} uuid
|
||||
* @returns {BaseHub | null}
|
||||
*/
|
||||
getHubByUUID(uuid) {
|
||||
return this._connectedHubs[uuid];
|
||||
}
|
||||
/**
|
||||
* Retrieve a Powered UP Hub by primary MAC address.
|
||||
* @method PoweredUP#getHubByPrimaryMACAddress
|
||||
* @param {string} address
|
||||
* @returns {BaseHub}
|
||||
*/
|
||||
getHubByPrimaryMACAddress(address) {
|
||||
return Object.values(this._connectedHubs).filter((hub) => hub.primaryMACAddress === address)[0];
|
||||
}
|
||||
/**
|
||||
* Retrieve a list of Powered UP Hub by name.
|
||||
* @method PoweredUP#getHubsByName
|
||||
* @param {string} name
|
||||
* @returns {BaseHub[]}
|
||||
*/
|
||||
getHubsByName(name) {
|
||||
return Object.values(this._connectedHubs).filter((hub) => hub.name === name);
|
||||
}
|
||||
/**
|
||||
* Retrieve a list of Powered UP Hub by type.
|
||||
* @method PoweredUP#getHubsByType
|
||||
* @param {string} name
|
||||
* @returns {BaseHub[]}
|
||||
*/
|
||||
getHubsByType(hubType) {
|
||||
return Object.values(this._connectedHubs).filter((hub) => hub.type === hubType);
|
||||
}
|
||||
async _discoveryEventHandler(peripheral) {
|
||||
peripheral.removeAllListeners();
|
||||
const device = new nobleabstraction_1.NobleDevice(peripheral);
|
||||
let hub;
|
||||
if (await wedo2smarthub_1.WeDo2SmartHub.IsWeDo2SmartHub(peripheral)) {
|
||||
hub = new wedo2smarthub_1.WeDo2SmartHub(device);
|
||||
}
|
||||
else if (await movehub_1.MoveHub.IsMoveHub(peripheral)) {
|
||||
hub = new movehub_1.MoveHub(device);
|
||||
}
|
||||
else if (await hub_1.Hub.IsHub(peripheral)) {
|
||||
hub = new hub_1.Hub(device);
|
||||
}
|
||||
else if (await remotecontrol_1.RemoteControl.IsRemoteControl(peripheral)) {
|
||||
hub = new remotecontrol_1.RemoteControl(device);
|
||||
}
|
||||
else if (await duplotrainbase_1.DuploTrainBase.IsDuploTrainBase(peripheral)) {
|
||||
hub = new duplotrainbase_1.DuploTrainBase(device);
|
||||
}
|
||||
else if (await technicmediumhub_1.TechnicMediumHub.IsTechnicMediumHub(peripheral)) {
|
||||
hub = new technicmediumhub_1.TechnicMediumHub(device);
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
device.on("discoverComplete", () => {
|
||||
hub.on("connect", () => {
|
||||
debug(`Hub ${hub.uuid} connected`);
|
||||
this._connectedHubs[hub.uuid] = hub;
|
||||
});
|
||||
hub.on("disconnect", () => {
|
||||
debug(`Hub ${hub.uuid} disconnected`);
|
||||
delete this._connectedHubs[hub.uuid];
|
||||
if (wantScan) {
|
||||
startScanning();
|
||||
}
|
||||
});
|
||||
debug(`Hub ${hub.uuid} discovered`);
|
||||
/**
|
||||
* Emits when a Powered UP Hub device is found.
|
||||
* @event PoweredUP#discover
|
||||
* @param {WeDo2SmartHub | MoveHub | TechnicMediumHub | Hub | RemoteControl | DuploTrainBase} hub
|
||||
*/
|
||||
this.emit("discover", hub);
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.PoweredUP = PoweredUP;
|
||||
//# sourceMappingURL=poweredup-node.js.map</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.6.3</a>
|
||||
|
||||
on Fri Feb 7th 2020
|
||||
|
||||
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>
|
@ -1,380 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>DocStrap Source: poweredup.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: poweredup.js</h1>
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre
|
||||
class="sunlight-highlight-javascript linenums">"use strict";
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
result["default"] = mod;
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const bledevice_1 = require("./bledevice");
|
||||
const boostmovehub_1 = require("./boostmovehub");
|
||||
const duplotrainbase_1 = require("./duplotrainbase");
|
||||
const puphub_1 = require("./puphub");
|
||||
const pupremote_1 = require("./pupremote");
|
||||
const wedo2smarthub_1 = require("./wedo2smarthub");
|
||||
const utils_1 = require("./utils");
|
||||
const Consts = __importStar(require("./consts"));
|
||||
const events_1 = require("events");
|
||||
const Debug = require("debug");
|
||||
const debug = Debug("poweredup");
|
||||
const noble = require("noble-mac");
|
||||
let ready = false;
|
||||
let wantScan = false;
|
||||
let discoveryEventAttached = false;
|
||||
const startScanning = () => {
|
||||
if (utils_1.isBrowserContext) {
|
||||
noble.startScanning([Consts.BLEService.WEDO2_SMART_HUB, Consts.BLEService.LPF2_HUB]);
|
||||
}
|
||||
else {
|
||||
noble.startScanning();
|
||||
}
|
||||
};
|
||||
noble.on("stateChange", (state) => {
|
||||
ready = (state === "poweredOn");
|
||||
if (ready) {
|
||||
if (wantScan) {
|
||||
debug("Scanning started");
|
||||
startScanning();
|
||||
}
|
||||
}
|
||||
else {
|
||||
noble.stopScanning();
|
||||
}
|
||||
});
|
||||
/**
|
||||
* @class PoweredUP
|
||||
* @extends EventEmitter
|
||||
*/
|
||||
class PoweredUP extends events_1.EventEmitter {
|
||||
constructor() {
|
||||
super();
|
||||
this.autoSubscribe = true;
|
||||
this._connectedHubs = {};
|
||||
this._discoveryEventHandler = this._discoveryEventHandler.bind(this);
|
||||
}
|
||||
/**
|
||||
* Begin scanning for Powered UP Hub devices.
|
||||
* @method PoweredUP#scan
|
||||
*/
|
||||
scan() {
|
||||
wantScan = true;
|
||||
if (!discoveryEventAttached) {
|
||||
noble.on("discover", this._discoveryEventHandler);
|
||||
discoveryEventAttached = true;
|
||||
}
|
||||
if (ready) {
|
||||
debug("Scanning started");
|
||||
startScanning();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Stop scanning for Powered UP Hub devices.
|
||||
* @method PoweredUP#stop
|
||||
*/
|
||||
stop() {
|
||||
wantScan = false;
|
||||
if (discoveryEventAttached) {
|
||||
noble.removeListener("discover", this._discoveryEventHandler);
|
||||
discoveryEventAttached = false;
|
||||
}
|
||||
noble.stopScanning();
|
||||
}
|
||||
/**
|
||||
* Retrieve a list of Powered UP Hubs.
|
||||
* @method PoweredUP#getConnectedHubs
|
||||
* @returns {Hub[]}
|
||||
*/
|
||||
getConnectedHubs() {
|
||||
return Object.keys(this._connectedHubs).map((uuid) => this._connectedHubs[uuid]);
|
||||
}
|
||||
/**
|
||||
* Retrieve a Powered UP Hub by UUID.
|
||||
* @method PoweredUP#getConnectedHubByUUID
|
||||
* @param {string} uuid
|
||||
* @returns {Hub | null}
|
||||
*/
|
||||
getConnectedHubByUUID(uuid) {
|
||||
return this._connectedHubs[uuid];
|
||||
}
|
||||
/**
|
||||
* Retrieve a list of Powered UP Hub by name.
|
||||
* @method PoweredUP#getConnectedHubsByName
|
||||
* @param {string} name
|
||||
* @returns {Hub[]}
|
||||
*/
|
||||
getConnectedHubsByName(name) {
|
||||
return Object.keys(this._connectedHubs).map((uuid) => this._connectedHubs[uuid]).filter((hub) => hub.name === name);
|
||||
}
|
||||
async _discoveryEventHandler(peripheral) {
|
||||
const device = new bledevice_1.BLEDevice(peripheral);
|
||||
let hub;
|
||||
if (await wedo2smarthub_1.WeDo2SmartHub.IsWeDo2SmartHub(peripheral)) {
|
||||
hub = new wedo2smarthub_1.WeDo2SmartHub(device, this.autoSubscribe);
|
||||
}
|
||||
else if (await boostmovehub_1.BoostMoveHub.IsBoostMoveHub(peripheral)) {
|
||||
hub = new boostmovehub_1.BoostMoveHub(device, this.autoSubscribe);
|
||||
}
|
||||
else if (await puphub_1.PUPHub.IsPUPHub(peripheral)) {
|
||||
hub = new puphub_1.PUPHub(device, this.autoSubscribe);
|
||||
}
|
||||
else if (await pupremote_1.PUPRemote.IsPUPRemote(peripheral)) {
|
||||
hub = new pupremote_1.PUPRemote(device, this.autoSubscribe);
|
||||
}
|
||||
else if (await duplotrainbase_1.DuploTrainBase.IsDuploTrainBase(peripheral)) {
|
||||
hub = new duplotrainbase_1.DuploTrainBase(device, this.autoSubscribe);
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
peripheral.removeAllListeners();
|
||||
// noble.stopScanning();
|
||||
// if (!isBrowserContext) {
|
||||
// startScanning();
|
||||
// }
|
||||
device.on("discoverComplete", () => {
|
||||
hub.on("connect", () => {
|
||||
debug(`Hub ${hub.uuid} connected`);
|
||||
this._connectedHubs[hub.uuid] = hub;
|
||||
});
|
||||
hub.on("disconnect", () => {
|
||||
debug(`Hub ${hub.uuid} disconnected`);
|
||||
delete this._connectedHubs[hub.uuid];
|
||||
if (wantScan) {
|
||||
startScanning();
|
||||
}
|
||||
});
|
||||
debug(`Hub ${hub.uuid} discovered`);
|
||||
/**
|
||||
* Emits when a Powered UP Hub device is found.
|
||||
* @event PoweredUP#discover
|
||||
* @param {WeDo2SmartHub | BoostMoveHub | PUPHub | PUPRemote | DuploTrainBase} hub
|
||||
*/
|
||||
this.emit("discover", hub);
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.PoweredUP = PoweredUP;
|
||||
</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 Wed Feb 13th 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>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,25 +0,0 @@
|
||||
/*global document */
|
||||
(function() {
|
||||
var source = document.getElementsByClassName('prettyprint source linenums');
|
||||
var i = 0;
|
||||
var lineNumber = 0;
|
||||
var lineId;
|
||||
var lines;
|
||||
var totalLines;
|
||||
var anchorHash;
|
||||
|
||||
if (source && source[0]) {
|
||||
anchorHash = document.location.hash.substring(1);
|
||||
lines = source[0].getElementsByTagName('li');
|
||||
totalLines = lines.length;
|
||||
|
||||
for (; i < totalLines; i++) {
|
||||
lineNumber++;
|
||||
lineId = 'line' + lineNumber;
|
||||
lines[i].id = lineId;
|
||||
if (lineId === anchorHash) {
|
||||
lines[i].className += ' selected';
|
||||
}
|
||||
}
|
||||
}
|
||||
})();
|
@ -1,358 +0,0 @@
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
src: url('../fonts/OpenSans-Regular-webfont.eot');
|
||||
src:
|
||||
local('Open Sans'),
|
||||
local('OpenSans'),
|
||||
url('../fonts/OpenSans-Regular-webfont.eot?#iefix') format('embedded-opentype'),
|
||||
url('../fonts/OpenSans-Regular-webfont.woff') format('woff'),
|
||||
url('../fonts/OpenSans-Regular-webfont.svg#open_sansregular') format('svg');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Open Sans Light';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
src: url('../fonts/OpenSans-Light-webfont.eot');
|
||||
src:
|
||||
local('Open Sans Light'),
|
||||
local('OpenSans Light'),
|
||||
url('../fonts/OpenSans-Light-webfont.eot?#iefix') format('embedded-opentype'),
|
||||
url('../fonts/OpenSans-Light-webfont.woff') format('woff'),
|
||||
url('../fonts/OpenSans-Light-webfont.svg#open_sanslight') format('svg');
|
||||
}
|
||||
|
||||
html
|
||||
{
|
||||
overflow: auto;
|
||||
background-color: #fff;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
body
|
||||
{
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
line-height: 1.5;
|
||||
color: #4d4e53;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
a, a:visited, a:active {
|
||||
color: #0095dd;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
header
|
||||
{
|
||||
display: block;
|
||||
padding: 0px 4px;
|
||||
}
|
||||
|
||||
tt, code, kbd, samp {
|
||||
font-family: Consolas, Monaco, 'Andale Mono', monospace;
|
||||
}
|
||||
|
||||
.class-description {
|
||||
font-size: 130%;
|
||||
line-height: 140%;
|
||||
margin-bottom: 1em;
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.class-description:empty {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#main {
|
||||
float: left;
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
article dl {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
article img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
section
|
||||
{
|
||||
display: block;
|
||||
background-color: #fff;
|
||||
padding: 12px 24px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
.variation {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.signature-attributes {
|
||||
font-size: 60%;
|
||||
color: #aaa;
|
||||
font-style: italic;
|
||||
font-weight: lighter;
|
||||
}
|
||||
|
||||
nav
|
||||
{
|
||||
display: block;
|
||||
float: right;
|
||||
margin-top: 28px;
|
||||
width: 30%;
|
||||
box-sizing: border-box;
|
||||
border-left: 1px solid #ccc;
|
||||
padding-left: 16px;
|
||||
}
|
||||
|
||||
nav ul {
|
||||
font-family: 'Lucida Grande', 'Lucida Sans Unicode', arial, sans-serif;
|
||||
font-size: 100%;
|
||||
line-height: 17px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
nav ul a, nav ul a:visited, nav ul a:active {
|
||||
font-family: Consolas, Monaco, 'Andale Mono', monospace;
|
||||
line-height: 18px;
|
||||
color: #4D4E53;
|
||||
}
|
||||
|
||||
nav h3 {
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
nav li {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
footer {
|
||||
display: block;
|
||||
padding: 6px;
|
||||
margin-top: 12px;
|
||||
font-style: italic;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4 {
|
||||
font-weight: 200;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h1
|
||||
{
|
||||
font-family: 'Open Sans Light', sans-serif;
|
||||
font-size: 48px;
|
||||
letter-spacing: -2px;
|
||||
margin: 12px 24px 20px;
|
||||
}
|
||||
|
||||
h2, h3.subsection-title
|
||||
{
|
||||
font-size: 30px;
|
||||
font-weight: 700;
|
||||
letter-spacing: -1px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
h3
|
||||
{
|
||||
font-size: 24px;
|
||||
letter-spacing: -0.5px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
h4
|
||||
{
|
||||
font-size: 18px;
|
||||
letter-spacing: -0.33px;
|
||||
margin-bottom: 12px;
|
||||
color: #4d4e53;
|
||||
}
|
||||
|
||||
h5, .container-overview .subsection-title
|
||||
{
|
||||
font-size: 120%;
|
||||
font-weight: bold;
|
||||
letter-spacing: -0.01em;
|
||||
margin: 8px 0 3px 0;
|
||||
}
|
||||
|
||||
h6
|
||||
{
|
||||
font-size: 100%;
|
||||
letter-spacing: -0.01em;
|
||||
margin: 6px 0 3px 0;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
table
|
||||
{
|
||||
border-spacing: 0;
|
||||
border: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
td, th
|
||||
{
|
||||
border: 1px solid #ddd;
|
||||
margin: 0px;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
padding: 4px 6px;
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
thead tr
|
||||
{
|
||||
background-color: #ddd;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
th { border-right: 1px solid #aaa; }
|
||||
tr > th:last-child { border-right: 1px solid #ddd; }
|
||||
|
||||
.ancestors, .attribs { color: #999; }
|
||||
.ancestors a, .attribs a
|
||||
{
|
||||
color: #999 !important;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.clear
|
||||
{
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.important
|
||||
{
|
||||
font-weight: bold;
|
||||
color: #950B02;
|
||||
}
|
||||
|
||||
.yes-def {
|
||||
text-indent: -1000px;
|
||||
}
|
||||
|
||||
.type-signature {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
.name, .signature {
|
||||
font-family: Consolas, Monaco, 'Andale Mono', monospace;
|
||||
}
|
||||
|
||||
.details { margin-top: 14px; border-left: 2px solid #DDD; }
|
||||
.details dt { width: 120px; float: left; padding-left: 10px; padding-top: 6px; }
|
||||
.details dd { margin-left: 70px; }
|
||||
.details ul { margin: 0; }
|
||||
.details ul { list-style-type: none; }
|
||||
.details li { margin-left: 30px; padding-top: 6px; }
|
||||
.details pre.prettyprint { margin: 0 }
|
||||
.details .object-value { padding-top: 0; }
|
||||
|
||||
.description {
|
||||
margin-bottom: 1em;
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.code-caption
|
||||
{
|
||||
font-style: italic;
|
||||
font-size: 107%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.prettyprint
|
||||
{
|
||||
border: 1px solid #ddd;
|
||||
width: 80%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.prettyprint.source {
|
||||
width: inherit;
|
||||
}
|
||||
|
||||
.prettyprint code
|
||||
{
|
||||
font-size: 100%;
|
||||
line-height: 18px;
|
||||
display: block;
|
||||
padding: 4px 12px;
|
||||
margin: 0;
|
||||
background-color: #fff;
|
||||
color: #4D4E53;
|
||||
}
|
||||
|
||||
.prettyprint code span.line
|
||||
{
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.prettyprint.linenums
|
||||
{
|
||||
padding-left: 70px;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.prettyprint.linenums ol
|
||||
{
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.prettyprint.linenums li
|
||||
{
|
||||
border-left: 3px #ddd solid;
|
||||
}
|
||||
|
||||
.prettyprint.linenums li.selected,
|
||||
.prettyprint.linenums li.selected *
|
||||
{
|
||||
background-color: lightyellow;
|
||||
}
|
||||
|
||||
.prettyprint.linenums li *
|
||||
{
|
||||
-webkit-user-select: text;
|
||||
-moz-user-select: text;
|
||||
-ms-user-select: text;
|
||||
user-select: text;
|
||||
}
|
||||
|
||||
.params .name, .props .name, .name code {
|
||||
color: #4D4E53;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', monospace;
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
.params td.description > p:first-child,
|
||||
.props td.description > p:first-child
|
||||
{
|
||||
margin-top: 0;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.params td.description > p:last-child,
|
||||
.props td.description > p:last-child
|
||||
{
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.disabled {
|
||||
color: #454545;
|
||||
}
|
@ -1,111 +0,0 @@
|
||||
/* JSDoc prettify.js theme */
|
||||
|
||||
/* plain text */
|
||||
.pln {
|
||||
color: #000000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* string content */
|
||||
.str {
|
||||
color: #006400;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* a keyword */
|
||||
.kwd {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* a comment */
|
||||
.com {
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* a type name */
|
||||
.typ {
|
||||
color: #000000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* a literal value */
|
||||
.lit {
|
||||
color: #006400;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* punctuation */
|
||||
.pun {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* lisp open bracket */
|
||||
.opn {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* lisp close bracket */
|
||||
.clo {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* a markup tag name */
|
||||
.tag {
|
||||
color: #006400;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* a markup attribute name */
|
||||
.atn {
|
||||
color: #006400;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* a markup attribute value */
|
||||
.atv {
|
||||
color: #006400;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* a declaration */
|
||||
.dec {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* a variable name */
|
||||
.var {
|
||||
color: #000000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* a function name */
|
||||
.fun {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* Specify class=linenums on a pre to get line numbering */
|
||||
ol.linenums {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user