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
cb0e7307
Commit
cb0e7307
authored
Feb 19, 2021
by
Eric Duminil
Browse files
More debugging
parent
8dd70ec1
Changes
1
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/co2_sensor.cpp
View file @
cb0e7307
...
...
@@ -39,6 +39,7 @@ namespace sensor {
* SDA --- SDA (GPIO21) //NOTE: GPIO1 would be more convenient (right next to GPO3)
*/
#endif
scd30
.
enableDebugging
();
// CO2
if
(
scd30
.
begin
(
config
::
auto_calibrate_sensor
)
==
false
)
{
...
...
@@ -68,6 +69,38 @@ namespace sensor {
Serial
.
print
(
F
(
"Auto-calibration is "
));
Serial
.
println
(
config
::
auto_calibrate_sensor
?
"ON."
:
"OFF."
);
Serial
.
println
(
"----------------------------------------"
);
uint16_t
settingVal
;
// The settings will be returned in settingVal
if
(
scd30
.
getForcedRecalibration
(
&
settingVal
))
{
Serial
.
print
(
F
(
"Forced recalibration factor (ppm) is "
));
Serial
.
println
(
settingVal
);
}
if
(
scd30
.
getMeasurementInterval
(
&
settingVal
))
{
Serial
.
print
(
F
(
"Measurement interval (s) is "
));
Serial
.
println
(
settingVal
);
}
if
(
scd30
.
getTemperatureOffset
(
&
settingVal
))
{
Serial
.
print
(
F
(
"Temperature offset (C) is "
));
Serial
.
println
(((
float
)
settingVal
)
/
100.0
,
2
);
}
if
(
scd30
.
getAltitudeCompensation
(
&
settingVal
))
{
Serial
.
print
(
F
(
"Altitude offset (m) is "
));
Serial
.
println
(
settingVal
);
}
if
(
scd30
.
getFirmwareVersion
(
&
settingVal
))
{
Serial
.
print
(
"Firmware version is 0x"
);
Serial
.
println
(
settingVal
,
HEX
);
}
Serial
.
print
(
F
(
"Auto calibration set to "
));
Serial
.
println
(
scd30
.
getAutoSelfCalibration
()
?
"true"
:
"false"
);
Serial
.
println
(
"----------------------------------------"
);
}
//NOTE: should timer deviation be used to adjust measurement_timestep?
...
...
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