Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Käppler
ampel-firmware
Commits
100a9b31
Commit
100a9b31
authored
Apr 29, 2021
by
Käppler
Browse files
s/_timestep_accl/_timestep_bootup/
parent
437ea45f
Changes
1
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/co2_sensor.cpp
View file @
100a9b31
...
...
@@ -3,7 +3,7 @@
namespace
config
{
// Values should be defined in config.h
uint16_t
measurement_timestep
=
MEASUREMENT_TIMESTEP
;
// [s] Value between 2 and 1800 (range for SCD30 sensor)
const
uint16_t
measurement_timestep_
accl
=
2
;
// [s] Measurement timestep during acclimatization
const
uint16_t
measurement_timestep_
bootup
=
2
;
// [s] Measurement timestep during acclimatization
const
uint16_t
altitude_above_sea_level
=
ALTITUDE_ABOVE_SEA_LEVEL
;
// [m]
uint16_t
co2_calibration_level
=
ATMOSPHERIC_CO2_CONCENTRATION
;
// [ppm]
int8_t
max_deviation_during_calibration
=
30
;
// [ppm]
...
...
@@ -103,9 +103,9 @@ namespace sensor {
//NOTE: The timer seems to be inaccurate, though, possibly depending on voltage. Should it be offset?
Serial
.
println
();
Serial
.
print
(
F
(
"Setting SCD30 timestep to "
));
Serial
.
print
(
config
::
measurement_timestep_
accl
);
Serial
.
print
(
config
::
measurement_timestep_
bootup
);
Serial
.
println
(
" s during acclimatization."
);
scd30
.
setMeasurementInterval
(
config
::
measurement_timestep_
accl
);
// [s]
scd30
.
setMeasurementInterval
(
config
::
measurement_timestep_
bootup
);
// [s]
sensor_console
::
defineIntCommand
(
"co2"
,
setCO2forDebugging
,
F
(
" 1500 (Sets co2 level, for debugging purposes)"
));
sensor_console
::
defineIntCommand
(
"timer"
,
setTimer
,
F
(
" 30 (Sets measurement interval, in s)"
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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