diff --git a/firmware/0x00000.bin b/firmware/0x00000.bin index cc6487c..082c65c 100644 Binary files a/firmware/0x00000.bin and b/firmware/0x00000.bin differ diff --git a/firmware/0x10000.bin b/firmware/0x10000.bin index ada706e..0075144 100644 Binary files a/firmware/0x10000.bin and b/firmware/0x10000.bin differ diff --git a/firmware/sha1sums b/firmware/sha1sums new file mode 100644 index 0000000..b5ebb9a --- /dev/null +++ b/firmware/sha1sums @@ -0,0 +1,2 @@ +8c0436ab218b8b4165f57501775797e09e818ae0 0x00000.bin +b02f819746fe72bb7692e9c6bb2c37d175f58b24 0x10000.bin diff --git a/mqtt/Makefile b/mqtt/Makefile index db53f43..18afce5 100644 --- a/mqtt/Makefile +++ b/mqtt/Makefile @@ -42,3 +42,4 @@ INCLUDES += -I ./ PDIR := ../$(PDIR) sinclude $(PDIR)Makefile + diff --git a/user/user_config.h b/user/user_config.h index 7c41832..534a329 100644 --- a/user/user_config.h +++ b/user/user_config.h @@ -73,7 +73,7 @@ #define JSON_PARSE 1 // -// Define this if you want to have mDNS support in scripts. +// Define this if you want to have mDNS support. // #define MDNS 1 diff --git a/user/user_main.c b/user/user_main.c index 3478098..7688a9d 100644 --- a/user/user_main.c +++ b/user/user_main.c @@ -692,7 +692,7 @@ void ICACHE_FLASH_ATTR console_handle_command(struct espconn *pespconn) { config_load_default(&config); config_save(&config); #ifdef SCRIPTED - // clear script + // Clear script and vars blob_zero(0, MAX_SCRIPT_SIZE); blob_zero(1, MAX_FLASH_SLOTS * FLASH_SLOT_LEN); #endif @@ -1528,10 +1528,11 @@ void user_init() { os_printf("\r\n\r\nWiFi Router/MQTT Broker V2.0 starting\r\n"); // Load config - config_load(&config); + int config_res = config_load(&config); + #ifdef SCRIPTED script_enabled = false; - if (read_script()) { + if ((config_res == 0) && read_script()) { if (interpreter_syntax_check() != -1) { bool lockstat = config.locked; config.locked = false; @@ -1543,6 +1544,10 @@ void user_init() { } else { os_printf("ERROR in script: %s\r\nScript disabled\r\n", tmp_buffer); } + } else { + // Clear script and vars + blob_zero(0, MAX_SCRIPT_SIZE); + blob_zero(1, MAX_FLASH_SLOTS * FLASH_SLOT_LEN); } #endif