fix: reset_reason aus system/info entfernen

Das Feld lieferte ohnehin nur den festen String "unknown" - kein SDK-Aufruf
lieferte je einen echten Reset-Grund. README/hardware-checklist erwähnten
es nicht.
This commit is contained in:
Michael Sauer
2026-09-12 00:57:08 +02:00
parent bf8f76ecc3
commit e5145626b0
2 changed files with 1 additions and 2 deletions
-1
View File
@@ -245,7 +245,6 @@ static void handle_info(const nl_api_ctx_t *ctx, nl_api_response_t *resp)
cJSON_AddNullToObject(w, "error");
cJSON_AddNumberToObject(o, "uptime", in.uptime_s);
cJSON_AddNumberToObject(o, "free_heap", in.free_heap);
cJSON_AddStringToObject(o, "reset_reason", "unknown");
if (in.last_ota_error)
cJSON_AddStringToObject(o, "last_ota_error", in.last_ota_error);
else
+1 -1
View File
@@ -207,7 +207,7 @@ static void test_info_is_open(void)
TEST_ASSERT_TRUE(cJSON_IsNull(cJSON_GetObjectItem(w, "error")));
TEST_ASSERT_EQUAL_INT(123, field("uptime")->valueint);
TEST_ASSERT_EQUAL_INT(40000, field("free_heap")->valueint);
TEST_ASSERT_EQUAL_STRING("unknown", cJSON_GetStringValue(field("reset_reason")));
TEST_ASSERT_NULL(cJSON_GetObjectItem(doc, "reset_reason"));
TEST_ASSERT_TRUE(cJSON_IsNull(field("last_ota_error")));
}