File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 62
62
63
63
< script type ="text/x-red " data-template-name ="arduino out ">
64
64
< div class = "form-row" >
65
- < label for = "node-input-arduino" > < i class = "fa fa-tasks" > </ i > < span data-i18n = "arduino.label.arduino" > </ span > </ label >
65
+ < label for = "node-input-arduino" > < i class = "fa fa-tasks" > </ i > Arduino </ label >
66
66
< input type = "text" id = "node-input-arduino" >
67
67
</ div >
68
68
< div class = "form-row" >
Original file line number Diff line number Diff line change @@ -68,10 +68,10 @@ module.exports = function(RED) {
68
68
this . arduino = n . arduino ;
69
69
this . serverConfig = RED . nodes . getNode ( this . arduino ) ;
70
70
this . running = false ;
71
+ var node = this ;
71
72
if ( typeof this . serverConfig === "object" ) {
72
73
var startup = function ( ) {
73
- this . board = this . serverConfig . board ;
74
- var node = this ;
74
+ node . board = node . serverConfig . board ;
75
75
node . oldval = "" ;
76
76
node . status ( { fill :"grey" , shape :"ring" , text :"node-red:common.status.connecting" } ) ;
77
77
var doit = function ( ) {
@@ -119,12 +119,12 @@ module.exports = function(RED) {
119
119
}
120
120
if ( node . board . isReady ) { doit ( ) ; }
121
121
else { node . board . once ( "ready" , function ( ) { doit ( ) ; } ) ; }
122
- setTimeout ( function ( ) { if ( ! node . running ) { startup ( ) ; } } , 4500 ) ;
122
+ setTimeout ( function ( ) { if ( node . running === false ) { startup ( ) ; } } , 4500 ) ;
123
123
}
124
124
startup ( ) ;
125
125
}
126
126
else {
127
- this . warn ( RED . _ ( "arduino.errors.portnotconf" ) ) ;
127
+ node . warn ( RED . _ ( "arduino.errors.portnotconf" ) ) ;
128
128
}
129
129
node . on ( 'close' , function ( ) {
130
130
node . running = false ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " node-red-node-arduino" ,
3
- "version" : " 0.2.1 " ,
3
+ "version" : " 0.2.2 " ,
4
4
"description" : " A Node-RED node to talk to an Arduino running firmata" ,
5
5
"dependencies" : {
6
6
"firmata" : " ^2.0.0"
You can’t perform that action at this time.
0 commit comments