1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-26 09:45:37 +03:00

Fixed whitespace

This commit is contained in:
DrClaes 2017-05-27 10:38:57 +02:00 committed by GitHub
parent 7566e41550
commit d22b32d969

View file

@ -178,7 +178,6 @@ void pgResetFn_ledStripConfig(ledStripConfig_t *ledStripConfig)
} }
static int scaledThrottle; static int scaledThrottle;
//static int scaledAux;
static int auxInput; static int auxInput;
static void updateLedRingCounts(void); static void updateLedRingCounts(void);
@ -487,9 +486,10 @@ static void applyLedFixedLayers()
break; break;
} }
if (ledGetOverlayBit(ledConfig, LED_OVERLAY_THROTTLE)) { //smooth fade with selected Aux channel of all HSV values from previousColor through color to nextColor if (ledGetOverlayBit(ledConfig, LED_OVERLAY_THROTTLE)) //smooth fade with selected Aux channel of all HSV values from previousColor through color to nextColor
int centerPWM = (PWM_RANGE_MIN + PWM_RANGE_MAX) / 2; {
if (auxInput < centerPWM) //if below average int centerPWM = (PWM_RANGE_MIN + PWM_RANGE_MAX) / 2;
if (auxInput < centerPWM)
{ {
color.h = scaleRange(auxInput, PWM_RANGE_MIN, centerPWM, previousColor.h, color.h); color.h = scaleRange(auxInput, PWM_RANGE_MIN, centerPWM, previousColor.h, color.h);
color.s = scaleRange(auxInput, PWM_RANGE_MIN, centerPWM, previousColor.s, color.s); color.s = scaleRange(auxInput, PWM_RANGE_MIN, centerPWM, previousColor.s, color.s);
@ -500,13 +500,10 @@ static void applyLedFixedLayers()
color.h = scaleRange(auxInput, centerPWM, PWM_RANGE_MAX, color.h, nextColor.h); color.h = scaleRange(auxInput, centerPWM, PWM_RANGE_MAX, color.h, nextColor.h);
color.s = scaleRange(auxInput, centerPWM, PWM_RANGE_MAX, color.s, nextColor.s); color.s = scaleRange(auxInput, centerPWM, PWM_RANGE_MAX, color.s, nextColor.s);
color.v = scaleRange(auxInput, centerPWM, PWM_RANGE_MAX, color.v, nextColor.v); color.v = scaleRange(auxInput, centerPWM, PWM_RANGE_MAX, color.v, nextColor.v);
} }
} }
color.h = (color.h + hOffset) % (HSV_HUE_MAX + 1); color.h = (color.h + hOffset) % (HSV_HUE_MAX + 1);
setLedHsv(ledIndex, &color); setLedHsv(ledIndex, &color);
} }
} }