platformio esp8266, esp32

This commit is contained in:
Yuri Trikoz
2020-06-21 03:43:15 +03:00
parent ac6f51af7b
commit bba7487374
39 changed files with 8579 additions and 166 deletions

View File

@@ -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>");
}
}