forked from Archive/PX4-Autopilot
commander: Default all leds to off
This commit is contained in:
parent
571e139c24
commit
b1f223b468
|
@ -209,12 +209,18 @@ int led_init()
|
||||||
/* the blue LED is only available on FMUv1 & AeroCore but not FMUv2 */
|
/* the blue LED is only available on FMUv1 & AeroCore but not FMUv2 */
|
||||||
(void)ioctl(leds, LED_ON, LED_BLUE);
|
(void)ioctl(leds, LED_ON, LED_BLUE);
|
||||||
|
|
||||||
|
/* switch blue off */
|
||||||
|
led_off(LED_BLUE);
|
||||||
|
|
||||||
/* we consider the amber led mandatory */
|
/* 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* switch amber off */
|
||||||
|
led_off(LED_AMBER);
|
||||||
|
|
||||||
/* then try RGB LEDs, this can fail on FMUv1*/
|
/* then try RGB LEDs, this can fail on FMUv1*/
|
||||||
rgbleds = open(RGBLED_DEVICE_PATH, 0);
|
rgbleds = open(RGBLED_DEVICE_PATH, 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue