diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2015-02-14 20:33:59 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-02-15 19:52:01 +0100 |
commit | 8071186e3758da7f0bee0414dee49fed4308be53 (patch) | |
tree | 8ea15a55f7be23cd349b4296d973ab550b0f2d3a /src/drivers/rgbled/rgbled.cpp | |
parent | eb28aa6cfe3450b0ea7454ef193f58f62c798e72 (diff) | |
download | px4-firmware-8071186e3758da7f0bee0414dee49fed4308be53.tar.gz px4-firmware-8071186e3758da7f0bee0414dee49fed4308be53.tar.bz2 px4-firmware-8071186e3758da7f0bee0414dee49fed4308be53.zip |
RGB led driver: More retries on boot
Diffstat (limited to 'src/drivers/rgbled/rgbled.cpp')
-rw-r--r-- | src/drivers/rgbled/rgbled.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/drivers/rgbled/rgbled.cpp b/src/drivers/rgbled/rgbled.cpp index cce38368a..1e38a766e 100644 --- a/src/drivers/rgbled/rgbled.cpp +++ b/src/drivers/rgbled/rgbled.cpp @@ -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; } |