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
dcc33bfa
Commit
dcc33bfa
authored
Apr 24, 2021
by
Eric Duminil
Browse files
co2_sensor: Replace (if + switch) with switch.
parent
ea4f090d
Changes
1
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/co2_sensor.cpp
View file @
dcc33bfa
...
...
@@ -204,8 +204,8 @@ namespace sensor {
case
BOOTUP
:
led_effects
::
showWaitingLED
(
color
::
blue
);
break
;
// No special signaling, we want to show the CO2 value
case
READY
:
displayCO2OnLedRing
();
break
;
case
NEEDS_CALIBRATION
:
led_effects
::
showWaitingLED
(
color
::
magenta
);
...
...
@@ -261,12 +261,7 @@ namespace sensor {
logToSerial
();
}
// We need to show LED effects for "old" data, too, as long as we get new data.
if
(
current_state
==
READY
)
{
displayCO2OnLedRing
();
}
else
{
showState
();
}
showState
();
return
freshData
;
}
...
...
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