diff --git a/Makefile b/Makefile index 10f3beb..78342c1 100644 --- a/Makefile +++ b/Makefile @@ -370,7 +370,7 @@ ifeq ("$(COMPRESS_W_HTMLCOMPRESSOR)","yes") $(WIFI_PATH)*.html $(Q) echo "Compression assets with yui-compressor. This may take a while..." $(Q) for file in `find html_compressed -type f -name "*.js"`; do \ - java -jar tools/$(YUI_COMPRESSOR) $$file -o $$file; \ + java -jar tools/$(YUI_COMPRESSOR) $$file --line-break 0 -o $$file; \ done $(Q) for file in `find html_compressed -type f -name "*.css"`; do \ java -jar tools/$(YUI_COMPRESSOR) $$file -o $$file; \ diff --git a/esp-link/cgioptiboot.c b/esp-link/cgioptiboot.c index dfeb360..bd2dd2a 100644 --- a/esp-link/cgioptiboot.c +++ b/esp-link/cgioptiboot.c @@ -84,6 +84,8 @@ static void ICACHE_FLASH_ATTR optibootInit() { DBG("OB init\n"); } +// append one string to another but visually escape non-printing characters in the second +// string using \x00 hex notation, max is the max chars in the concatenated string. void ICACHE_FLASH_ATTR appendPretty(char *buf, char *raw, int max) { int off = strlen(buf); int i = 0; @@ -100,8 +102,8 @@ void ICACHE_FLASH_ATTR appendPretty(char *buf, char *raw, int max) { } else { buf[off++] = '\\'; buf[off++] = 'x'; - buf[off++] = '0'+(c>>4)+((c>>4)>9?7:0); - buf[off++] = '0'+(c&0xff)+((c&0xff)>9?7:0); + buf[off++] = '0'+(unsigned char)((c>>4)+((c>>4)>9?7:0)); + buf[off++] = '0'+(unsigned char)((c&0xff)+((c&0xff)>9?7:0)); } } buf[off] = 0; diff --git a/esp-link/config.h b/esp-link/config.h index b26f7b6..f7cb2b9 100644 --- a/esp-link/config.h +++ b/esp-link/config.h @@ -23,7 +23,7 @@ typedef struct { uint16_t mqtt_port, mqtt_keepalive; // MQTT Host port, MQTT Keepalive timer char mqtt_host[32], mqtt_clientid[48], mqtt_username[32], mqtt_password[32]; char mqtt_status_topic[32]; - char sys_name[12], sys_descr[128]; // informal system name and description + char sys_name[13], sys_descr[129]; // informal system name and description } FlashConfig; extern FlashConfig flashConfig; diff --git a/esp-link/main.c b/esp-link/main.c index 9fab6a9..1744bd0 100644 --- a/esp-link/main.c +++ b/esp-link/main.c @@ -171,7 +171,7 @@ void user_init(void) { os_delay_us(10000L); os_printf("\n\n** %s\n", esp_link_version); os_printf("Flash config restore %s\n", restoreOk ? "ok" : "*FAILED*"); - if (flashConfig.sys_name[0] == 0) os_strcpy(flashConfig.sys_name, "nameme"); + if (flashConfig.sys_name[0] == 0) os_strcpy(flashConfig.sys_name, "name-me"); #if defined(STA_SSID) && defined(STA_PASS) int x = wifi_get_opmode() & 0x3; diff --git a/html/home.html b/html/home.html index ca31c58..69dccff 100644 --- a/html/home.html +++ b/html/home.html @@ -42,15 +42,20 @@
Name | |
Flash chip ID | |
Flash size | |
Current partition | |
SLIP status | |
MQTT status | |
Serial baud | |
Flash chip ID | |
Flash size | |
Current partition | |
SLIP status | |
MQTT status | |
Serial baud | |
Description: - |