Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Käppler
ampel-firmware
Commits
b28542b7
Commit
b28542b7
authored
Dec 20, 2020
by
Eric Duminil
Browse files
MQTT calibrate or calibrate to X PPM
parent
917f78a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
mqtt.cpp
View file @
b28542b7
...
...
@@ -86,7 +86,7 @@ namespace mqtt {
LedEffects
::
showKITTWheel
(
color
::
green
,
1
);
}
void
calibrateSensor
(
String
messageString
)
{
void
calibrateSensor
ToSpecificPPM
(
String
messageString
)
{
messageString
.
replace
(
"calibrate "
,
""
);
long
int
calibrationLevel
=
messageString
.
toInt
();
if
(
calibrationLevel
>=
400
&&
calibrationLevel
<=
2000
)
{
...
...
@@ -143,9 +143,10 @@ namespace mqtt {
setCO2forDebugging
(
messageString
);
}
else
if
(
messageString
.
startsWith
(
"timer "
))
{
setTimer
(
messageString
);
}
else
if
(
messageString
==
"calibrate"
)
{
sensor
::
startCalibrationProcess
();
}
else
if
(
messageString
.
startsWith
(
"calibrate "
))
{
calibrateSensor
(
messageString
);
// config::atmospheric_co2_concentration
calibrateSensorToSpecificPPM
(
messageString
);
}
else
if
(
messageString
.
startsWith
(
"mqtt "
))
{
setMQTTinterval
(
messageString
);
}
else
if
(
messageString
.
startsWith
(
"csv "
))
{
...
...
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