Show IP address on connect

This commit is contained in:
fvanroie 2021-05-24 00:05:21 +02:00
parent 3593ce20b3
commit 57569e7b06
2 changed files with 7 additions and 0 deletions

View File

@ -67,6 +67,12 @@ static void wifiConnected(IPAddress ipaddress)
#endif
LOG_TRACE(TAG_WIFI, F(D_NETWORK_IP_ADDRESS_RECEIVED), wifiIpAddress);
lv_obj_t* msgbox = lv_msgbox_create(lv_layer_sys(), NULL);
lv_msgbox_set_text_fmt(msgbox, wifiIpAddress);
lv_msgbox_start_auto_close(msgbox, 4000);
lv_msgbox_set_anim_time(msgbox, 0);
lv_obj_move_background(msgbox);
LOG_VERBOSE(TAG_WIFI, F("Connected = %s"),
WiFi.status() == WL_CONNECTED ? PSTR(D_NETWORK_ONLINE) : PSTR(D_NETWORK_OFFLINE));
networkStart();

View File

@ -7,6 +7,7 @@
#define HASP_OTA_H
#include "ArduinoJson.h"
#include <ArduinoOTA.h>
/* ===== Default Event Processors ===== */
void otaSetup(void);