File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ var drawPt = {x: 0, y: 0};
2323
2424// Actually try to init the connection and handle the various callbacks
2525cncserver . start ( {
26+ localRunner : true ,
2627 success : function ( ) {
2728 console . log ( 'Port found, connecting...' ) ;
2829 } ,
@@ -37,14 +38,14 @@ cncserver.start({
3738 } ) ;
3839 } ,
3940 disconnect : function ( ) {
40- console . log ( "Bot disconnected!" )
41+ console . log ( "Bot disconnected!" ) ;
4142 }
4243} ) ;
4344
4445function startReading ( ) {
4546 serialPort = new SerialPort ( port , {
4647 baudrate : 9600 ,
47- parser : serialport . parsers . readline ( "\n" ) ,
48+ parser : SerialPort . parsers . readline ( "\n" ) ,
4849 disconnectedCallback : tryReconnect
4950 } ) ;
5051
@@ -137,15 +138,15 @@ function getWater(destPt) {
137138 cncserver . setHeight ( 'draw' , function ( ) {
138139 movingPen = false ;
139140 gettingWater = false ;
140- } )
141+ } ) ;
141142 } ) ;
142143 } ) ;
143144}
144145
145146
146147// Helper function for automatically connecting the littleBits leonardo
147148function connectLeonardo ( callback ) {
148- serialport . list ( function ( err , ports ) {
149+ SerialPort . list ( function ( err , ports ) {
149150 for ( var portID in ports ) {
150151 if ( ports [ portID ] . serialNumber === 'Arduino_LLC_Arduino_Leonardo' ) {
151152 port = ports [ portID ] . comName ;
You can’t perform that action at this time.
0 commit comments