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
87a72e3c
Commit
87a72e3c
authored
Feb 11, 2022
by
Eric Duminil
Browse files
1970.1.1 -> 2022.1.1
parent
1df16ce6
Pipeline
#5794
passed with stage
in 2 minutes and 32 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/ampel-firmware.ino
View file @
87a72e3c
...
...
@@ -171,7 +171,6 @@ void loop() {
if
(
sensor
::
processData
())
{
if
(
config
::
csv_active
())
{
//TODO: Check if not in AP mode. Lines get written with 1970 otherwise.
csv_writer
::
logIfTimeHasCome
(
sensor
::
timestamp
,
sensor
::
co2
,
sensor
::
temperature
,
sensor
::
humidity
);
}
...
...
ampel-firmware/src/lib/NTPClient/NTPClient.h
View file @
87a72e3c
...
...
@@ -20,7 +20,7 @@ class NTPClient {
unsigned
long
_updateInterval
=
60000
;
// In ms
unsigned
long
_currentEpoc
=
0
;
// In s
unsigned
long
_currentEpoc
=
1640995200
;
// NOTE: Custom code for ampel-firmware : Default is 1st January 2020. Better than 1970
unsigned
long
_lastUpdate
=
0
;
// In ms
byte
_packetBuffer
[
NTP_PACKET_SIZE
];
...
...
ampel-firmware/web_config.cpp
View file @
87a72e3c
...
...
@@ -127,7 +127,6 @@ namespace web_config {
* NTP Time
*/
//NOTE: Save time after first NTP connection, so that time doesn't go back to 1970?
ParameterGroup
timeParams
=
ParameterGroup
(
"NTP"
,
"Time server"
);
TextTParameter
<
STRING_LEN
>
ntpServerParam
=
Builder
<
TextTParameter
<
STRING_LEN
>>
(
"ntp_server"
).
label
(
"NTP Server"
).
defaultValue
(
NTP_SERVER
).
build
();
...
...
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