mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-25 16:00:37 +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
|
||||
RGBLED is on the bus.
|
||||
*/
|
||||
|
||||
unsigned prevretries = _retries;
|
||||
_retries = 4;
|
||||
|
||||
if ((ret=get(on, powersave, r, g, b)) != OK ||
|
||||
(ret=send_led_enable(false) != OK) ||
|
||||
(ret=send_led_enable(false) != OK)) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
_retries = prevretries;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user