From f8cd9ff411a15a61b79e8955670e2385cd103eeb Mon Sep 17 00:00:00 2001 From: Thorsten von Eicken Date: Sat, 27 Jun 2015 09:54:13 -0700 Subject: [PATCH] omit 0.0.0.0 static IP; return uart to normal --- user/cgiwifi.c | 5 ++++- user/log.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/user/cgiwifi.c b/user/cgiwifi.c index 059fb34..5277e79 100644 --- a/user/cgiwifi.c +++ b/user/cgiwifi.c @@ -515,7 +515,10 @@ int ICACHE_FLASH_ATTR printWifiInfo(char *buff) { } else { len += os_sprintf(buff+len, ", \"ip\": \"-none-\""); } - len += os_sprintf(buff+len, ", \"staticip\": \"%d.%d.%d.%d\"", IP2STR(&flashConfig.staticip)); + if (flashConfig.staticip > 0) + len += os_sprintf(buff+len, ", \"staticip\": \"%d.%d.%d.%d\"", IP2STR(&flashConfig.staticip)); + else + len += os_sprintf(buff+len, ", \"staticip\": \"\""); return len; } diff --git a/user/log.c b/user/log.c index 7236ef5..953e614 100644 --- a/user/log.c +++ b/user/log.c @@ -20,7 +20,7 @@ static bool log_newline; // at start of a new line void ICACHE_FLASH_ATTR log_uart(bool enable) { if (!enable && !log_no_uart) { -#if 0 +#if 1 os_printf("Turning OFF uart log\n"); os_delay_us(4*1000L); // time for uart to flush log_no_uart = !enable;