From 275184b28ddad0f2ca0731c5be783ca4f467b467 Mon Sep 17 00:00:00 2001 From: Tuan PM Date: Tue, 13 Sep 2016 00:19:00 +0700 Subject: [PATCH] update to lasted idf --- Makefile => component.mk | 2 +- mqtt.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) rename Makefile => component.mk (92%) diff --git a/Makefile b/component.mk similarity index 92% rename from Makefile rename to component.mk index 5b642a3..bd2cba0 100644 --- a/Makefile +++ b/component.mk @@ -15,4 +15,4 @@ EXTRA_CFLAGS := -Wno-error=implicit-function-declaration -Wno-error=format= -DHA -include $(IDF_PATH)/make/component.mk +include $(IDF_PATH)/make/component_common.mk diff --git a/mqtt.c b/mqtt.c index c2f0e60..e720326 100644 --- a/mqtt.c +++ b/mqtt.c @@ -2,7 +2,7 @@ * @Author: Tuan PM * @Date: 2016-09-10 09:33:06 * @Last Modified by: Tuan PM -* @Last Modified time: 2016-09-12 20:58:07 +* @Last Modified time: 2016-09-12 22:27:40 */ #include #include "freertos/FreeRTOS.h" @@ -355,6 +355,8 @@ mqtt_client *mqtt_start(mqtt_settings *settings) client->connect_info.will_message = settings->lwt_msg; client->connect_info.will_qos = settings->lwt_qos; client->connect_info.will_retain = settings->lwt_retain; + + client->keepalive_tick = settings->keepalive / 2; client->connect_info.keepalive = settings->keepalive;