ml307: Add sleep mode (#826)

This commit is contained in:
Xiaoxia
2025-06-16 19:05:31 +08:00
committed by GitHub
parent f98ffdbb5c
commit f29c1a11d9
3 changed files with 15 additions and 3 deletions

View File

@@ -148,6 +148,10 @@ bool Ota::CheckVersion() {
if (settings.GetString(item->string) != item->valuestring) {
settings.SetString(item->string, item->valuestring);
}
} else if (cJSON_IsNumber(item)) {
if (settings.GetInt(item->string) != item->valueint) {
settings.SetInt(item->string, item->valueint);
}
}
}
has_mqtt_config_ = true;
@@ -162,9 +166,13 @@ bool Ota::CheckVersion() {
cJSON *item = NULL;
cJSON_ArrayForEach(item, websocket) {
if (cJSON_IsString(item)) {
settings.SetString(item->string, item->valuestring);
if (settings.GetString(item->string) != item->valuestring) {
settings.SetString(item->string, item->valuestring);
}
} else if (cJSON_IsNumber(item)) {
settings.SetInt(item->string, item->valueint);
if (settings.GetInt(item->string) != item->valueint) {
settings.SetInt(item->string, item->valueint);
}
}
}
has_websocket_config_ = true;