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
9b764da9
Commit
9b764da9
authored
4 years ago
by
Eric Duminil
Browse files
Options
Download
Email Patches
Plain Diff
Breathing offset
parent
efc613be
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
led_effects.cpp
+2
-2
led_effects.cpp
with
2 additions
and
2 deletions
+2
-2
led_effects.cpp
+
2
-
2
View file @
9b764da9
...
...
@@ -176,10 +176,10 @@ namespace LedEffects {
if
(
!
config
::
night_mode
)
{
static
uint16_t
breathing_offset
=
0
;
uint16_t
brightness
=
config
::
min_brightness
+
pixels
.
sine8
(
breathing_offset
*
3
)
*
config
::
brightness_amplitude
/
255
;
+
pixels
.
sine8
(
breathing_offset
)
*
config
::
brightness_amplitude
/
255
;
pixels
.
setBrightness
(
brightness
);
pixels
.
show
();
breathing_offset
++
;
breathing_offset
+=
3
;
// breathing speed. +3 looks like slow human breathing.
}
delay
(
co2
>
1600
?
50
:
100
);
// faster breathing for higher CO2 values
}
...
...
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