Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
co2ampel
ampel-firmware
Commits
62016309
Commit
62016309
authored
4 years ago
by
Eric Duminil
Browse files
Options
Download
Email Patches
Plain Diff
Adding poor_air_quality_ppm constant.
parent
14c90bc9
master
develop
experimental/example_for_iotwebconf
senseair_s8
v0.3.0
v0.2.3
v0.2.2
v0.2.1
v0.2.0
v0.1.0
archive/refactor/src_structure
archive/experimental/wifimanager
archive/experimental/simple
archive/experimental/save_lora_session
archive/experimental/save_config
archive/experimental/ota
archive/experimental/binary_clock
archive/experimental/autoconnect
archive/dev/debugcalib
archive/debug/loop_too_fast
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ampel-firmware/led_effects.cpp
+2
-1
ampel-firmware/led_effects.cpp
with
2 additions
and
1 deletion
+2
-1
ampel-firmware/led_effects.cpp
+
2
-
1
View file @
62016309
...
@@ -11,6 +11,7 @@ namespace config {
...
@@ -11,6 +11,7 @@ namespace config {
#endif
#endif
const
uint8_t
brightness_amplitude
=
config
::
max_brightness
-
config
::
min_brightness
;
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
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.
//NOTE: Use a class instead? NightMode could then be another state.
bool
night_mode
=
false
;
bool
night_mode
=
false
;
}
}
...
@@ -138,7 +139,7 @@ namespace led_effects {
...
@@ -138,7 +139,7 @@ namespace led_effects {
+
pixels
.
sine8
(
breathing_offset
)
*
config
::
brightness_amplitude
/
255
;
+
pixels
.
sine8
(
breathing_offset
)
*
config
::
brightness_amplitude
/
255
;
pixels
.
setBrightness
(
brightness
);
pixels
.
setBrightness
(
brightness
);
pixels
.
show
();
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.
}
}
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets