mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 14:42:18 +03:00
platformio esp8266, esp32
This commit is contained in:
@@ -18,9 +18,9 @@ unsigned int udp_port = 4210;
|
||||
void handleUdp_esp32();
|
||||
void add_dev_in_list(String fileName, String id, String dev_name, String ip);
|
||||
|
||||
#ifdef UDP_enable
|
||||
#ifdef UDP_ENABLED
|
||||
void UDP_init() {
|
||||
LittleFS.remove("/dev.csv");
|
||||
removeFile("/dev.csv");
|
||||
addFile("dev.csv", "device id;device name;ip address");
|
||||
|
||||
#ifdef ESP8266
|
||||
@@ -123,8 +123,8 @@ void do_udp_data_parse() {
|
||||
}
|
||||
|
||||
void add_dev_in_list(String filename, String id, String dev_name, String ip) {
|
||||
File configFile = LittleFS.open("/" + filename, "r");
|
||||
if (!configFile.find(id.c_str())) {
|
||||
auto file = seekFile("/" + filename);
|
||||
if (!file.find(id.c_str())) {
|
||||
addFile(filename, id + ";" + dev_name + "; <a href=\"http://" + ip + "\" target=\"_blank\"\">" + ip + "</a>");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user