fix serial LED; fixes #22

pull/30/head 0.10.3
Thorsten von Eicken 10 years ago
parent ca0b9958c0
commit 62e6839788
  1. 6
      html/log.html
  2. 19
      serial/serbridge.c

@ -5,13 +5,13 @@
<div class="content"> <div class="content">
<div class="pure-g"> <div class="pure-g">
<div class="pure-u-1-5"> <div class="pure-u-1-4">
<p style="padding-top: 0.4em;"> <p style="padding-top: 0.4em;">
<a id="refresh-button" class="pure-button button-primary" href="#">Refresh</a> <a id="refresh-button" class="pure-button button-primary" href="#">Refresh</a>
</p> </p>
</div> </div>
<p class="pure-u-4-5"> <p class="pure-u-3-4">
The debug log shows the 1024 last characters printed by the esp-link software itself to The debug log shows the most recent characters printed by the esp-link software itself to
its own debug log. its own debug log.
</p> </p>
</div> </div>

@ -81,8 +81,6 @@ static void ICACHE_FLASH_ATTR serbridgeSentCb(void *arg) {
//os_printf("%d ST\n", system_get_time()); //os_printf("%d ST\n", system_get_time());
conn->readytosend = true; conn->readytosend = true;
sendtxbuffer(conn); // send possible new data in txbuffer sendtxbuffer(conn); // send possible new data in txbuffer
serledFlash(50); // short blink on serial LED
} }
// Telnet protocol characters // Telnet protocol characters
@ -309,15 +307,16 @@ static void ICACHE_FLASH_ATTR serbridgeConnectCb(void *arg) {
// callback with a buffer of characters that have arrived on the uart // callback with a buffer of characters that have arrived on the uart
void ICACHE_FLASH_ATTR void ICACHE_FLASH_ATTR
serbridgeUartCb(char *buf, int length) { serbridgeUartCb(char *buf, int length) {
// push the buffer into the microcontroller console // push the buffer into the microcontroller console
for (int i=0; i<length; i++) for (int i=0; i<length; i++)
console_write_char(buf[i]); console_write_char(buf[i]);
// push the buffer into each open connection // push the buffer into each open connection
for (int i = 0; i < MAX_CONN; ++i) { for (int i = 0; i < MAX_CONN; ++i) {
if (connData[i].conn) { if (connData[i].conn) {
espbuffsend(&connData[i], buf, length); espbuffsend(&connData[i], buf, length);
}
} }
}
serledFlash(50); // short blink on serial LED
} }
void ICACHE_FLASH_ATTR serbridgeInitPins() { void ICACHE_FLASH_ATTR serbridgeInitPins() {

Loading…
Cancel
Save