@@ -2554,14 +2554,14 @@ if (typeof exports !== 'undefined') {
25542554 if ( hasProcess ( ) ) {
25552555 debugStr = process . env [ DEBUG_STR ] ;
25562556 }
2557-
2557+
25582558 if ( debugStr ) {
25592559 debugKeys = debugStr . split ( ',' ) . map ( function ( val ) {
25602560 return val . trim ( ) ;
25612561 } ) ;
25622562 }
25632563
2564- if ( debugKeys . indexOf ( '*' ) !== - 1 || debugKeys . indexOf ( this . _key ) !== - 1 ) {
2564+ if ( debugStr && ( debugKeys . indexOf ( '*' ) !== - 1 || debugKeys . indexOf ( this . _key ) !== - 1 ) ) {
25652565 return true ;
25662566 }
25672567
@@ -4036,6 +4036,7 @@ if (typeof exports !== 'undefined') {
40364036 STRING_MESSAGE : 'stringMessage' ,
40374037 SYSEX_MESSAGE : 'sysexMessage' ,
40384038 PIN_STATE_RESPONSE : 'pinStateResponse' ,
4039+ BEFOREREADY : 'beforeReady' ,
40394040 READY : 'ready' ,
40404041 ERROR : 'error' ,
40414042 BEFOREDISCONNECT : 'beforeDisconnect' ,
@@ -4133,6 +4134,7 @@ if (typeof exports !== 'undefined') {
41334134 }
41344135
41354136 function onOpen ( ) {
4137+ this . _logger . info ( 'onOpen' , 'Device online' ) ;
41364138 this . begin ( ) ;
41374139 }
41384140
@@ -4367,6 +4369,7 @@ if (typeof exports !== 'undefined') {
43674369 break ;
43684370 case ANALOG_MAPPING_RESPONSE :
43694371 this . processAnalogMappingResponse ( sysexData ) ;
4372+ this . emit ( BoardEvent . BEFOREREADY ) ;
43704373 break ;
43714374 default :
43724375 this . emit ( BoardEvent . SYSEX_MESSAGE , {
@@ -4477,6 +4480,7 @@ if (typeof exports !== 'undefined') {
44774480 } ;
44784481
44794482 proto . startup = function ( ) {
4483+ this . _logger . info ( 'startup' , 'Board Ready' ) ;
44804484 this . _isReady = true ;
44814485 this . emit ( BoardEvent . READY , this ) ;
44824486 } ;
@@ -4589,10 +4593,12 @@ if (typeof exports !== 'undefined') {
45894593 } ;
45904594
45914595 proto . queryCapabilities = function ( ) {
4596+ this . _logger . info ( 'queryCapabilities' ) ;
45924597 this . send ( [ START_SYSEX , CAPABILITY_QUERY , END_SYSEX ] ) ;
45934598 } ;
45944599
45954600 proto . queryAnalogMapping = function ( ) {
4601+ this . _logger . info ( 'queryAnalogMapping' ) ;
45964602 this . send ( [ START_SYSEX , ANALOG_MAPPING_QUERY , END_SYSEX ] ) ;
45974603 } ;
45984604
@@ -4625,10 +4631,12 @@ if (typeof exports !== 'undefined') {
46254631 } ;
46264632
46274633 proto . reportFirmware = function ( ) {
4634+ this . _logger . info ( 'reportFirmware' ) ;
46284635 this . send ( [ START_SYSEX , REPORT_FIRMWARE , END_SYSEX ] ) ;
46294636 } ;
46304637
46314638 proto . enableDigitalPins = function ( ) {
4639+ this . _logger . info ( 'enableDigitalPins' ) ;
46324640 for ( var i = 0 ; i < this . _numPorts ; i ++ ) {
46334641 this . sendDigitalPortReporting ( i , Pin . ON ) ;
46344642 }
0 commit comments