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
b1023818
Commit
b1023818
authored
Jan 09, 2021
by
Eric Duminil
Browse files
Notes
parent
e3af69a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/ampel-firmware.ino
View file @
b1023818
...
...
@@ -76,7 +76,6 @@ void setup() {
Serial
.
println
(
BOARD
);
#ifdef AMPEL_WIFI
// Try to connect to Wi-Fi
WiFiConnect
(
SENSOR_ID
);
Serial
.
print
(
F
(
"WiFi STATUS: "
));
...
...
@@ -126,7 +125,7 @@ void loop() {
}
#endif
//NOTE: Loop should never take more than 1000ms. Split in smaller methods and logic if needed.
//
TODO: Restart every day or week, in order to not let t0 overflow?
//
NOTE: Only use millis() for duration comparison, not timestamps comparison. Otherwise, problems happen when millis roll over.
uint32_t
t0
=
millis
();
keepServicesAlive
();
...
...
ampel-firmware/util.h
View file @
b1023818
...
...
@@ -36,6 +36,7 @@ namespace util {
}
}
//NOTE: Only use seconds() for duration comparison, not timestamps comparison. Otherwise, problems happen when millis roll over.
#define seconds() (millis() / 1000UL)
extern
uint32_t
max_loop_duration
;
const
extern
String
SENSOR_ID
;
...
...
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