File tree Expand file tree Collapse file tree 5 files changed +35
-4
lines changed
Expand file tree Collapse file tree 5 files changed +35
-4
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ TEST_FILES = test-status.js \
2626
2727DESTDIR ?=
2828
29- PKGVERSION ?= 0.3.1
29+ PKGVERSION ?= 0.3.2
3030
3131# Where any app files are installed
3232RUNDIR = /usr/share/brewable
Original file line number Diff line number Diff line change 33NODEEXE=$( which node)
44BREWTEMPDIR=` mktemp -d /tmp/brewtemp.XXXXXX` || exit 1
55TARGET=$( pwd) /brewable
6- VERSION=0.3.1
6+ VERSION=0.3.2
77
88echo ' ./node brewableserverbundle.js "$@"' > $BREWTEMPDIR /run.sh
99chmod a+x $BREWTEMPDIR /run.sh
Original file line number Diff line number Diff line change 88 "clean" : " rm -r build/*"
99 },
1010 "name" : " brewable" ,
11- "version" : " 0.3.1 " ,
11+ "version" : " 0.3.2 " ,
1212 "description" : " Nodejs version of brewable" ,
1313 "main" : " src/scripts/brewable.js" ,
1414 "devDependencies" : {
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ function Relay () {
5454 for ( var i = 0 ; i < PossibleRelayPins . length ; i ++ ) {
5555 rpio . close ( PossibleRelayPins [ i ] ) ;
5656 //console.log("Pins: " + PossibleRelayPins[i]);
57- rpio . open ( PossibleRelayPins [ i ] , rpio . OUTPUT , rpio . LOW ) ;
57+ rpio . open ( PossibleRelayPins [ i ] , rpio . OUTPUT , RELAY_OFF ) ;
5858 }
5959 for ( i = 0 ; i < PossibleRelayPins . length ; i ++ ) {
6060 rpio . mode ( PossibleRelayPins [ i ] , rpio . INPUT ) ;
Original file line number Diff line number Diff line change @@ -19,6 +19,37 @@ console.log("options: " + JSON.stringify(options));
1919if ( "port" in options ) options . port = parseInt ( options . port ) ;
2020console . log ( "options: " + JSON . stringify ( options ) ) ;
2121
22+ class Rectangle {
23+ constructor ( height , width ) {
24+ this . height = height ;
25+ this . width = width ;
26+ }
27+
28+ get area ( ) {
29+ return this . height * this . width ;
30+ }
31+
32+ speak ( ) {
33+ console . log ( "I am not an animal" ) ;
34+ }
35+ }
36+
37+ var square = new Rectangle ( 10 , 10 ) ;
38+ console . log ( "Area = " + square . area ) ;
39+
40+ class Dog extends Rectangle {
41+ constructor ( w , h ) {
42+ super ( w , h ) ;
43+ }
44+ speak ( ) {
45+ super . speak ( ) ;
46+ console . log ( "Woof " + this . area ) ;
47+ }
48+ }
49+ var d = new Dog ( 5 , 5 ) ;
50+ d . speak ( ) ;
51+
52+
2253process . exit ( ) ;
2354
2455/* Physical numbering */
You can’t perform that action at this time.
0 commit comments