mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
*web Кастом Модификаторы в веб
*Адаптация под 8266 и Bk7231n
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -170,6 +170,14 @@
|
|||||||
"path": "src/modules/virtual/Loging",
|
"path": "src/modules/virtual/Loging",
|
||||||
"active": true
|
"active": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "src/modules/virtual/Loging2",
|
||||||
|
"active": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "src/modules/virtual/Loging3",
|
||||||
|
"active": false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "src/modules/virtual/LogingDaily",
|
"path": "src/modules/virtual/LogingDaily",
|
||||||
"active": true
|
"active": true
|
||||||
@@ -428,7 +436,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "src/modules/exec/Buzzer",
|
"path": "src/modules/exec/Buzzer",
|
||||||
"active": true
|
"active": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "src/modules/exec/EctoControlAdapter",
|
"path": "src/modules/exec/EctoControlAdapter",
|
||||||
@@ -506,6 +514,10 @@
|
|||||||
"path": "src/modules/exec/SysExt",
|
"path": "src/modules/exec/SysExt",
|
||||||
"active": false
|
"active": false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "src/modules/exec/Tca9555",
|
||||||
|
"active": false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "src/modules/exec/Telegram",
|
"path": "src/modules/exec/Telegram",
|
||||||
"active": false
|
"active": false
|
||||||
|
|||||||
@@ -198,12 +198,19 @@ void handleCors() {
|
|||||||
{
|
{
|
||||||
typeOTAfile = FILESYSTEM;
|
typeOTAfile = FILESYSTEM;
|
||||||
}
|
}
|
||||||
int updatePartition = (typeOTAfile == FIRMWARE)? U_FLASH : U_SPIFFS;
|
#ifdef ESP8266
|
||||||
|
size_t size = upload.totalSize;
|
||||||
|
int updatePartition = (typeOTAfile == FIRMWARE)? U_FLASH : U_FS; //U_FS
|
||||||
|
//#endif
|
||||||
|
#else //ESP32
|
||||||
|
size_t size = UPDATE_SIZE_UNKNOWN;
|
||||||
|
int updatePartition = (typeOTAfile == FIRMWARE)? U_FLASH : U_SPIFFS; //U_FS
|
||||||
|
#endif
|
||||||
if (upload.status == UPLOAD_FILE_START) {
|
if (upload.status == UPLOAD_FILE_START) {
|
||||||
//Serial.print("Начало загрузки: ");
|
//Serial.print("Начало загрузки: ");
|
||||||
//Serial.println(upload.filename);
|
//Serial.println(upload.filename);
|
||||||
SerialPrint("i", F("OTA"), "Начало загрузки файла: " + upload.filename);
|
SerialPrint("i", F("OTA"), "Начало загрузки файла: " + upload.filename);
|
||||||
if (!Update.begin(UPDATE_SIZE_UNKNOWN, updatePartition)) {
|
if (!Update.begin(size, updatePartition)) { // UPDATE_SIZE_UNKNOWN 0xFFFFFFFF
|
||||||
Update.end();
|
Update.end();
|
||||||
SerialPrint("E", F("OTA"), "Ошибка: Недостаточно памяти");
|
SerialPrint("E", F("OTA"), "Ошибка: Недостаточно памяти");
|
||||||
HTTP.send(500, "text/plain", "Ошибка: Недостаточно памяти");
|
HTTP.send(500, "text/plain", "Ошибка: Недостаточно памяти");
|
||||||
|
|||||||
@@ -254,10 +254,18 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t* payload, size_t length)
|
|||||||
// Устанавливаем время
|
// Устанавливаем время
|
||||||
if (settimeofday(&tv, NULL) == 0) {
|
if (settimeofday(&tv, NULL) == 0) {
|
||||||
//Serial.printf("Время установлено: %ld\n", unixTime);
|
//Serial.printf("Время установлено: %ld\n", unixTime);
|
||||||
|
#ifdef LIBRETINY
|
||||||
|
SerialPrint("i", F("Time"), "Время установлено из браузера: ");
|
||||||
|
#else
|
||||||
SerialPrint("i", F("Time"), "Время установлено из браузера: " + String(unixTime));
|
SerialPrint("i", F("Time"), "Время установлено из браузера: " + String(unixTime));
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
|
#ifdef LIBRETINY
|
||||||
//Serial.printf("Ошибка установки времени: %ld\n", unixTime);
|
//Serial.printf("Ошибка установки времени: %ld\n", unixTime);
|
||||||
|
SerialPrint("i", F("=>WS"), "Ошибка установки времени: ");
|
||||||
|
#else
|
||||||
SerialPrint("i", F("=>WS"), "Ошибка установки времени: " + String(unixTime));
|
SerialPrint("i", F("=>WS"), "Ошибка установки времени: " + String(unixTime));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
// timeval tv2{0, 0};
|
// timeval tv2{0, 0};
|
||||||
// timezone tz = timezone{0, 0};
|
// timezone tz = timezone{0, 0};
|
||||||
|
|||||||
@@ -160,7 +160,11 @@ public:
|
|||||||
SerialPrint("E", F("LogingHourly"), "'" + id + "' db file writing error, return");
|
SerialPrint("E", F("LogingHourly"), "'" + id + "' db file writing error, return");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#ifdef LIBRETINY
|
||||||
|
SerialPrint("i", F("LogingHourly"), "'" + id + "' file created http://" + ipToString(WiFi.localIP()) + path);
|
||||||
|
#else
|
||||||
SerialPrint("i", F("LogingHourly"), "'" + id + "' file created http://" + WiFi.localIP().toString() + path);
|
SerialPrint("i", F("LogingHourly"), "'" + id + "' file created http://" + WiFi.localIP().toString() + path);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void addNewDataToExistingFile(String &path, String &logData)
|
void addNewDataToExistingFile(String &path, String &logData)
|
||||||
@@ -171,7 +175,11 @@ public:
|
|||||||
SerialPrint("i", F("LogingHourly"), "'" + id + "' file writing error, return");
|
SerialPrint("i", F("LogingHourly"), "'" + id + "' file writing error, return");
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
#ifdef LIBRETINY
|
||||||
|
SerialPrint("i", F("LogingHourly"), "'" + id + "' LogingHourly in file http://" + ipToString(WiFi.localIP()) + path);
|
||||||
|
#else
|
||||||
SerialPrint("i", F("LogingHourly"), "'" + id + "' LogingHourly in file http://" + WiFi.localIP().toString() + path);
|
SerialPrint("i", F("LogingHourly"), "'" + id + "' LogingHourly in file http://" + WiFi.localIP().toString() + path);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
const String getTimeLocal_hh()
|
const String getTimeLocal_hh()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user