44 #include <px4_platform_common/defines.h> 45 #include <px4_platform_common/posix.h> 70 #define VEHICLE_TYPE_FIXED_WING 1 71 #define VEHICLE_TYPE_QUADROTOR 2 72 #define VEHICLE_TYPE_COAXIAL 3 73 #define VEHICLE_TYPE_HELICOPTER 4 74 #define VEHICLE_TYPE_GROUND_ROVER 10 75 #define VEHICLE_TYPE_HEXAROTOR 13 76 #define VEHICLE_TYPE_OCTOROTOR 14 77 #define VEHICLE_TYPE_TRICOPTER 15 78 #define VEHICLE_TYPE_VTOL_DUOROTOR 19 79 #define VEHICLE_TYPE_VTOL_QUADROTOR 20 80 #define VEHICLE_TYPE_VTOL_TILTROTOR 21 81 #define VEHICLE_TYPE_VTOL_RESERVED2 22 82 #define VEHICLE_TYPE_VTOL_RESERVED3 23 83 #define VEHICLE_TYPE_VTOL_RESERVED4 24 84 #define VEHICLE_TYPE_VTOL_RESERVED5 25 86 #define BLINK_MSG_TIME 700000 // 3 fast blinks (in us) 186 if (new_tune_duration != 0) {
302 PX4_WARN(
"LED: getHandle fail\n");
317 PX4_WARN(
"Amber LED: ioctl fail\n");
330 DevMgr::releaseHandle(
h_leds);
#define VEHICLE_TYPE_FIXED_WING
void tune_neutral(bool use_buzzer)
Blink white LED and play neutral tune (if use_buzzer == true).
void tune_mission_fail(bool use_buzzer)
API for the uORB lightweight object broker.
bool is_fixed_wing(const struct vehicle_status_s *current_status)
static led_control_s led_control
bool is_multirotor(const struct vehicle_status_s *current_status)
static orb_advert_t led_control_pub
#define VEHICLE_TYPE_VTOL_RESERVED5
void set_tune_override(int tune)
static orb_advert_t tune_control_pub
#define VEHICLE_TYPE_VTOL_RESERVED2
void tune_positive(bool use_buzzer)
Blink green LED and play positive tune (if use_buzzer == true).
High-resolution timer with callouts and timekeeping.
orb_advert_t orb_advertise_queue(const struct orb_metadata *meta, const void *data, unsigned int queue_size)
Global flash based parameter store.
static hrt_abstime blink_msg_end
#define ORB_ID(_name)
Generates a pointer to the uORB metadata structure for a given topic.
static DevHandle h_buzzer
Commander helper functions definitions.
bool is_vtol_tailsitter(const struct vehicle_status_s *current_status)
#define VEHICLE_TYPE_TRICOPTER
#define VEHICLE_TYPE_VTOL_TILTROTOR
Simple error/warning functions, heavily inspired by the BSD functions of the same names...
#define VEHICLE_TYPE_HEXAROTOR
bool is_rotary_wing(const struct vehicle_status_s *current_status)
void tune_mission_ok(bool use_buzzer)
bool is_vtol(const struct vehicle_status_s *current_status)
bool is_ground_rover(const struct vehicle_status_s *current_status)
__BEGIN_DECLS typedef uint64_t hrt_abstime
Absolute time, in microsecond units.
Driver for the PX4 audio alarm port, /dev/tone_alarm.
__BEGIN_DECLS typedef void * orb_advert_t
ORB topic advertiser handle.
int orb_publish(const struct orb_metadata *meta, orb_advert_t handle, const void *data)
#define VEHICLE_TYPE_VTOL_RESERVED3
#define VEHICLE_TYPE_GROUND_ROVER
#define VEHICLE_TYPE_VTOL_RESERVED4
#define VEHICLE_TYPE_QUADROTOR
void rgbled_set_color_and_mode(uint8_t color, uint8_t mode, uint8_t blinks, uint8_t prio)
#define VEHICLE_TYPE_VTOL_QUADROTOR
static hrt_abstime tune_end
int orb_unadvertise(orb_advert_t handle)
#define VEHICLE_TYPE_VTOL_DUOROTOR
#define VEHICLE_TYPE_COAXIAL
static tune_control_s tune_control
#define VEHICLE_TYPE_HELICOPTER
void tune_failsafe(bool use_buzzer)
#define VEHICLE_TYPE_OCTOROTOR
static unsigned int tune_durations[TONE_NUMBER_OF_TUNES]
__EXPORT hrt_abstime hrt_absolute_time(void)
Get absolute time in [us] (does not wrap).
void tune_negative(bool use_buzzer)
Blink red LED and play negative tune (if use_buzzer == true).
void tune_home_set(bool use_buzzer)