aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2014-04-30 06:34:34 -0700
committerLorenz Meier <lm@inf.ethz.ch>2014-04-30 06:34:34 -0700
commit2829d65871d104826772d6e705edf77a628cda11 (patch)
treea4a9aaa0c8ad0f6a03e7926143ef99da34761c9a /src/modules
parente7ebcd6c572fe3550fd626530eb69b818e31be4a (diff)
parent1dfa2f100e37d9798fe50538ed442283dd075aac (diff)
downloadpx4-firmware-2829d65871d104826772d6e705edf77a628cda11.tar.gz
px4-firmware-2829d65871d104826772d6e705edf77a628cda11.tar.bz2
px4-firmware-2829d65871d104826772d6e705edf77a628cda11.zip
Merge pull request #881 from PX4/led_fix
commander: Stop mixing board support and high level code - just accept t...
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/commander/commander_helper.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/modules/commander/commander_helper.cpp b/src/modules/commander/commander_helper.cpp
index fe6c9bfaa..0fd3c9e9e 100644
--- a/src/modules/commander/commander_helper.cpp
+++ b/src/modules/commander/commander_helper.cpp
@@ -199,15 +199,9 @@ int led_init()
}
/* the blue LED is only available on FMUv1 but not FMUv2 */
-#ifdef CONFIG_ARCH_BOARD_PX4FMU_V1
-
- if (ioctl(leds, LED_ON, LED_BLUE)) {
- warnx("Blue LED: ioctl fail\n");
- return ERROR;
- }
-
-#endif
+ (void)ioctl(leds, LED_ON, LED_BLUE);
+ /* we consider the amber led mandatory */
if (ioctl(leds, LED_ON, LED_AMBER)) {
warnx("Amber LED: ioctl fail\n");
return ERROR;
@@ -217,11 +211,7 @@ int led_init()
rgbleds = open(RGBLED_DEVICE_PATH, 0);
if (rgbleds == -1) {
-#ifdef CONFIG_ARCH_BOARD_PX4FMU_V2
- errx(1, "Unable to open " RGBLED_DEVICE_PATH);
-#else
- warnx("No RGB LED found");
-#endif
+ warnx("No RGB LED found at " RGBLED_DEVICE_PATH);
}
return 0;