PATTERN_END
};
-pattern_t on1_pattern [] = {
- { 1, D_8 },
- PATTERN_END
-};
-
-static pattern_t on2_pattern [] = {
- { 2, D_8 },
- PATTERN_END
-};
-
-static pattern_t on3_pattern [] = {
- { 3, D_8 },
- PATTERN_END
-};
-
static pattern_t brake_pattern [] = {
{ 4, D_2 },
{ 3, D_8 },
PATTERN_END
};
-static pattern_t normal2_pattern[] = {
- { 2, D_1 },
- { 0, D_1 },
- { 2, D_1 },
- { 0, D_8 },
- { 1, D_1 },
- { 0, D_1 },
- { 1, D_1 },
- { 0, D_8 },
- PATTERN_END
-};
-
-static pattern_t normal3_pattern[] = {
- { 3, D_1 },
- { 0, D_1 },
- { 3, D_1 },
- { 0, D_8 },
- { 1, D_1 },
- { 0, D_1 },
- { 1, D_1 },
- { 0, D_8 },
- PATTERN_END
-};
-
-static pattern_t normal4_pattern[] = {
- { 4, D_1 },
- { 0, D_1 },
- { 4, D_1 },
- { 0, D_8 },
- { 1, D_1 },
- { 0, D_1 },
- { 1, D_1 },
- { 0, D_8 },
- PATTERN_END
-};
-
-static pattern_t slow1_pattern[] = {
- { 1, D_1 },
- { 0, D_13 },
+static pattern_t slow_pattern[] = {
+ { PWM_PAT(1, 0, 0), D_1 },
+ { PWM_PAT(0, 0, 1), D_1 },
+ { PWM_PAT(0, 0, 0), D_13 },
PATTERN_END
};
-static pattern_t slow2_pattern[] = {
- { 2, D_1 },
- { 0, D_13 },
+static pattern_t fast_pattern[] = {
+ { PWM_PAT(2, 0, 0), D_1 },
+ { PWM_PAT(0, 0, 2), D_1 },
+ { PWM_PAT(2, 0, 0), D_1 },
+ { PWM_PAT(0, 0, 2), D_1 },
+ { PWM_PAT(0, 0, 0), D_8 },
+ { PWM_PAT(1, 0, 0), D_1 },
+ { PWM_PAT(0, 0, 1), D_1 },
+ { PWM_PAT(1, 0, 0), D_1 },
+ { PWM_PAT(0, 0, 1), D_1 },
+ { PWM_PAT(0, 0, 0), D_8 },
PATTERN_END
};
-static pattern_t slow3_pattern[] = {
- { 3, D_1 },
- { 0, D_13 },
+static pattern_t night_pattern[] = {
+ { PWM_PAT(2, 0, 2), D_3 },
+ { PWM_PAT(3, 0, 0), D_8 },
+ { PWM_PAT(2, 0, 2), D_1 },
+ { PWM_PAT(3, 0, 0), D_2 },
+ { PWM_PAT(2, 0, 2), D_1 },
+ { PWM_PAT(3, 0, 0), D_8 },
PATTERN_END
};
-static pattern_t tmp1_pattern[] = {
- { PWM_PAT(3, 0, 0), D_1 },
- { PWM_PAT(0, 0, 1), D_1 },
- { PWM_PAT(3, 0, 0), D_1 },
- { PWM_PAT(0, 0, 1), D_1 },
- { PWM_PAT(0, 0, 0), D_3 },
- { PWM_PAT(0, 1, 0), D_1 },
- { PWM_PAT(0, 0, 0), D_5 },
- { PWM_PAT(1, 0, 0), D_1 },
- { PWM_PAT(0, 0, 3), D_1 },
- { PWM_PAT(1, 0, 0), D_1 },
- { PWM_PAT(0, 0, 3), D_1 },
- { PWM_PAT(0, 0, 0), D_5 },
- { PWM_PAT(0, 1, 0), D_1 },
- { PWM_PAT(0, 0, 0), D_3 },
+pattern_t on_pattern[] = {
+ { 1, D_8 },
PATTERN_END
};
pattern_t *pwmled_pattern_select()
{
- return tmp1_pattern;
-
if (battery_critical)
- return on1_pattern;
+ return slow_pattern;
if (towbar_mode)
return NULL;
return brake_pattern;
switch (ambient_zone) {
- case 0: return dim_mode ? NULL : number_pattern(2, 1);
- case 1: return dim_mode ? slow1_pattern : normal2_pattern;
- case 2: return dim_mode ? slow2_pattern : normal3_pattern;
+ case 0: return night_pattern;
+ case 1:
+ case 2:
case 3:
- default: return dim_mode ? slow3_pattern : normal4_pattern;
+ default:
+ return dim_mode ? slow_pattern : fast_pattern;
}
}
pattern_t *status_led_pattern_select()
{
if (braking)
- return on1_pattern;
+ return on_pattern;
if (buttons_setup_in_progress())
return buttons_setup_status0_pattern_select();
switch (ambient_zone) {
case 0: return dim_mode
? number_pattern(1, 1)
- : on1_pattern;
+ : on_pattern;
case 1: return dim_mode
? number_pattern(2, 1)
: number_pattern(3, 1);