mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-03 06:01:36 +08:00
RGB led driver: More retries on boot
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user