commander, mavlink: fixed base_mode and custom_mode in mavlink

This commit is contained in:
Anton Babushkin
2013-08-14 10:59:22 +02:00
parent 32439d748a
commit d7730a3444
4 changed files with 43 additions and 47 deletions
+5 -9
View File
@@ -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 {