diff --git a/html/console.js b/html/console.js index f29469c..e85d6d7 100644 --- a/html/console.js +++ b/html/console.js @@ -22,12 +22,21 @@ function updateText(resp) { var delay = 3000; if (resp != null && resp.len > 0) { console.log("updateText got", resp.len, "chars at", resp.start); + var isScrolledToBottom = el.scrollHeight - el.clientHeight <= el.scrollTop + 1; + //console.log("isScrolledToBottom="+isScrolledToBottom, "scrollHeight="+el.scrollHeight, + // "clientHeight="+el.clientHeight, "scrollTop="+el.scrollTop, + // "" + (el.scrollHeight - el.clientHeight) + "<=" + (el.scrollTop + 1)); + + // append the text if (resp.start > el.textEnd) { el.innerHTML = el.innerHTML.concat("\r\n - @@ -36,11 +36,12 @@ program microcontrollers over the serial port, in particular Arduinos, AVRs, and NXP's LPC800 and other ARM processors. Typical avrdude command line to program an Arduino:

-
/home/arduino/hardware/tools/avrdude \
+
+ /home/arduino/hardware/tools/avrdude \
  -DV -patmega328p \
  -Pnet:esp-link.local:23 \
-   -carduino -b115200 -U \
-   -C /home/arduino/hardware/tools/avrdude.conf \
+   -carduino -b115200 -U -C \
+   /home/arduino/hardware/tools/avrdude.conf \
  flash:w:my_sketch.hex:i

where -Pnet:esp-link.local:23 tells avrdude to connect to port 23 of esp-link. @@ -125,8 +126,8 @@ Description:

- -