Correct function to work with analogWrite

This commit is contained in:
jacob.eva 2024-07-12 15:26:24 +01:00
parent d315c10fb0
commit cec20bdb4d
No known key found for this signature in database
GPG Key ID: 0B92E083BBCCAA1E

View File

@ -238,11 +238,11 @@ void led_indicate_error(int cycles) {
bool forever = (cycles == 0) ? true : false; bool forever = (cycles == 0) ? true : false;
cycles = forever ? 1 : cycles; cycles = forever ? 1 : cycles;
while(cycles > 0) { while(cycles > 0) {
digitalWrite(pin_led_rx, HIGH); led_rx_on();
digitalWrite(pin_led_tx, LOW); led_tx_off();
delay(100); delay(100);
digitalWrite(pin_led_rx, LOW); led_rx_off();
digitalWrite(pin_led_tx, HIGH); led_tx_on();
delay(100); delay(100);
if (!forever) cycles--; if (!forever) cycles--;
} }