Fixed Docs and examples

This commit is contained in:
Nathan Kunicki 2018-08-16 15:31:53 +01:00
parent 6c59169bed
commit 6bcb0f3d20
8 changed files with 21 additions and 21 deletions

View File

@ -35,8 +35,8 @@ While most Powered UP components and Hubs are compatible with each other, there
| WeDo 2.0 Medium Motor | Motor | Yes | Yes | Yes | <a href="https://brickset.com/sets/45300-1/">45300</a><br /> <a href="https://brickset.com/sets/76112-1/">76112</a> |
| Boost Color and Distance Sensor | Sensor | *Partial* | Yes | Yes | <a href="https://brickset.com/sets/17101-1/">17101</a> |
| Boost Tacho Motor | Motor/Sensor | *Partial* | Yes | *Partial* | <a href="https://brickset.com/sets/17101-1/">17101</a> |
| Powered Up Train Motor | Motor | Yes | Yes | Yes | <a href="https://brickset.com/sets/60197-1/">60197</a><br /><a href="https://brickset.com/sets/60198-1/">60198</a> |
| Powered Up LED Lights | Light | Yes | Yes | Yes | <a href="https://brickset.com/sets/88005-1/">88005</a> |
| Powered UP Train Motor | Motor | Yes | Yes | Yes | <a href="https://brickset.com/sets/60197-1/">60197</a><br /><a href="https://brickset.com/sets/60198-1/">60198</a> |
| Powered UP LED Lights | Light | Yes | Yes | Yes | <a href="https://brickset.com/sets/88005-1/">88005</a> |
### Known Issues and Limitations

View File

@ -754,7 +754,7 @@ Emits when an attached motor or sensor is detached from the Hub.
<a name="new_PUPHub_new"></a>
### new PUPHub()
The PUPHub is emitted if the discovered device is a Powered Up Hub.
The PUPHub is emitted if the discovered device is a Powered UP Hub.
<a name="LPF2Hub+current"></a>
@ -1044,7 +1044,7 @@ Emits when an attached motor or sensor is detached from the Hub.
<a name="new_PUPRemote_new"></a>
### new PUPRemote()
The PUPRemote is emitted if the discovered device is a Powered Up Remote.
The PUPRemote is emitted if the discovered device is a Powered UP Remote.
<a name="LPF2Hub+current"></a>

View File

@ -35,8 +35,8 @@ While most Powered UP components and Hubs are compatible with each other, there
| WeDo 2.0 Medium Motor | Motor | Yes | Yes | Yes | <a href="https://brickset.com/sets/45300-1/">45300</a><br /> <a href="https://brickset.com/sets/76112-1/">76112</a> |
| Boost Color and Distance Sensor | Sensor | *Partial* | Yes | Yes | <a href="https://brickset.com/sets/17101-1/">17101</a> |
| Boost Tacho Motor | Motor/Sensor | *Partial* | Yes | *Partial* | <a href="https://brickset.com/sets/17101-1/">17101</a> |
| Powered Up Train Motor | Motor | Yes | Yes | Yes | <a href="https://brickset.com/sets/60197-1/">60197</a><br /><a href="https://brickset.com/sets/60198-1/">60198</a> |
| Powered Up LED Lights | Light | Yes | Yes | Yes | <a href="https://brickset.com/sets/88005-1/">88005</a> |
| Powered UP Train Motor | Motor | Yes | Yes | Yes | <a href="https://brickset.com/sets/60197-1/">60197</a><br /><a href="https://brickset.com/sets/60198-1/">60198</a> |
| Powered UP LED Lights | Light | Yes | Yes | Yes | <a href="https://brickset.com/sets/88005-1/">88005</a> |
### Known Issues and Limitations
@ -833,7 +833,7 @@ Emits when an attached motor or sensor is detached from the Hub.
<a name="new_PUPHub_new"></a>
### new PUPHub()
The PUPHub is emitted if the discovered device is a Powered Up Hub.
The PUPHub is emitted if the discovered device is a Powered UP Hub.
<a name="LPF2Hub+current"></a>
@ -1123,7 +1123,7 @@ Emits when an attached motor or sensor is detached from the Hub.
<a name="new_PUPRemote_new"></a>
### new PUPRemote()
The PUPRemote is emitted if the discovered device is a Powered Up Remote.
The PUPRemote is emitted if the discovered device is a Powered UP Remote.
<a name="LPF2Hub+current"></a>

View File

@ -1,6 +1,6 @@
/*
*
* This example allows you to connect your Batmobile and a Powered Up Remote Control to your laptop, and enables the control of the Batmobile with the Remote.
* This example allows you to connect your Batmobile and a Powered UP Remote Control to your laptop, and enables the control of the Batmobile with the Remote.
*
*/
@ -81,7 +81,7 @@ poweredUP.on("discover", async (hub) => { // Wait to Batmobile and Remote
})
await remote.connect();
console.log("Connected to Powered Up Remote!");
console.log("Connected to Powered UP Remote!");
}
if (batmobile && remote) {

View File

@ -1,6 +1,6 @@
/*
*
* This example allows you to connect Vernie and a Powered Up Remote Control to your laptop, and enables the control of Vernie with the Remote.
* This example allows you to connect Vernie and a Powered UP Remote Control to your laptop, and enables the control of Vernie with the Remote.
*
*/
@ -63,7 +63,7 @@ poweredUP.on("discover", async (hub) => { // Wait to discover Vernie and Remote
})
await remote.connect();
console.log("Connected to Powered Up Remote!");
console.log("Connected to Powered UP Remote!");
}
if (vernie && remote) {

View File

@ -1,6 +1,6 @@
{
"name": "node-poweredup",
"version": "1.1.0",
"version": "1.1.1",
"description": "A Node.js module to interface with LEGO Powered UP components.",
"homepage": "https://github.com/nathankellenicki/node-poweredup/",
"main": "dist/poweredup.js",

View File

@ -11,7 +11,7 @@ const debug = Debug("puphub");
/**
* The PUPHub is emitted if the discovered device is a Powered Up Hub.
* The PUPHub is emitted if the discovered device is a Powered UP Hub.
* @class PUPHub
* @extends LPF2Hub
* @extends Hub
@ -19,7 +19,7 @@ const debug = Debug("puphub");
export class PUPHub extends LPF2Hub {
// We set JSDoc to ignore these events as a Powered Up Remote will never emit them.
// We set JSDoc to ignore these events as a Powered UP Remote will never emit them.
/**
* @event PUPHub#rotate
@ -40,13 +40,13 @@ export class PUPHub extends LPF2Hub {
"B": new Port("B", 1),
"AB": new Port("AB", 57)
};
debug("Discovered Powered Up Hub");
debug("Discovered Powered UP Hub");
}
public connect () {
return new Promise(async (resolve, reject) => {
debug("Connecting to Powered Up Hub");
debug("Connecting to Powered UP Hub");
await super.connect();
debug("Connect completed");
return resolve();

View File

@ -10,7 +10,7 @@ const debug = Debug("pupremote");
/**
* The PUPRemote is emitted if the discovered device is a Powered Up Remote.
* The PUPRemote is emitted if the discovered device is a Powered UP Remote.
* @class PUPRemote
* @extends LPF2Hub
* @extends Hub
@ -18,7 +18,7 @@ const debug = Debug("pupremote");
export class PUPRemote extends LPF2Hub {
// We set JSDoc to ignore these events as a Powered Up Remote will never emit them.
// We set JSDoc to ignore these events as a Powered UP Remote will never emit them.
/**
* @event PUPRemote#distance
@ -63,13 +63,13 @@ export class PUPRemote extends LPF2Hub {
"LEFT": new Port("LEFT", 0),
"RIGHT": new Port("RIGHT", 1)
};
debug("Discovered Powered Up Remote");
debug("Discovered Powered UP Remote");
}
public connect () {
return new Promise(async (resolve, reject) => {
debug("Connecting to Powered Up Remote");
debug("Connecting to Powered UP Remote");
await super.connect();
debug("Connect completed");
return resolve();