File tree 2 files changed +3
-6
lines changed
2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " arduino-create-agent-js-client" ,
3
- "version" : " 2.13 .0" ,
3
+ "version" : " 2.14 .0" ,
4
4
"description" : " JS module providing discovery of the Arduino Create Plugin and communication with it" ,
5
5
"main" : " lib/index.js" ,
6
6
"module" : " es/index.js" ,
Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ import V2 from './socket-daemon.v2';
31
31
// Required agent version
32
32
const browser = detect ( ) ;
33
33
const POLLING_INTERVAL = 3500 ;
34
- const UPLOAD_DONE_TIMER = 5000 ;
35
34
36
35
const PROTOCOL = {
37
36
HTTP : 'http' ,
@@ -383,10 +382,8 @@ export default class SocketDaemon extends Daemon {
383
382
}
384
383
385
384
handleUploadMessage ( message ) {
386
- if ( message . Flash === 'Ok' && message . ProgrammerStatus === 'Done' ) {
387
- // After the upload is completed the port goes down for a while, so we have to wait a few seconds
388
- return timer ( UPLOAD_DONE_TIMER ) . subscribe ( ( ) => this . uploading . next ( { status : this . UPLOAD_DONE , msg : message . Flash } ) ) ;
389
- }
385
+ if ( message . Flash === 'Ok' && message . ProgrammerStatus === 'Done' ) return this . uploading . next ( { status : this . UPLOAD_DONE , msg : message . Flash } ) ;
386
+
390
387
switch ( message . ProgrammerStatus ) {
391
388
case 'Starting' :
392
389
this . uploading . next ( { status : this . UPLOAD_IN_PROGRESS , msg : `Programming with: ${ message . Cmd } ` } ) ;
You can’t perform that action at this time.
0 commit comments