forked from Archive/PX4-Autopilot
RGB led driver: More retries on boot
This commit is contained in:
parent
eb28aa6cfe
commit
8071186e37
|
@ -181,12 +181,18 @@ RGBLED::probe()
|
||||||
to be enough, as the 3rd one consistently fails if no
|
to be enough, as the 3rd one consistently fails if no
|
||||||
RGBLED is on the bus.
|
RGBLED is on the bus.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
unsigned prevretries = _retries;
|
||||||
|
_retries = 4;
|
||||||
|
|
||||||
if ((ret=get(on, powersave, r, g, b)) != OK ||
|
if ((ret=get(on, powersave, r, g, b)) != OK ||
|
||||||
(ret=send_led_enable(false) != OK) ||
|
(ret=send_led_enable(false) != OK) ||
|
||||||
(ret=send_led_enable(false) != OK)) {
|
(ret=send_led_enable(false) != OK)) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_retries = prevretries;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue