diff --git a/RemoteIDModule/status.cpp b/RemoteIDModule/status.cpp index 11ebd5a..e53ae0b 100644 --- a/RemoteIDModule/status.cpp +++ b/RemoteIDModule/status.cpp @@ -190,11 +190,13 @@ String status_json(void) const uint32_t sec = now_s % 60; const uint32_t min = (now_s / 60) % 60; const uint32_t hr = (now_s / 3600) % 24; + char minsec_str[6] {}; // HOUR does not include. Because wired powered drones allow for longer flight times. + snprintf(minsec_str, sizeof(minsec_str), "%02d:%02d", min, sec); char githash[20]; snprintf(githash, sizeof(githash), "(%08x)", GIT_VERSION); const json_table_t table[] = { { "STATUS:VERSION", String(FW_VERSION_MAJOR) + "." + String(FW_VERSION_MINOR) + " " + githash}, - { "STATUS:UPTIME", String(hr) + ":" + String(min) + ":" + String(sec) }, + { "STATUS:UPTIME", String(hr) + ":" + String(minsec_str) }, { "STATUS:FREEMEM", String(ESP.getFreeHeap()) }, { "BASICID:UAType", ENUM_MAP(uatype, UAS_data.BasicID[0].UAType) }, { "BASICID:IDType", ENUM_MAP(idtype, UAS_data.BasicID[0].IDType) },