mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-30 20:09:14 +03:00
исправление ошики с округлением логирования
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||||
|
|
||||||
<title>IoT Manager 4.3.0</title>
|
<title>IoT Manager 4.3.1</title>
|
||||||
|
|
||||||
<link rel="icon" type="image/png" href="/favicon.ico" />
|
<link rel="icon" type="image/png" href="/favicon.ico" />
|
||||||
<link rel="stylesheet" href="/build/bundle.css" />
|
<link rel="stylesheet" href="/build/bundle.css" />
|
||||||
|
|||||||
@@ -45,3 +45,4 @@ extern const String getUniqueId(const char* name);
|
|||||||
extern uint32_t ESP_getChipId(void);
|
extern uint32_t ESP_getChipId(void);
|
||||||
extern uint32_t ESP_getFlashChipId(void);
|
extern uint32_t ESP_getFlashChipId(void);
|
||||||
extern const String getMacAddress();
|
extern const String getMacAddress();
|
||||||
|
extern const String getWebVersion();
|
||||||
|
|||||||
@@ -48,6 +48,14 @@ const String getUniqueId(const char* name) {
|
|||||||
return String(name) + getMacAddress();
|
return String(name) + getMacAddress();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const String getWebVersion() {
|
||||||
|
String text = readFile("/index.html", 2000);
|
||||||
|
text = selectFromMarkerToMarker(text, "title", 1);
|
||||||
|
text = selectFromMarkerToMarker(text, " ", 2);
|
||||||
|
text.replace("</", "");
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t ESP_getChipId(void) {
|
uint32_t ESP_getChipId(void) {
|
||||||
#ifdef ESP32
|
#ifdef ESP32
|
||||||
uint32_t id = 0;
|
uint32_t id = 0;
|
||||||
|
|||||||
@@ -16,10 +16,15 @@ void setup() {
|
|||||||
Serial.println(F("--------------started----------------"));
|
Serial.println(F("--------------started----------------"));
|
||||||
|
|
||||||
//создание экземпляров классов
|
//создание экземпляров классов
|
||||||
myNotAsyncActions = new NotAsync(do_LAST);
|
// myNotAsyncActions = new NotAsync(do_LAST);
|
||||||
|
|
||||||
//инициализация файловой системы
|
//инициализация файловой системы
|
||||||
fileSystemInit();
|
fileSystemInit();
|
||||||
|
Serial.println(F("------------------------"));
|
||||||
|
Serial.println("FIRMWARE NAME " + String(FIRMWARE_NAME));
|
||||||
|
Serial.println("FIRMWARE VERSION " + String(FIRMWARE_VERSION));
|
||||||
|
Serial.println("WEB VERSION " + getWebVersion());
|
||||||
|
Serial.println(F("------------------------"));
|
||||||
|
|
||||||
//получение chip id
|
//получение chip id
|
||||||
setChipId();
|
setChipId();
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
void periodicTasksInit() {
|
void periodicTasksInit() {
|
||||||
//задачи редкого выполнения
|
//задачи редкого выполнения
|
||||||
ts.add(
|
ts.add(
|
||||||
PTASK, 1000 * 30, [&](void*) {
|
PTASK, 1000 * 60, [&](void*) {
|
||||||
// fs
|
// fs
|
||||||
getFSInfo();
|
getFSInfo();
|
||||||
// heap
|
// heap
|
||||||
@@ -22,6 +22,7 @@ void periodicTasksInit() {
|
|||||||
// build ver
|
// build ver
|
||||||
jsonWriteStr_(errorsHeapJson, F("bver"), String(FIRMWARE_VERSION));
|
jsonWriteStr_(errorsHeapJson, F("bver"), String(FIRMWARE_VERSION));
|
||||||
jsonWriteStr_(errorsHeapJson, F("bn"), String(FIRMWARE_NAME));
|
jsonWriteStr_(errorsHeapJson, F("bn"), String(FIRMWARE_NAME));
|
||||||
|
jsonWriteStr_(errorsHeapJson, F("wver"), getWebVersion());
|
||||||
// reset reason
|
// reset reason
|
||||||
jsonWriteStr_(errorsHeapJson, F("rst"), ESP_getResetReason());
|
jsonWriteStr_(errorsHeapJson, F("rst"), ESP_getResetReason());
|
||||||
periodicWsSend();
|
periodicWsSend();
|
||||||
|
|||||||
@@ -48,7 +48,8 @@ bool upgradeFS() {
|
|||||||
#endif
|
#endif
|
||||||
#ifdef ESP32
|
#ifdef ESP32
|
||||||
httpUpdate.rebootOnUpdate(false);
|
httpUpdate.rebootOnUpdate(false);
|
||||||
HTTPUpdateResult retFS = httpUpdate.updateSpiffs(wifiClient, getBinPath("spiffs.bin"));
|
//обновляем little fs с помощью метода обновления spiffs
|
||||||
|
HTTPUpdateResult retFS = httpUpdate.updateSpiffs(wifiClient, getBinPath("littlefs.bin"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//если FS обновилась успешно
|
//если FS обновилась успешно
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ class Loging : public IoTItem {
|
|||||||
|
|
||||||
String logData;
|
String logData;
|
||||||
jsonWriteInt(logData, "x", unixTime);
|
jsonWriteInt(logData, "x", unixTime);
|
||||||
jsonWriteInt(logData, "y1", value.toFloat());
|
jsonWriteFloat(logData, "y1", value.toFloat());
|
||||||
|
|
||||||
//прочитаем путь к файлу последнего сохранения
|
//прочитаем путь к файлу последнего сохранения
|
||||||
String filePath = readDataDB(id);
|
String filePath = readDataDB(id);
|
||||||
|
|||||||
Reference in New Issue
Block a user