Skip to content

Commit

Permalink
info page: add time
Browse files Browse the repository at this point in the history
  • Loading branch information
PSandro committed Aug 29, 2023
1 parent d1b00ba commit a79c9d5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions wled00/data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,7 @@ ${i.opt&0x100?inforow("Debug","<button class=\"btn btn-xs\" onclick=\"requestJso
${inforow("Build",i.vid)}
${inforow("Signal strength",i.wifi.signal +"% ("+ i.wifi.rssi, " dBm)")}
${inforow("Uptime",getRuntimeStr(i.uptime))}
${inforow("Current local time",i.time)}
${inforow("Free heap",heap," kB")}
${i.psram?inforow("Free PSRAM",(i.psram/1024).toFixed(1)," kB"):""}
${inforow("Estimated current",pwru)}
Expand Down
1 change: 1 addition & 0 deletions wled00/data/simple.js
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@ ${urows}
${inforow("Build",i.vid)}
${inforow("Signal strength",i.wifi.signal +"% ("+ i.wifi.rssi, " dBm)")}
${inforow("Uptime",getRuntimeStr(i.uptime))}
${inforow("Current local time",i.time)}
${inforow("Free heap",heap," kB")}
${i.psram?inforow("Free PSRAM",(i.psram/1024).toFixed(1)," kB"):""}
${inforow("Estimated current",pwru)}
Expand Down
4 changes: 4 additions & 0 deletions wled00/json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,10 @@ void serializeInfo(JsonObject root)
#endif
root[F("uptime")] = millis()/1000 + rolloverMillis*4294967;

char time[32];
getTimeString(time);
root[F("time")] = time;

usermods.addToJsonInfo(root);

uint16_t os = 0;
Expand Down

0 comments on commit a79c9d5

Please sign in to comment.