Fix freeze if LED 0 is color only

This commit is contained in:
gaelj 2016-06-26 02:17:10 +02:00
parent aab0a56068
commit f8906956ad
1 changed files with 2 additions and 2 deletions

View File

@ -349,7 +349,7 @@ STATIC_UNIT_TESTED void updateLedCount(void)
for (int ledIndex = 0; ledIndex < LED_MAX_STRIP_LENGTH; ledIndex++) {
const ledConfig_t *ledConfig = &masterConfig.ledConfigs[ledIndex];
if (!(*ledConfig & (LED_POS_MASK | LED_FUNCTION_MASK | LED_OVERLAY_MASK)))
if (!(*ledConfig))
break;
count++;
@ -608,7 +608,7 @@ static void applyLedFixedLayers()
switch (fn) {
case LED_FUNCTION_COLOR:
color = *&masterConfig.colors[ledGetColor(ledConfig)];
color = masterConfig.colors[ledGetColor(ledConfig)];
break;
case LED_FUNCTION_FLIGHT_MODE: