fix rc debug and ir logic

This commit is contained in:
2024-10-01 22:34:01 +03:00
parent 6c3af6fbb5
commit 839da85dfe
11 changed files with 154 additions and 91 deletions

View File

@ -228,12 +228,10 @@ void led_progressbar_(uint8_t fromLed, uint8_t toLed, uint8_t progress, void (*l
ledBlinkInfo[ledIndex].count = 0;
if (i < ledsToLight) {
// Включаем светодиод, если он не включен
if (!led_getState(ledMap.ALL[ledIndex])) {
led_writeFunc(ledIndex, 1); // Используем переданную функцию для включения
}
} else {
// Выключаем светодиод, если он включен
if (led_getState(ledMap.ALL[ledIndex])) {
led_writeFunc(ledIndex, 0); // Используем переданную функцию для выключения
}
@ -270,6 +268,7 @@ void led_PingPong_start(uint8_t fromLed, uint8_t toLed) {
ledPingPongInfo.writeCallback = led_write;
led_PingPong_start_(fromLed, toLed);
}
void led_PingPong_start_(uint8_t fromLed, uint8_t toLed){
if (fromLed < toLed) {
ledPingPongInfo.start = fromLed;