From 7b14acfa18f905d19527677e4a3249b2b5a698be Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Tue, 3 Oct 2023 02:19:50 +0700 Subject: [PATCH] add mqtt connected callback --- src/espmega_iot_core.cpp | 1 + src/user_code.cpp | 4 ++++ src/user_code.hpp | 1 + 3 files changed, 6 insertions(+) diff --git a/src/espmega_iot_core.cpp b/src/espmega_iot_core.cpp index e651816..8dd9f8e 100644 --- a/src/espmega_iot_core.cpp +++ b/src/espmega_iot_core.cpp @@ -370,6 +370,7 @@ void mqtt_connect() { standalone = true; Serial.print("MQTT not connected, continuing in standalone mode\n"); + mqtt_connected_user_callback(); lcd_send_stop_bit(); } lcd_send_stop_bit(); diff --git a/src/user_code.cpp b/src/user_code.cpp index 0c19dc2..1e771af 100644 --- a/src/user_code.cpp +++ b/src/user_code.cpp @@ -84,4 +84,8 @@ void timer1_callback() void ac_changed_user_callback(int mode, int temperature, int fan_speed) { +} + +void mqtt_connected_user_callback() { + } \ No newline at end of file diff --git a/src/user_code.hpp b/src/user_code.hpp index 7ef0623..a1ff80e 100644 --- a/src/user_code.hpp +++ b/src/user_code.hpp @@ -24,6 +24,7 @@ void pwm_changed_user_callback(int pin); void ac_changed_user_callback(int mode, int temperature, int fan_speed); void timer_tick_callback(); void timer1_callback(); +void mqtt_connected_user_callback(); void bt0PopCallback(void *ptr);