mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 14:42:18 +03:00
не рабочая версия
This commit is contained in:
@@ -22,7 +22,7 @@ void* getAPI_ButtonOut(String subtype, String params);
|
||||
void* getAPI_IoTServo(String subtype, String params);
|
||||
void* getAPI_Mcp23017(String subtype, String params);
|
||||
void* getAPI_Mp3(String subtype, String params);
|
||||
void* getAPI_Pwm32(String subtype, String params);
|
||||
void* getAPI_Pwm8266(String subtype, String params);
|
||||
void* getAPI_TelegramLT(String subtype, String params);
|
||||
void* getAPI_Lcd2004(String subtype, String params);
|
||||
|
||||
@@ -50,7 +50,7 @@ if ((tmpAPI = getAPI_ButtonOut(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_IoTServo(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Mcp23017(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Mp3(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Pwm32(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Pwm8266(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_TelegramLT(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Lcd2004(subtype, params)) != nullptr) return tmpAPI;
|
||||
return nullptr;
|
||||
|
||||
@@ -119,46 +119,9 @@ class Loging : public IoTItem {
|
||||
return changed;
|
||||
}
|
||||
|
||||
#if defined(ESP8266)
|
||||
void getFilesList8266() {
|
||||
filesList = "";
|
||||
String directory = "lg/" + id;
|
||||
auto dir = FileFS.openDir(directory);
|
||||
while (dir.next()) {
|
||||
String fname = dir.fileName();
|
||||
if (fname != "") filesList += directory + "/" + fname + ";";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(ESP32)
|
||||
void getFilesList32() {
|
||||
filesList = "";
|
||||
String directory = "/lg/" + id;
|
||||
File root = FileFS.open(directory);
|
||||
directory = String();
|
||||
if (root.isDirectory()) {
|
||||
File file = root.openNextFile();
|
||||
while (file) {
|
||||
String fname = file.name();
|
||||
if (fname != "") filesList += fname + ";";
|
||||
file = root.openNextFile();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void getFilesList() {
|
||||
#if defined(ESP8266)
|
||||
getFilesList8266();
|
||||
#endif
|
||||
#if defined(ESP32)
|
||||
getFilesList32();
|
||||
#endif
|
||||
}
|
||||
|
||||
void sendChart() {
|
||||
getFilesList();
|
||||
String dir = "lg/" + id;
|
||||
filesList = getFilesList(dir);
|
||||
int f = 0;
|
||||
|
||||
bool noData = true;
|
||||
@@ -202,7 +165,8 @@ class Loging : public IoTItem {
|
||||
}
|
||||
|
||||
void cleanData() {
|
||||
getFilesList();
|
||||
String dir = "lg/" + id;
|
||||
filesList = getFilesList(dir);
|
||||
int i = 0;
|
||||
while (filesList.length()) {
|
||||
String buf = selectToMarker(filesList, ";");
|
||||
|
||||
Reference in New Issue
Block a user