Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
co2ampel
ampel-firmware
Commits
a5807d86
Commit
a5807d86
authored
May 10, 2021
by
Eric Duminil
Browse files
Adding firmware version
parent
793734a6
Pipeline
#3644
passed with stage
in 1 minute and 52 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/ampel-firmware.ino
View file @
a5807d86
...
...
@@ -67,14 +67,17 @@ void setup() {
pinMode
(
0
,
INPUT
);
// Flash button (used for forced calibration)
led_effects
::
setupRing
();
sensor
::
initialize
();
Serial
.
println
();
Serial
.
print
(
F
(
"Sensor ID: "
));
Serial
.
println
(
ampel
.
sensorId
);
Serial
.
print
(
F
(
"Board : "
));
Serial
.
println
(
ampel
.
board
);
Serial
.
print
(
F
(
"Firmware : "
));
Serial
.
println
(
ampel
.
version
);
led_effects
::
setupRing
();
sensor
::
initialize
();
#ifdef AMPEL_CSV
csv_writer
::
initialize
(
ampel
.
sensorId
);
...
...
ampel-firmware/util.h
View file @
a5807d86
...
...
@@ -38,6 +38,7 @@ class Ampel {
private:
static
void
showFreeSpace
();
public:
const
char
*
version
=
"v0.1.0"
;
// Update manually after significant changes.
const
char
*
board
;
const
char
*
sensorId
;
uint32_t
max_loop_duration
;
...
...
ampel-firmware/web_server.cpp
View file @
a5807d86
...
...
@@ -115,6 +115,7 @@ namespace web_server {
"<tr><td>Largest heap block</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>Ampel firmware</td><td>%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
"
...
...
@@ -239,7 +240,7 @@ namespace web_server {
#endif
config
::
temperature_offset
,
config
::
auto_calibrate_sensor
?
"Yes"
:
"No"
,
ampel
.
sensorId
,
ampel
.
sensorId
,
wifi
::
local_ip
,
wifi
::
local_ip
,
ESP
.
getFreeHeap
(),
esp_get_max_free_block_size
(),
ampel
.
max_loop_duration
,
ampel
.
board
,
dd
,
hh
,
mm
,
ss
);
ampel
.
board
,
ampel
.
version
,
dd
,
hh
,
mm
,
ss
);
// Serial.print(F(" - Body size : "));
// Serial.print(strlen(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