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
d354b2c0
Commit
d354b2c0
authored
Mar 22, 2022
by
Eric Duminil
Browse files
Compiles again. Not working yet
parent
a4e0fed5
Changes
1
Show whitespace changes
Inline
Side-by-side
ampel-firmware/co2_sensor.cpp
View file @
d354b2c0
...
...
@@ -226,9 +226,11 @@ namespace sensor {
* Returns true if fresh data is available, for further processing (e.g. MQTT, CSV or LoRa)
*/
bool
processData
()
{
bool
freshData
=
scd30
.
dataAvailable
();
static
unsigned
long
last_measurement
=
0
;
unsigned
long
now
=
seconds
();
bool
freshData
=
now
-
last_measurement
>
config
::
measurement_timestep
;
if
(
freshData
)
{
last_measurement
=
now
;
ntp
::
getLocalTime
(
timestamp
);
co2
=
sensor_S8
->
get_co2
();
temperature
=
0.0
;
...
...
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