improve home page

v2.1
Thorsten von Eicken 9 years ago
parent ce05e00bd7
commit c3e1a8a83b
  1. 9
      html/console.js
  2. 11
      html/home.html

@ -22,12 +22,21 @@ function updateText(resp) {
var delay = 3000; var delay = 3000;
if (resp != null && resp.len > 0) { if (resp != null && resp.len > 0) {
console.log("updateText got", resp.len, "chars at", resp.start); 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) { if (resp.start > el.textEnd) {
el.innerHTML = el.innerHTML.concat("\r\n<missing lines\r\n"); el.innerHTML = el.innerHTML.concat("\r\n<missing lines\r\n");
} }
el.innerHTML = el.innerHTML.concat(resp.text); el.innerHTML = el.innerHTML.concat(resp.text);
el.textEnd = resp.start + resp.len; el.textEnd = resp.start + resp.len;
delay = 500; delay = 500;
// scroll to bottom
if(isScrolledToBottom) el.scrollTop = el.scrollHeight - el.clientHeight;
} }
return delay; return delay;
} }

@ -17,7 +17,7 @@
<div class="click-to-edit system-name"> <div class="click-to-edit system-name">
<span class="edit-off"></span> <span class="edit-off"></span>
<input class="edit-on" maxlength=31 hidden></input> <input class="edit-on" maxlength=31 hidden></input>
<div class="popup">Hostname displayed in menu bar <div class="popup">Click to edit!<br>Hostname displayed in menu bar
and used by DHCP and mDNS</div> and used by DHCP and mDNS</div>
</div> </div>
</td></tr> </td></tr>
@ -36,11 +36,12 @@
program microcontrollers over the serial port, in particular Arduinos, AVRs, and program microcontrollers over the serial port, in particular Arduinos, AVRs, and
NXP's LPC800 and other ARM processors. Typical avrdude command line to NXP's LPC800 and other ARM processors. Typical avrdude command line to
program an Arduino:</p> program an Arduino:</p>
<div class="tt">/home/arduino/hardware/tools/avrdude&nbsp;\<br> <div class="tt" style="font-size:100%;">
/home/arduino/hardware/tools/avrdude&nbsp;\<br>
&nbsp;&nbsp;-DV -patmega328p \<br> &nbsp;&nbsp;-DV -patmega328p \<br>
&nbsp;&nbsp;-Pnet:esp-link.local:23 \<br> &nbsp;&nbsp;-Pnet:esp-link.local:23 \<br>
&nbsp;&nbsp;-carduino -b115200 -U \<br> &nbsp;&nbsp;-carduino -b115200 -U -C \<br>
&nbsp;&nbsp;-C /home/arduino/hardware/tools/avrdude.conf&nbsp;\<br> &nbsp;&nbsp;/home/arduino/hardware/tools/avrdude.conf&nbsp;\<br>
&nbsp;&nbsp;flash:w:my_sketch.hex:i &nbsp;&nbsp;flash:w:my_sketch.hex:i
</div> </div>
<p>where <tt>-Pnet:esp-link.local:23</tt> tells avrdude to connect to port 23 of esp-link. <p>where <tt>-Pnet:esp-link.local:23</tt> tells avrdude to connect to port 23 of esp-link.
@ -126,7 +127,7 @@
<div class="click-to-edit system-description"> <div class="click-to-edit system-description">
<div class="edit-off"></div> <div class="edit-off"></div>
<textarea class="edit-on" rows=3 maxlength=127 hidden> </textarea> <textarea class="edit-on" rows=3 maxlength=127 hidden> </textarea>
<div class="popup">A short description or memo for this esp-link <div class="popup">Click to edit!<br>A short description or memo for this esp-link
module, 128 chars max</div> module, 128 chars max</div>
</div> </div>
</td></tr> </td></tr>

Loading…
Cancel
Save