From 0e096f0cc51ce060056c621faea4560f0ac230e3 Mon Sep 17 00:00:00 2001 From: Thorsten von Eicken Date: Sun, 20 Sep 2015 10:22:51 -0700 Subject: [PATCH] skip initial chars on uC reset --- serial/serbridge.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/serial/serbridge.c b/serial/serbridge.c index e713693..ed2e23c 100644 --- a/serial/serbridge.c +++ b/serial/serbridge.c @@ -17,6 +17,8 @@ #include "slip.h" #include "cmd.h" +#define SKIP_AT_RESET + static struct espconn serbridgeConn1; // plain bridging port static struct espconn serbridgeConn2; // programming port static esp_tcp serbridgeTcp1, serbridgeTcp2; @@ -220,6 +222,10 @@ serbridgeRecvCb(void *arg, char *data, unsigned short len) os_delay_us(1000L); // wait a millisecond before writing to the UART below conn->conn_mode = cmPGM; slip_disabled++; // disable SLIP so it doesn't interfere with flashing +#ifdef SKIP_AT_RESET + serledFlash(50); // short blink on serial LED + return; +#endif }