mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
...
This commit is contained in:
@@ -238,6 +238,18 @@ int jsonReadInt(const String& json, String name, bool e) {
|
||||
return doc[name].as<int>();
|
||||
}
|
||||
|
||||
long int jsonReadLInt(const String& json, String name, bool e) {
|
||||
DynamicJsonDocument doc(JSON_BUFFER_SIZE);
|
||||
DeserializationError error = deserializeJson(doc, json);
|
||||
if (error) {
|
||||
if (e) {
|
||||
SerialPrint("E", F("jsonRead"), error.f_str());
|
||||
jsonErrorDetected();
|
||||
}
|
||||
}
|
||||
return doc[name].as<long int>();
|
||||
}
|
||||
|
||||
// depricated========================================================================
|
||||
String jsonWriteStr(String& json, String name, String value, bool e) {
|
||||
DynamicJsonDocument doc(JSON_BUFFER_SIZE);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "Global.h"
|
||||
#include "utils/StringUtils.h"
|
||||
|
||||
static const char* TIME_FORMAT PROGMEM = "%02d:%02d"; //:%02d";
|
||||
static const char* TIME_FORMAT PROGMEM = "%02d:%02d:%02d";
|
||||
static const char* TIME_FORMAT_WITH_DAYS PROGMEM = "%dd %02d:%02d";
|
||||
|
||||
const String prettySeconds(unsigned long time_s) {
|
||||
|
||||
Reference in New Issue
Block a user