версия 404, много исправлений

This commit is contained in:
Dmitry Borisenko
2022-02-16 00:53:52 +01:00
parent 218a0408a5
commit 5110c609c3
21 changed files with 101 additions and 75 deletions

View File

@@ -14,11 +14,15 @@ void periodicTasksInit() {
// uptime
jsonWriteStr_(errorsHeapJson, F("upt"), prettyMillis(millis()));
jsonWriteStr_(errorsHeapJson, F("uptm"), prettyMillis(mqttUptime));
// flash
jsonWriteInt_(errorsHeapJson, F("fl"), flashWriteNumber);
// build ver
jsonWriteStr_(errorsHeapJson, F("bver"), String(FIRMWARE_VERSION));
jsonWriteStr_(errorsHeapJson, F("bn"), String(FIRMWARE_NAME));
periodicWsSend();
},
nullptr, true);
SerialPrint("i", "Task", "Periodic tasks init");
}
void handleError(String errorId, String errorValue) {
@@ -43,7 +47,11 @@ void printGlobalVarSize() {
size_t halfBuffer = JSON_BUFFER_SIZE / 2;
if (settingsFlashJsonSize > halfBuffer || errorsHeapJsonSize > halfBuffer || paramsFlashJsonSize > halfBuffer || paramsHeapJsonSize > halfBuffer) {
if (settingsFlashJsonSize > halfBuffer ||
errorsHeapJsonSize > halfBuffer ||
paramsFlashJsonSize > halfBuffer ||
paramsHeapJsonSize > halfBuffer ||
devListHeapJsonSize > halfBuffer) {
SerialPrint(F("EE"), F("Json"), F("Insufficient buffer size!!!"));
jsonWriteInt(errorsHeapJson, "jse1", 1);
}