mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
исправление ошики с округлением логирования
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -4,7 +4,7 @@
|
||||
<meta charset="utf-8" />
|
||||
<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="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_getFlashChipId(void);
|
||||
extern const String getMacAddress();
|
||||
extern const String getWebVersion();
|
||||
|
||||
@@ -48,6 +48,14 @@ const String getUniqueId(const char* name) {
|
||||
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) {
|
||||
#ifdef ESP32
|
||||
uint32_t id = 0;
|
||||
|
||||
@@ -16,10 +16,15 @@ void setup() {
|
||||
Serial.println(F("--------------started----------------"));
|
||||
|
||||
//создание экземпляров классов
|
||||
myNotAsyncActions = new NotAsync(do_LAST);
|
||||
// myNotAsyncActions = new NotAsync(do_LAST);
|
||||
|
||||
//инициализация файловой системы
|
||||
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
|
||||
setChipId();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
void periodicTasksInit() {
|
||||
//задачи редкого выполнения
|
||||
ts.add(
|
||||
PTASK, 1000 * 30, [&](void*) {
|
||||
PTASK, 1000 * 60, [&](void*) {
|
||||
// fs
|
||||
getFSInfo();
|
||||
// heap
|
||||
@@ -22,6 +22,7 @@ void periodicTasksInit() {
|
||||
// build ver
|
||||
jsonWriteStr_(errorsHeapJson, F("bver"), String(FIRMWARE_VERSION));
|
||||
jsonWriteStr_(errorsHeapJson, F("bn"), String(FIRMWARE_NAME));
|
||||
jsonWriteStr_(errorsHeapJson, F("wver"), getWebVersion());
|
||||
// reset reason
|
||||
jsonWriteStr_(errorsHeapJson, F("rst"), ESP_getResetReason());
|
||||
periodicWsSend();
|
||||
|
||||
@@ -48,7 +48,8 @@ bool upgradeFS() {
|
||||
#endif
|
||||
#ifdef ESP32
|
||||
httpUpdate.rebootOnUpdate(false);
|
||||
HTTPUpdateResult retFS = httpUpdate.updateSpiffs(wifiClient, getBinPath("spiffs.bin"));
|
||||
//обновляем little fs с помощью метода обновления spiffs
|
||||
HTTPUpdateResult retFS = httpUpdate.updateSpiffs(wifiClient, getBinPath("littlefs.bin"));
|
||||
#endif
|
||||
|
||||
//если FS обновилась успешно
|
||||
|
||||
@@ -67,7 +67,7 @@ class Loging : public IoTItem {
|
||||
|
||||
String logData;
|
||||
jsonWriteInt(logData, "x", unixTime);
|
||||
jsonWriteInt(logData, "y1", value.toFloat());
|
||||
jsonWriteFloat(logData, "y1", value.toFloat());
|
||||
|
||||
//прочитаем путь к файлу последнего сохранения
|
||||
String filePath = readDataDB(id);
|
||||
|
||||
Reference in New Issue
Block a user