reduced buffers, not really needed

pull/111/merge
Ondřej Hruška 7 years ago
parent 48cd9c1a2a
commit e46abe175f
  1. 12
      html_orig/js/app.js
  2. 12
      html_orig/jssrc/term_upload.js
  3. 2
      html_orig/pages/term.php
  4. 4
      user/uart_buffer.c

@ -2410,9 +2410,9 @@ var TermUpl = (function() {
send_delay_ms = qs('#fu_delay').value;
// sanitize - 0 causes overflows
if (send_delay_ms <= 0) {
send_delay_ms = 1;
qs('#fu_delay').value = 1;
if (send_delay_ms < 0) {
send_delay_ms = 0;
qs('#fu_delay').value = send_delay_ms;
}
nl_str = {
@ -2451,7 +2451,6 @@ var TermUpl = (function() {
inline_pos += MAX_LINE_LEN;
}
console.log("-> " + chunk);
if (!Input.sendString(chunk)) {
fuStatus("FAILED!");
return;
@ -2470,14 +2469,15 @@ var TermUpl = (function() {
function closeWhenReady() {
if (!Conn.canSend()) {
// stuck in XOFF still, wait to process...
fuStatus("Waiting for Tx buffer...");
setTimeout(closeWhenReady, 250);
setTimeout(closeWhenReady, 100);
} else {
fuStatus("Done.");
// delay to show it
setTimeout(function() {
fuClose();
}, 250);
}, 100);
}
}

@ -43,9 +43,9 @@ var TermUpl = (function() {
send_delay_ms = qs('#fu_delay').value;
// sanitize - 0 causes overflows
if (send_delay_ms <= 0) {
send_delay_ms = 1;
qs('#fu_delay').value = 1;
if (send_delay_ms < 0) {
send_delay_ms = 0;
qs('#fu_delay').value = send_delay_ms;
}
nl_str = {
@ -84,7 +84,6 @@ var TermUpl = (function() {
inline_pos += MAX_LINE_LEN;
}
console.log("-> " + chunk);
if (!Input.sendString(chunk)) {
fuStatus("FAILED!");
return;
@ -103,14 +102,15 @@ var TermUpl = (function() {
function closeWhenReady() {
if (!Conn.canSend()) {
// stuck in XOFF still, wait to process...
fuStatus("Waiting for Tx buffer...");
setTimeout(closeWhenReady, 250);
setTimeout(closeWhenReady, 100);
} else {
fuStatus("Done.");
// delay to show it
setTimeout(function() {
fuClose();
}, 250);
}, 100);
}
}

@ -27,7 +27,7 @@
</p>
<p>
<label for="fu_delay">Line Delay (ms):</label>
<input id="fu_delay" type="number" value=1 min=1 max=500>
<input id="fu_delay" type="number" value=1 min=0>
</p>
</div>
<div class="fu-buttons">

@ -8,8 +8,8 @@
#include <esp8266.h>
#include <uart_register.h>
#define UART_TX_BUFFER_SIZE 1024 //Ring buffer length of tx buffer
#define UART_RX_BUFFER_SIZE 1024 //Ring buffer length of rx buffer
#define UART_TX_BUFFER_SIZE 512 //Ring buffer length of tx buffer
#define UART_RX_BUFFER_SIZE 512 //Ring buffer length of rx buffer
struct UartBuffer {
uint32 UartBuffSize;

Loading…
Cancel
Save