File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,10 @@ To add a new serial device, you must add an object to
5454 Espruino . Core . Status . incrementProgress ( diff ) ;
5555 }
5656 } } ;
57- function log ( level , str ) { if ( level < 3 ) console . log ( "serial:" , str ) ; }
57+
58+ // ---------------
59+ var logLevel = 2 ;
60+ function log ( level , str ) { if ( level <= logLevel ) console . log ( "serial:" , str ) ; }
5861 function ab2str ( buf ) { return String . fromCharCode . apply ( null , new Uint8Array ( buf ) ) ; }
5962 var parseRJSON = data => Espruino . Core . Utils . parseRJSON ( data ) ;
6063 // ---------------
@@ -840,6 +843,7 @@ To add a new serial device, you must add an object to
840843 "setBinary" : function ( isOn ) {
841844 sendingBinary = isOn ;
842845 } ,
843- "connection" : new Connection ( )
846+ "connection" : new Connection ( ) ,
847+ "debug" : function ( ) { logLevel = 3 ; } // output extra debug info
844848 } ;
845849} ) ( ) ;
You can’t perform that action at this time.
0 commit comments