mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-14 23:46:52 +03:00
Streamlined MQTT interlock when not activated & interlock MQTT when WIFI is not connected (#1556)
* streamlined mqtt interlock when disabled * Disconnect mqtt client before reboot * Interlock MQTT with WIFI * Update * loglevel to DEBUG * Update * mqtt msg id incremental * new ENABLE_MQTT includes * Loglevel to DEBUG * Loglevel * Update interface_mqtt.cpp
This commit is contained in:
@@ -29,6 +29,9 @@
|
||||
#include "server_tflite.h"
|
||||
#include "server_file.h"
|
||||
#include "server_GPIO.h"
|
||||
#ifdef ENABLE_MQTT
|
||||
#include "interface_mqtt.h"
|
||||
#endif //ENABLE_MQTT
|
||||
|
||||
|
||||
#include "ClassLogFile.h"
|
||||
@@ -601,6 +604,9 @@ void doReboot(){
|
||||
xTaskCreate(&task_reboot, "reboot", configMINIMAL_STACK_SIZE * 64, NULL, 10, NULL);
|
||||
// KillTFliteTasks(); // kills itself
|
||||
gpio_handler_destroy();
|
||||
#ifdef ENABLE_MQTT
|
||||
MQTTdestroy_client();
|
||||
#endif //ENABLE_MQTT
|
||||
vTaskDelay(5000 / portTICK_PERIOD_MS);
|
||||
esp_restart();
|
||||
hard_restart();
|
||||
|
||||
Reference in New Issue
Block a user