diff --git a/Makefile b/Makefile index c96ce35..8a10c22 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ ESPPORT ?= /dev/ttyUSB0 TARGET = app # which modules (subdirectories) of the project to include in compiling -MODULES = driver user mqtt +MODULES = driver user mqtt #EXTRA_INCDIR = $(BUILD_AREA)/esp-open-sdk/esp-open-lwip/include include EXTRA_INCDIR = include diff --git a/firmware/0x00000.bin b/firmware/0x00000.bin index cc667d3..b2d10bf 100644 Binary files a/firmware/0x00000.bin and b/firmware/0x00000.bin differ diff --git a/firmware/0x10000.bin b/firmware/0x10000.bin index fab1110..277076b 100644 Binary files a/firmware/0x10000.bin and b/firmware/0x10000.bin differ diff --git a/user/user_main.c b/user/user_main.c index 91ebb86..727f516 100644 --- a/user/user_main.c +++ b/user/user_main.c @@ -384,7 +384,7 @@ void ICACHE_FLASH_ATTR console_handle_command(struct espconn *pespconn) if (strcmp(tokens[0], "publish") == 0) { - if (nTokens != 3) { + if (nTokens != 4) { os_sprintf(response, INVALID_NUMARGS); goto command_handled; } @@ -393,7 +393,7 @@ void ICACHE_FLASH_ATTR console_handle_command(struct espconn *pespconn) } #ifdef MQTT_CLIENT else if (strcmp(tokens[1], "remote") == 0 && mqtt_connected) { - MQTT_Publish(&mqttClient, tokens[2], tokens[2], os_strlen(tokens[2]), 0, 0); + MQTT_Publish(&mqttClient, tokens[2], tokens[3], os_strlen(tokens[3]), 0, 0); } #endif os_sprintf(response, "Published topic\r\n");