From a8ed647a815f16afc20996b35cb0353f4bfdbdce Mon Sep 17 00:00:00 2001 From: Brad Nelson Date: Sun, 21 Feb 2021 01:00:57 -0800 Subject: [PATCH] Fix bug in arduino server. --- ueforth/arduino/arduino_server.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ueforth/arduino/arduino_server.fs b/ueforth/arduino/arduino_server.fs index 8a0c421..f37de8e 100644 --- a/ueforth/arduino/arduino_server.fs +++ b/ueforth/arduino/arduino_server.fs @@ -65,7 +65,7 @@ function httpPost(url, items, callback) { } function ask(cmd, callback) { httpPost('/input', - {cmd: cmd + '\\n'}, function(data) { + {cmd: cmd + '\n'}, function(data) { if (data !== null) { output.value += data; } output.scrollTop = output.scrollHeight; // Scroll to the bottom if (callback !== undefined) { callback(); } @@ -82,7 +82,7 @@ filepick.onchange = function(event) { if (event.target.files.length > 0) { var reader = new FileReader(); reader.onload = function(e) { - var parts = e.target.result.split('\\n'); + var parts = e.target.result.split('\n'); function upload() { if (parts.length === 0) { filepick.value = ''; return; } ask(parts.shift(), upload);