File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 221
221
}
222
222
binary_state = 0 ;
223
223
break ;
224
+ case 31 :
225
+ // first (and last) response for GET_VER
226
+ console . log ( 'GET_VER' , data ) ;
227
+ binary_state = 0 ;
228
+ break ;
224
229
}
225
230
}
226
231
term . write ( event . data ) ;
300
305
ws . send ( rec ) ;
301
306
}
302
307
308
+ function get_ver ( ) {
309
+ // WEBREPL_REQ_S = "<2sBBQLH64s"
310
+ var rec = new Uint8Array ( 2 + 1 + 1 + 8 + 4 + 2 + 64 ) ;
311
+ rec [ 0 ] = 'W' . charCodeAt ( 0 ) ;
312
+ rec [ 1 ] = 'A' . charCodeAt ( 0 ) ;
313
+ rec [ 2 ] = 3 ; // GET_VER
314
+ // rest of "rec" is zero
315
+
316
+ // initiate GET_VER
317
+ binary_state = 31 ;
318
+ ws . send ( rec ) ;
319
+ }
320
+
303
321
function handle_put_file_select ( evt ) {
304
322
// The event holds a FileList object which is a list of File objects,
305
323
// but we only support single file selection at the moment.
You can’t perform that action at this time.
0 commit comments