diff --git a/src/main/fc/fc_msp.c b/src/main/fc/fc_msp.c index 81a74c5e4..53d17e493 100755 --- a/src/main/fc/fc_msp.c +++ b/src/main/fc/fc_msp.c @@ -214,8 +214,7 @@ static void serializeNames(sbuf_t *dst, const char *s) static const box_t *findBoxByActiveBoxId(uint8_t activeBoxId) { - uint8_t boxIndex; - for (boxIndex = 0; boxIndex < sizeof(boxes) / sizeof(box_t); boxIndex++) { + for (uint8_t boxIndex = 0; boxIndex < sizeof(boxes) / sizeof(box_t); boxIndex++) { const box_t *candidate = &boxes[boxIndex]; if (candidate->boxId == activeBoxId) { return candidate; @@ -226,8 +225,7 @@ static const box_t *findBoxByActiveBoxId(uint8_t activeBoxId) static const box_t *findBoxByPermenantId(uint8_t permenantId) { - uint8_t boxIndex; - for (boxIndex = 0; boxIndex < sizeof(boxes) / sizeof(box_t); boxIndex++) { + for (uint8_t boxIndex = 0; boxIndex < sizeof(boxes) / sizeof(box_t); boxIndex++) { const box_t *candidate = &boxes[boxIndex]; if (candidate->permanentId == permenantId) { return candidate; diff --git a/src/main/io/ledstrip.c b/src/main/io/ledstrip.c index 5d2c93dcd..a67db84ff 100644 --- a/src/main/io/ledstrip.c +++ b/src/main/io/ledstrip.c @@ -608,23 +608,23 @@ static void applyLedRssiLayer(bool updateNow, timeUs_t *timer) if (updateNow) { int state = (rssi * 100) / 1023; - if (state > 50) { - flash = true; - timerDelay = HZ_TO_US(1); - } else if (state > 20) { - flash = !flash; - timerDelay = HZ_TO_US(2); - } else { - flash = !flash; - timerDelay = HZ_TO_US(8); - } + if (state > 50) { + flash = true; + timerDelay = HZ_TO_US(1); + } else if (state > 20) { + flash = !flash; + timerDelay = HZ_TO_US(2); + } else { + flash = !flash; + timerDelay = HZ_TO_US(8); + } } *timer += timerDelay; if (!flash) { - hsvColor_t *bgc = getSC(LED_SCOLOR_BACKGROUND); - applyLedHsv(LED_MOV_FUNCTION(LED_FUNCTION_RSSI), bgc); + hsvColor_t *bgc = getSC(LED_SCOLOR_BACKGROUND); + applyLedHsv(LED_MOV_FUNCTION(LED_FUNCTION_RSSI), bgc); } }