mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-27 16:40:34 +08:00
commander, mavlink: fixed base_mode and custom_mode in mavlink
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user