Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Käppler
ampel-firmware
Commits
fe8c9332
Commit
fe8c9332
authored
Jan 08, 2021
by
Eric Duminil
Browse files
Show uptime days on webserver
parent
96d095f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/web_server.cpp
View file @
fe8c9332
...
...
@@ -113,7 +113,7 @@ namespace web_server {
"<tr><td>Free heap space</td><td>%6d bytes</td></tr>
\n
"
"<tr><td>Max loop duration</td><td>%5d ms</td></tr>
\n
"
"<tr><td>Board</td><td>%s</td></tr>
\n
"
"<tr><td>Uptime</td><td>%4d h %02d min %02d s</td></tr>
\n
"
"<tr><td>Uptime</td><td>
%2d d
%4d h %02d min %02d s</td></tr>
\n
"
"</table>
\n
"
"<div id='log' class='pure-u-1 pure-u-md-1-2'></div>
\n
"
#ifdef AMPEL_CSV
...
...
@@ -198,6 +198,8 @@ namespace web_server {
}
unsigned
long
ss
=
seconds
();
uint8_t
dd
=
ss
/
86400
;
ss
-=
dd
*
86400
;
unsigned
int
hh
=
ss
/
3600
;
ss
-=
hh
*
3600
;
uint8_t
mm
=
ss
/
60
;
...
...
@@ -232,7 +234,7 @@ namespace web_server {
config
::
lorawan_sending_interval
,
#endif
config
::
temperature_offset
,
SENSOR_ID
.
c_str
(),
SENSOR_ID
.
c_str
(),
WiFi
.
localIP
().
toString
().
c_str
(),
WiFi
.
localIP
().
toString
().
c_str
(),
get_free_heap_size
(),
max_loop_duration
,
BOARD
,
hh
,
mm
,
ss
);
WiFi
.
localIP
().
toString
().
c_str
(),
get_free_heap_size
(),
max_loop_duration
,
BOARD
,
dd
,
hh
,
mm
,
ss
);
http
.
sendContent
(
content
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment