Skip to content

Commit

Permalink
only change speed and reverse if motor is on
Browse files Browse the repository at this point in the history
  • Loading branch information
lastmjs committed Feb 16, 2017
1 parent 846ffa0 commit 23ac54d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bower.json
@@ -1,6 +1,6 @@
{
"name": "jfive-web-components",
"version": "0.0.7",
"version": "0.0.8",
"description": "Web components for controlling hardware with the Johnny-Five JavaScript Robotics & IoT platform.",
"authors": [
"Jordan Last <jordan.michael.last@gmail.com>"
Expand Down
10 changes: 7 additions & 3 deletions jfive-motor.html
Expand Up @@ -61,7 +61,7 @@
catch(error) {
console.log(error);
}

this.onChanged();
}

Expand All @@ -78,11 +78,15 @@
}

speedChanged() {
this.refreshMotor();
if (this.on) {
this.refreshMotor();
}
}

reverseChanged() {
this.refreshMotor();
if (this.on) {
this.refreshMotor();
}
}

refreshMotor() {
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "jfive-web-components",
"version": "0.0.7",
"version": "0.0.8",
"description": "Web components for controlling hardware with the Johnny-Five JavaScript Robotics & IoT platform.",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down

0 comments on commit 23ac54d

Please sign in to comment.