reboot reason (#1154)

This commit is contained in:
openshwprojects
2024-03-28 16:22:02 +01:00
committed by GitHub
parent eaaa3848b0
commit 52aba73a5f

View File

@ -811,6 +811,19 @@ typedef enum {
char reason[26];
bl_sys_rstinfo_getsting(reason);
hprintf255(request, "<h5>Reboot reason: %s</h5>", reason);
#elif PLATFORM_LN882H
// type is chip_reboot_cause_t
g_rebootReason = ln_chip_get_reboot_cause();
{
const char* s = "Unk";
if (g_rebootReason == 0)
s = "Pwr";
else if (g_rebootReason == 1)
s = "Soft";
else if (g_rebootReason == 2)
s = "Wdt";
hprintf255(request, "<h5>Reboot reason: %i - %s</h5>", g_rebootReason, s);
}
#endif
if (CFG_GetMQTTHost()[0] == 0) {
hprintf255(request, "<h5>MQTT State: not configured<br>");