commander: Default all leds to off

This commit is contained in:
Lorenz Meier 2014-06-24 22:22:56 +02:00
parent 571e139c24
commit b1f223b468
1 changed files with 6 additions and 0 deletions

View File

@ -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);