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
95eb0555
Commit
95eb0555
authored
Jul 08, 2021
by
Eric Duminil
Browse files
LED effects: Updated ppms for 16 LEDs
parent
f4b28201
Pipeline
#4540
passed with stage
in 1 minute and 46 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/led_effects.cpp
View file @
95eb0555
...
...
@@ -24,13 +24,13 @@ namespace config {
//NOTE: One value has been prepended, to make calculations easier and avoid out of bounds index.
const
uint16_t
co2_ticks
[
led_count
+
1
]
=
{
0
,
500
,
600
,
700
,
800
,
900
,
1000
,
1200
,
1400
,
1600
,
1800
,
2000
,
2200
};
// [ppm]
// For a given LED, which color should be displayed? First LED will be pure green (hue angle 120°),
//
last 4 LEDs
will be pure red (hue angle 0°), LEDs in-between will be yellowish.
//
LEDs >= 1600ppm
will be pure red (hue angle 0°), LEDs in-between will be yellowish.
const
uint16_t
led_hues
[
led_count
]
=
{
21845U
,
19114U
,
16383U
,
13653U
,
10922U
,
8191U
,
5461U
,
2730U
,
0
,
0
,
0
,
0
};
// [hue angle]
#elif LED_COUNT == 16
const
uint16_t
co2_ticks
[
led_count
+
1
]
=
{
0
,
400
,
500
,
600
,
700
,
800
,
900
,
1000
,
1100
,
1200
,
1300
,
1400
,
1500
,
1600
,
1800
,
2000
,
2200
};
// [ppm]
const
uint16_t
led_hues
[
led_count
]
=
{
21845U
,
20024U
,
18204U
,
16383U
,
14563U
,
12742
U
,
10
92
2
U
,
9102
U
,
7281U
,
5461
U
,
3
640
U
,
1
820
U
,
0
,
0
,
0
,
0
};
// [hue angle]
const
uint16_t
co2_ticks
[
led_count
+
1
]
=
{
0
,
500
,
600
,
700
,
800
,
900
,
1000
,
1100
,
1200
,
1300
,
1400
,
1500
,
1600
,
1700
,
1800
,
2000
,
2200
};
// [ppm]
const
uint16_t
led_hues
[
led_count
]
=
{
21845U
,
19859U
,
17873U
,
15887U
,
13901U
,
11915
U
,
9
92
9
U
,
7943
U
,
5957
U
,
3
971
U
,
1
985
U
,
0
,
0
,
0
,
0
,
0
};
// [hue angle]
#else
# error "Only 12 and 16 LEDs rings are currently supported."
#endif
...
...
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