Bumped package
This commit is contained in:
parent
6decc7139b
commit
bce589a751
@ -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>
|
||||||
|
@ -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>
|
||||||
|
@ -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>
|
||||||
|
@ -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>
|
||||||
|
@ -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>
|
||||||
|
@ -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 < 0) {
|
if (angle < 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
2
package-lock.json
generated
@ -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": {
|
||||||
|
@ -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",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user