aboutsummaryrefslogtreecommitdiff
path: root/src/modules/commander/commander.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/commander/commander.cpp')
-rw-r--r--src/modules/commander/commander.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp
index 7ede3e1e6..82b575405 100644
--- a/src/modules/commander/commander.cpp
+++ b/src/modules/commander/commander.cpp
@@ -84,6 +84,7 @@
#include <systemlib/err.h>
#include <systemlib/cpuload.h>
+#include "px4_custom_mode.h"
#include "commander_helper.h"
#include "state_machine_helper.h"
#include "calibration_routines.h"
@@ -138,13 +139,6 @@ enum MAV_MODE_FLAG {
MAV_MODE_FLAG_ENUM_END = 129, /* | */
};
-enum PX4_CUSTOM_MODE {
- PX4_CUSTOM_MODE_MANUAL = 1,
- PX4_CUSTOM_MODE_SEATBELT,
- PX4_CUSTOM_MODE_EASY,
- PX4_CUSTOM_MODE_AUTO,
-};
-
/* Mavlink file descriptors */
static int mavlink_fd;
@@ -1321,8 +1315,10 @@ toggle_status_leds(vehicle_status_s *status, actuator_armed_s *armed, vehicle_gp
} else if (armed->ready_to_arm) {
/* ready to arm, blink at 2.5Hz */
- if (leds_counter % 8 == 0) {
- led_toggle(LED_AMBER);
+ if (leds_counter & 8) {
+ led_on(LED_AMBER);
+ } else {
+ led_off(LED_AMBER);
}
} else {