rgbled: don't try the same bus twice

on PX4v1 the external I2C bus is the same as the LED bus
This commit is contained in:
Andrew Tridgell 2013-10-19 15:21:46 +11:00 committed by Lorenz Meier
parent e3fe443720
commit 14e2464fab
1 changed files with 3 additions and 0 deletions

View File

@ -616,6 +616,9 @@ rgbled_main(int argc, char *argv[])
if (g_rgbled == nullptr) {
// fall back to default bus
if (PX4_I2C_BUS_LED == PX4_I2C_BUS_EXPANSION) {
errx(1, "init failed");
}
i2cdevice = PX4_I2C_BUS_LED;
}
}