@@ -284,83 +284,6 @@ export const loadInto = async (
284284 }
285285 } ) ( ) ;
286286 }
287- // else {
288- // // Send the compile submission via an HTTP post
289- // if (clientService.version.isCoded) {
290- // // Request load with options from BlocklyProp Client
291- // $.post(clientService.url('load.action'), {
292- // 'option': loadOption,
293- // 'action': loadAction,
294- // 'binary': data.binary,
295- // 'extension': data.extension,
296- // 'comport': getComPort(),
297- // }, function(loadData) {
298- // // Callback to report results from client/launcher command
299- // logConsoleMessage(
300- // `(LOAI) Processing compiler results from server: ` +
301- // `${loadData.message}`);
302- // // Replace response message's consecutive white space with a
303- // // new-line, then split at new lines
304- // const message =
305- // loadData.message.replace(/\s{2,}/g, '\n').split('\n');
306- // // If responses have codes, check for all success codes (< 100)
307- // let success = true;
308- // const coded =
309- // (loadOption === 'CODE' || loadOption === 'CODE_VERBOSE');
310- // if (coded) {
311- // message.forEach(function(x) {
312- // success = success && x.substr(0, 3) < 100;
313- // });
314- // }
315- // // Display results
316- // let result;
317- // if (success && coded) {
318- // // Success! Keep it simple
319- // result = ' Succeeded.';
320- // } else {
321- // // Failed (or not coded); Show the details
322- // const error = [];
323- // message.forEach(function(x) {
324- // error.push(x.substr((coded) ? 4 : 0));
325- // });
326- // result = ((coded) ? ' Failed!' : '') +
327- // '\n\n-------- loader messages --------\n' + error.join('\n');
328- // }
329- //
330- // $('#compile-console').val($('#compile-console').val() + result);
331- //
332- // // Scroll automatically to the bottom after new data is added
333- // document.getElementById('compile-console').scrollTop =
334- // document.getElementById('compile-console').scrollHeight;
335- // if (terminalNeeded === 'term' && loadData.success) {
336- // serialConsole();
337- // } else if (terminalNeeded === 'graph' && loadData.success) {
338- // graphingConsole();
339- // }
340- // });// end of .post()
341- // } else {
342- // // TODO: Remove this once client_min_version is >= minCodedVer
343- // // Request load without options from old BlocklyProp Client
344- // $.post(clientService.url('load.action'), {
345- // 'action': loadAction,
346- // 'binary': data.binary,
347- // 'extension': data.extension,
348- // 'comport': getComPort(),
349- // }, function(loadData) {
350- // $('#compile-console').val($('#compile-console').val() +
351- // loadData.message);
352- //
353- // // Scroll automatically to the bottom after new data is added
354- // document.getElementById('compile-console').scrollTop =
355- // document.getElementById('compile-console').scrollHeight;
356- // if (terminalNeeded === 'term' && loadData.success) {
357- // serialConsole();
358- // } else if (terminalNeeded === 'graph' && loadData.success) {
359- // graphingConsole();
360- // }
361- // });
362- // }
363- // }
364287 } ) ;
365288 } catch ( e ) {
366289 logConsoleMessage ( `Catching : ${ e . message } ` ) ;
@@ -433,56 +356,6 @@ export function graphingConsole() {
433356 graph . update ( graph_data , graph_options ) ;
434357 }
435358
436- // if (clientService.type === serviceConnectionTypes.HTTP &&
437- // clientService.portsAvailable) {
438- // // Container and flag needed to receive and parse initial connection
439- // // string before serial data begins streaming in.
440- // let connString = '';
441- // let connStrYet = false;
442- // const connection = new WebSocket(
443- // clientService.url('serial.connect', 'ws'));
444- //
445- // // When the connection is open, open com port
446- // connection.onopen = function() {
447- // const baudRate = clientService.terminalBaudRate > 0 ?
448- // ` ${clientService.terminalBaudRate}`: '';
449- // connection.send(`+++ open port ${getComPort()} ${baudRate}`);
450- //
451- // graphStartStop('start');
452- // };
453- //
454- // // Log errors
455- // connection.onerror = function(error) {
456- // logConsoleMessage('WebSocket Error');
457- // logConsoleMessage(error.message);
458- // };
459- //
460- // connection.onmessage = function(e) {
461- // const charBuffer = atob(e.data);
462- // if (connStrYet) {
463- // graphNewData(charBuffer);
464- // } else {
465- // connString += charBuffer;
466- // if (connString.indexOf(
467- // clientService.terminalBaudRate.toString(10)) > -1) {
468- // connStrYet = true;
469- // displayTerminalConnectionStatus(connString.trim());
470- // } else {
471- // graphNewData(charBuffer);
472- // }
473- // }
474- // };
475- //
476- // $('#graphing-dialog').on('hidden.bs.modal', function() {
477- // clientService.sendCharacterStreamTo = null;
478- // connection.close();
479- // graphStartStop('stop');
480- // connString = '';
481- // connStrYet = false;
482- // displayTerminalConnectionStatus(null);
483- // });
484- // } else
485-
486359 if ( clientService . type === serviceConnectionTypes . WS &&
487360 clientService . portsAvailable ) {
488361 const messageToSend = {
0 commit comments