Skip to content

Commit

Permalink
Keep relays off while testing connections. Prep 0.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
cwilling committed Aug 30, 2017
1 parent f209fb4 commit b4ab479
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ TEST_FILES = test-status.js \

DESTDIR ?=

PKGVERSION ?= 0.3.1
PKGVERSION ?= 0.3.2

# Where any app files are installed
RUNDIR = /usr/share/brewable
Expand Down
2 changes: 1 addition & 1 deletion makeself.make
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
NODEEXE=$(which node)
BREWTEMPDIR=`mktemp -d /tmp/brewtemp.XXXXXX` || exit 1
TARGET=$(pwd)/brewable
VERSION=0.3.1
VERSION=0.3.2

echo './node brewableserverbundle.js "$@"' > $BREWTEMPDIR/run.sh
chmod a+x $BREWTEMPDIR/run.sh
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"clean": "rm -r build/*"
},
"name": "brewable",
"version": "0.3.1",
"version": "0.3.2",
"description": "Nodejs version of brewable",
"main": "src/scripts/brewable.js",
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/modules/sainsmartrelay.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function Relay () {
for (var i=0;i<PossibleRelayPins.length;i++) {
rpio.close(PossibleRelayPins[i]);
//console.log("Pins: " + PossibleRelayPins[i]);
rpio.open(PossibleRelayPins[i], rpio.OUTPUT, rpio.LOW);
rpio.open(PossibleRelayPins[i], rpio.OUTPUT, RELAY_OFF);
}
for (i=0;i<PossibleRelayPins.length;i++) {
rpio.mode(PossibleRelayPins[i], rpio.INPUT);
Expand Down
31 changes: 31 additions & 0 deletions test-status.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,37 @@ console.log("options: " + JSON.stringify(options));
if ("port" in options) options.port = parseInt(options.port);
console.log("options: " + JSON.stringify(options));

class Rectangle {
constructor(height, width) {
this.height = height;
this.width = width;
}

get area() {
return this.height * this.width;
}

speak() {
console.log("I am not an animal");
}
}

var square = new Rectangle(10,10);
console.log("Area = " + square.area);

class Dog extends Rectangle {
constructor (w,h) {
super(w,h);
}
speak() {
super.speak();
console.log("Woof " + this.area);
}
}
var d = new Dog(5,5);
d.speak();


process.exit();

/* Physical numbering */
Expand Down

0 comments on commit b4ab479

Please sign in to comment.