File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -270,8 +270,10 @@ const Comms = {
270
270
console . log ( `<COMMS> Upload ${ f . name } => ${ JSON . stringify ( f . content . length > 50 ? f . content . substr ( 0 , 50 ) + "..." : f . content ) } (${ f . content . length } b${ uploadPacket ?", binary" :"" } )` ) ;
271
271
if ( uploadPacket ) {
272
272
Comms . getConnection ( ) . espruinoSendFile ( f . name , f . content , {
273
- fs :Const . FILES_IN_FS ,
274
- progress :( chunkNo , chunkCount ) => { Progress . show ( { percent : chunkNo * 100 / chunkCount } ) ; }
273
+ fs : Const . FILES_IN_FS ,
274
+ chunkSize : Const . PACKET_UPLOAD_CHUNKSIZE ,
275
+ noACK : Const . PACKET_UPLOAD_NOACK ,
276
+ progress : ( chunkNo , chunkCount ) => { Progress . show ( { percent : chunkNo * 100 / chunkCount } ) ; }
275
277
} ) . then ( doUploadFiles ) ; // progress?
276
278
} else {
277
279
Comms . uploadCommandList ( f . cmd , currentBytes , maxBytes ) . then ( doUploadFiles ) ;
Original file line number Diff line number Diff line change @@ -38,6 +38,12 @@ const Const = {
38
38
/* How many bytes of code to we attempt to upload in one go? */
39
39
UPLOAD_CHUNKSIZE : 1024 ,
40
40
41
+ /* How many bytes of code to we attempt to upload when uploading via packets? */
42
+ PACKET_UPLOAD_CHUNKSIZE : 2048 , // 1024 is the default for UART.js
43
+
44
+ /* when uploading by packets should we wait for an ack before sending the next packet? Only works if you're fully confident in flow control. */
45
+ PACKET_UPLOAD_NOACK : false ,
46
+
41
47
/* Don't try and reset the device when we're connecting/sending apps */
42
48
NO_RESET : false ,
43
49
You can’t perform that action at this time.
0 commit comments