mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 02:03:34 +08:00
Merge branch 'master' of github.com:PX4/Firmware into ekf_params
This commit is contained in:
@@ -199,15 +199,9 @@ int led_init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* the blue LED is only available on FMUv1 but not FMUv2 */
|
/* the blue LED is only available on FMUv1 but not FMUv2 */
|
||||||
#ifdef CONFIG_ARCH_BOARD_PX4FMU_V1
|
(void)ioctl(leds, LED_ON, LED_BLUE);
|
||||||
|
|
||||||
if (ioctl(leds, LED_ON, LED_BLUE)) {
|
|
||||||
warnx("Blue LED: ioctl fail\n");
|
|
||||||
return ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
/* we consider the amber led mandatory */
|
||||||
if (ioctl(leds, LED_ON, LED_AMBER)) {
|
if (ioctl(leds, LED_ON, LED_AMBER)) {
|
||||||
warnx("Amber LED: ioctl fail\n");
|
warnx("Amber LED: ioctl fail\n");
|
||||||
return ERROR;
|
return ERROR;
|
||||||
@@ -217,11 +211,7 @@ int led_init()
|
|||||||
rgbleds = open(RGBLED_DEVICE_PATH, 0);
|
rgbleds = open(RGBLED_DEVICE_PATH, 0);
|
||||||
|
|
||||||
if (rgbleds == -1) {
|
if (rgbleds == -1) {
|
||||||
#ifdef CONFIG_ARCH_BOARD_PX4FMU_V2
|
warnx("No RGB LED found at " RGBLED_DEVICE_PATH);
|
||||||
errx(1, "Unable to open " RGBLED_DEVICE_PATH);
|
|
||||||
#else
|
|
||||||
warnx("No RGB LED found");
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user