@@ -35,14 +35,14 @@ export class UploaderFactory {
3535
3636 public pickUploader ( specification : TestbedSpecification , args : string [ ] = [ ] ) : Uploader {
3737 switch ( specification . type ) {
38- case PlatformType . arduino :
39- return new ArduinoUploader ( this . arduino , args , specification . options as SerialOptions ) ;
40- case PlatformType . emulator :
41- case PlatformType . emu2emu :
42- case PlatformType . emuproxy :
43- return new EmulatorUploader ( this . emulator , args , specification . options as SubprocessOptions ) ;
44- case PlatformType . debug :
45- return new EmulatorConnector ( specification . options as SubprocessOptions )
38+ case PlatformType . arduino :
39+ return new ArduinoUploader ( this . arduino , args , specification . options as SerialOptions ) ;
40+ case PlatformType . emulator :
41+ case PlatformType . emu2emu :
42+ case PlatformType . emuproxy :
43+ return new EmulatorUploader ( this . emulator , args , specification . options as SubprocessOptions ) ;
44+ case PlatformType . debug :
45+ return new EmulatorConnector ( specification . options as SubprocessOptions )
4646 }
4747 throw new Error ( 'Unsupported platform type' ) ;
4848 }
@@ -84,7 +84,7 @@ export class EmulatorConnector extends Uploader {
8484 private connectSocket ( program : string , listener ?: ( chunk : any ) => void ) : Promise < SubProcess > {
8585 const that = this ;
8686
87- return new Promise ( function ( resolve , reject ) {
87+ return new Promise ( function ( resolve , _reject ) {
8888 const client = new net . Socket ( ) ;
8989 client . connect ( that . port , ( ) => {
9090 that . emit ( UploaderEvents . connected ) ;
@@ -130,6 +130,7 @@ export class EmulatorUploader extends Uploader {
130130 that . emit ( UploaderEvents . started ) ;
131131
132132 while ( process . stdout === undefined ) {
133+ // wait for stdout to become available
133134 }
134135
135136 if ( isReadable ( process . stdout ) ) {
@@ -180,7 +181,7 @@ export class ArduinoUploader extends Uploader {
180181 private readonly fqbn : string ;
181182 private readonly options : SerialPortOpenOptions < any > ;
182183
183- constructor ( sdkpath : string , args : string [ ] = [ ] , options : SerialOptions ) {
184+ constructor ( sdkpath : string , _args : string [ ] = [ ] , options : SerialOptions ) {
184185 super ( ) ;
185186 this . sdkpath = sdkpath ;
186187 this . fqbn = options . fqbn ;
0 commit comments