Bumped package
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Nathan Kellenicki 2020-05-24 15:54:12 -07:00
parent 6decc7139b
commit bce589a751
9 changed files with 9 additions and 11 deletions

View File

@ -660,7 +660,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_absolutemotor.js.html">devices/absolutemotor.js</a>, <a href="devices_absolutemotor.js.html">devices/absolutemotor.js</a>,
<a href="devices_absolutemotor.js.html#sunlight-1-line-108">line 108</a> <a href="devices_absolutemotor.js.html#sunlight-1-line-106">line 106</a>
</li> </li>
</ul> </ul>
</dd> </dd>

View File

@ -687,7 +687,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_absolutemotor.js.html">devices/absolutemotor.js</a>, <a href="devices_absolutemotor.js.html">devices/absolutemotor.js</a>,
<a href="devices_absolutemotor.js.html#sunlight-1-line-108">line 108</a> <a href="devices_absolutemotor.js.html#sunlight-1-line-106">line 106</a>
</li> </li>
</ul> </ul>
</dd> </dd>

View File

@ -687,7 +687,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_absolutemotor.js.html">devices/absolutemotor.js</a>, <a href="devices_absolutemotor.js.html">devices/absolutemotor.js</a>,
<a href="devices_absolutemotor.js.html#sunlight-1-line-108">line 108</a> <a href="devices_absolutemotor.js.html#sunlight-1-line-106">line 106</a>
</li> </li>
</ul> </ul>
</dd> </dd>

View File

@ -687,7 +687,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_absolutemotor.js.html">devices/absolutemotor.js</a>, <a href="devices_absolutemotor.js.html">devices/absolutemotor.js</a>,
<a href="devices_absolutemotor.js.html#sunlight-1-line-108">line 108</a> <a href="devices_absolutemotor.js.html#sunlight-1-line-106">line 106</a>
</li> </li>
</ul> </ul>
</dd> </dd>

View File

@ -687,7 +687,7 @@
<ul class="dummy"> <ul class="dummy">
<li> <li>
<a href="devices_absolutemotor.js.html">devices/absolutemotor.js</a>, <a href="devices_absolutemotor.js.html">devices/absolutemotor.js</a>,
<a href="devices_absolutemotor.js.html#sunlight-1-line-108">line 108</a> <a href="devices_absolutemotor.js.html#sunlight-1-line-106">line 106</a>
</li> </li>
</ul> </ul>
</dd> </dd>

View File

@ -163,9 +163,7 @@ class AbsoluteMotor extends tachomotor_1.TachoMotor {
return new Promise((resolve) => { return new Promise((resolve) => {
const oldMode = this.mode; const oldMode = this.mode;
let calibrated = false; let calibrated = false;
this.requestUpdate();
this.on("absolute", async ({ angle }) => { this.on("absolute", async ({ angle }) => {
console.log(angle);
if (!calibrated) { if (!calibrated) {
calibrated = true; calibrated = true;
if (angle &lt; 0) { if (angle &lt; 0) {
@ -174,7 +172,6 @@ class AbsoluteMotor extends tachomotor_1.TachoMotor {
else { else {
speed = -speed; speed = -speed;
} }
console.log(angle, speed);
await this.rotateByDegrees(angle, speed); await this.rotateByDegrees(angle, speed);
if (oldMode) { if (oldMode) {
this.subscribe(oldMode); this.subscribe(oldMode);
@ -182,6 +179,7 @@ class AbsoluteMotor extends tachomotor_1.TachoMotor {
return resolve(); return resolve();
} }
}); });
this.requestUpdate();
}); });
} }
/** /**

File diff suppressed because one or more lines are too long

2
package-lock.json generated
View File

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

View File

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