diff options
author | Anton Babushkin <anton.babushkin@me.com> | 2013-08-14 10:59:22 +0200 |
---|---|---|
committer | Anton Babushkin <anton.babushkin@me.com> | 2013-08-14 10:59:22 +0200 |
commit | d7730a3444b1c4277bca24988402839a98a52fdc (patch) | |
tree | 2b01ce80361b8336f48d324ab4b44a6d80a00ba3 /src/modules/commander | |
parent | 32439d748ad169f6f9956fb3248535730e0374a4 (diff) | |
download | px4-firmware-d7730a3444b1c4277bca24988402839a98a52fdc.tar.gz px4-firmware-d7730a3444b1c4277bca24988402839a98a52fdc.tar.bz2 px4-firmware-d7730a3444b1c4277bca24988402839a98a52fdc.zip |
commander, mavlink: fixed base_mode and custom_mode in mavlink
Diffstat (limited to 'src/modules/commander')
-rw-r--r-- | src/modules/commander/commander.cpp | 14 |
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 { |