mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
some fix
This commit is contained in:
10
mqtt.ino
10
mqtt.ino
@@ -19,6 +19,7 @@ void MQTT_init() {
|
||||
|
||||
saveConfig();
|
||||
|
||||
|
||||
client.disconnect();
|
||||
MQTT_Connecting();
|
||||
|
||||
@@ -40,10 +41,13 @@ void MQTT_init() {
|
||||
#endif
|
||||
|
||||
#ifdef ESP32
|
||||
request->send(200, "text/text", tmp);
|
||||
request->send(200, "text/text", tmp);
|
||||
#endif
|
||||
});
|
||||
|
||||
MQTT_Connecting();
|
||||
|
||||
|
||||
//проверка подключения к серверу
|
||||
ts.add(WIFI_MQTT_CONNECTION_CHECK, wifi_mqtt_reconnecting, [&](void*) {
|
||||
up_time();
|
||||
@@ -51,7 +55,7 @@ void MQTT_init() {
|
||||
Serial.println("[V] WiFi-ok");
|
||||
if (client.connected()) {
|
||||
Serial.println("[V] MQTT-ok");
|
||||
web_print("MQTT-ok");
|
||||
//web_print("MQTT-ok");
|
||||
} else {
|
||||
MQTT_Connecting();
|
||||
mqtt_lost_error++;
|
||||
@@ -62,7 +66,7 @@ void MQTT_init() {
|
||||
ts.remove(WIFI_MQTT_CONNECTION_CHECK);
|
||||
StartAPMode();
|
||||
}
|
||||
}, nullptr, true);
|
||||
}, nullptr, false);
|
||||
}
|
||||
|
||||
//================================================ОБНОВЛЕНИЕ====================================================
|
||||
|
||||
Reference in New Issue
Block a user