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
62016309
Commit
62016309
authored
Apr 15, 2021
by
Eric Duminil
Browse files
Adding poor_air_quality_ppm constant.
parent
14c90bc9
Changes
1
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/led_effects.cpp
View file @
62016309
...
...
@@ -11,6 +11,7 @@ namespace config {
#endif
const
uint8_t
brightness_amplitude
=
config
::
max_brightness
-
config
::
min_brightness
;
const
int
kitt_tail
=
3
;
// How many dimmer LEDs follow in K.I.T.T. wheel
const
uint16_t
poor_air_quality_ppm
=
1600
;
// Above this threshold, LED breathing effect is faster.
//NOTE: Use a class instead? NightMode could then be another state.
bool
night_mode
=
false
;
}
...
...
@@ -138,7 +139,7 @@ namespace led_effects {
+
pixels
.
sine8
(
breathing_offset
)
*
config
::
brightness_amplitude
/
255
;
pixels
.
setBrightness
(
brightness
);
pixels
.
show
();
breathing_offset
+=
co2
>
1600
?
6
:
3
;
// breathing speed. +3 looks like slow human breathing.
breathing_offset
+=
co2
>
config
::
poor_air_quality_ppm
?
6
:
3
;
// breathing speed. +3 looks like slow human breathing.
}
...
...
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