diff --git a/esp-link/main.c b/esp-link/main.c index 1790d66..25a528a 100644 --- a/esp-link/main.c +++ b/esp-link/main.c @@ -127,6 +127,7 @@ static char *flash_maps[] = { char* esp_link_version = VERS_STR(VERSION); extern void app_init(void); +extern void mqtt_client_init(void); // Main routine to initialize esp-link. void user_init(void) { @@ -177,5 +178,7 @@ void user_init(void) { os_printf("** esp-link ready\n"); + mqtt_client_init(); + app_init(); } diff --git a/user/user_main.c b/user/user_main.c index cd0dbf0..e5dd622 100644 --- a/user/user_main.c +++ b/user/user_main.c @@ -2,6 +2,8 @@ #include "cgiwifi.h" #include "mqtt.h" +#if 0 + MQTT_Client mqttClient; static ETSTimer mqttTimer; @@ -31,7 +33,6 @@ void app_init() { } -#if 0 MQTT_Client mqttClient; void ICACHE_FLASH_ATTR