Correct function to work with analogWrite
This commit is contained in:
parent
d315c10fb0
commit
cec20bdb4d
@ -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--;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user