Allow thrust color to be combined with throttle.

This commit is contained in:
Dominic Clifton 2015-02-01 18:32:14 +00:00
parent 0fd7a2568c
commit 5512ff08c3
2 changed files with 2 additions and 2 deletions

View File

@ -178,7 +178,7 @@ Note: Armed State cannot be used with Flight Mode.
This mode fades the LED current LED color to the previous/next color in the HSB color space depending on throttle stick position. When the
throttle is in the middle position the color is unaffected, thus it can be mixed with orientation colors to indicate orientation and throttle at
the same time.
the same time. Thrust should normally be combined with Color or Mode/Orientation.
#### Thrust ring state

View File

@ -771,7 +771,7 @@ void applyLedThrottleLayer()
int scaled = scaleRange(rcData[THROTTLE], PWM_RANGE_MIN, PWM_RANGE_MAX, -60, +60);
scaled += HSV_HUE_MAX;
color.h = scaled % HSV_HUE_MAX;
color.h = (color.h + scaled) % HSV_HUE_MAX;
setLedHsv(ledIndex, &color);
}
}