@@ -4036,7 +4036,6 @@ if (typeof exports !== 'undefined') {
40364036 STRING_MESSAGE : 'stringMessage' ,
40374037 SYSEX_MESSAGE : 'sysexMessage' ,
40384038 PIN_STATE_RESPONSE : 'pinStateResponse' ,
4039- BEFOREREADY : 'beforeReady' ,
40404039 READY : 'ready' ,
40414040 ERROR : 'error' ,
40424041 BEFOREDISCONNECT : 'beforeDisconnect' ,
@@ -4271,7 +4270,7 @@ if (typeof exports !== 'undefined') {
42714270 switch ( command ) {
42724271 case DIGITAL_MESSAGE :
42734272 this . _logger . info ( 'processMultiByteCommand digital:' , channel , commandData [ 1 ] , commandData [ 2 ] ) ;
4274- this . processDigitalMessage ( channel , commandData [ 1 ] , commandData [ 2 ] ) ;
4273+ this . _options . handleDigitalPins && this . processDigitalMessage ( channel , commandData [ 1 ] , commandData [ 2 ] ) ;
42754274 break ;
42764275 case REPORT_VERSION :
42774276 this . _firmwareVersion = commandData [ 1 ] + commandData [ 2 ] / 10 ;
@@ -4363,7 +4362,6 @@ if (typeof exports !== 'undefined') {
43634362 break ;
43644363 case ANALOG_MAPPING_RESPONSE :
43654364 this . processAnalogMappingResponse ( sysexData ) ;
4366- this . emit ( BoardEvent . BEFOREREADY ) ;
43674365 break ;
43684366 default :
43694367 this . emit ( BoardEvent . SYSEX_MESSAGE , {
@@ -4468,7 +4466,14 @@ if (typeof exports !== 'undefined') {
44684466 }
44694467
44704468 if ( ! this . _isReady ) {
4471- this . enableDigitalPins ( ) ;
4469+ if ( this . _options . initialReset ) {
4470+ this . systemReset ( ) ;
4471+ }
4472+ if ( this . _options . handleDigitalPins ) {
4473+ this . enableDigitalPins ( ) ;
4474+ } else {
4475+ this . startup ( ) ;
4476+ }
44724477 }
44734478 } ;
44744479
@@ -4942,7 +4947,9 @@ if (typeof exports !== 'undefined') {
49424947 login : 'admin' ,
49434948 password : 'password' ,
49444949 autoReconnect : false ,
4945- multi : false
4950+ multi : false ,
4951+ initialReset : false ,
4952+ handleDigitalPins : true
49464953 } ;
49474954 }
49484955
@@ -5579,7 +5586,9 @@ chrome.bluetoothSocket = chrome.bluetoothSocket || (function (_api) {
55795586 login : 'admin' ,
55805587 password : 'password' ,
55815588 autoReconnect : false ,
5582- multi : false
5589+ multi : false ,
5590+ initialReset : false ,
5591+ handleDigitalPins : true
55835592 } ;
55845593 }
55855594
@@ -5600,6 +5609,7 @@ chrome.bluetoothSocket = chrome.bluetoothSocket || (function (_api) {
56005609 } ) ;
56015610
56025611 Smart . DEFAULT_SERVER = 'wss://ws.webduino.io:443' ;
5612+ Smart . SERVER_CHINA = 'wss://ws.webduino.com.cn' ;
56035613
56045614 scope . board . Smart = Smart ;
56055615} ) ) ;
@@ -5637,7 +5647,9 @@ chrome.bluetoothSocket = chrome.bluetoothSocket || (function (_api) {
56375647 login : 'admin' ,
56385648 password : 'password' ,
56395649 autoReconnect : false ,
5640- multi : false
5650+ multi : false ,
5651+ initialReset : false ,
5652+ handleDigitalPins : true
56415653 } ;
56425654 }
56435655
@@ -5658,6 +5670,7 @@ chrome.bluetoothSocket = chrome.bluetoothSocket || (function (_api) {
56585670 } ) ;
56595671
56605672 Bit . DEFAULT_SERVER = 'wss://ws.webduino.io:443' ;
5673+ Bit . SERVER_CHINA = 'wss://ws.webduino.com.cn' ;
56615674
56625675 proto . startup = function ( ) {
56635676 this . _isReady = true ;
0 commit comments