2016-02-17 21:25:59 -04:00
|
|
|
#pragma once
|
2012-04-30 04:17:14 -03:00
|
|
|
|
|
|
|
// Internal defines, don't edit and expect things to work
|
|
|
|
// -------------------------------------------------------
|
|
|
|
|
2021-09-18 14:54:27 -03:00
|
|
|
#define SERVO_MAX 4500.0 // This value represents 45 degrees and is just an arbitrary representation of servo max travel.
|
2012-04-30 04:17:14 -03:00
|
|
|
|
2013-03-28 20:25:53 -03:00
|
|
|
// types of failsafe events
|
|
|
|
#define FAILSAFE_EVENT_THROTTLE (1<<0)
|
|
|
|
#define FAILSAFE_EVENT_GCS (1<<1)
|
|
|
|
|
2021-12-17 21:21:58 -04:00
|
|
|
// Logging parameters - only 32 messages are available to the vehicle here.
|
|
|
|
enum LoggingParameters {
|
|
|
|
LOG_THR_MSG,
|
|
|
|
LOG_NTUN_MSG,
|
|
|
|
LOG_STEERING_MSG,
|
|
|
|
LOG_GUIDEDTARGET_MSG,
|
|
|
|
};
|
2013-04-18 21:23:57 -03:00
|
|
|
|
2016-12-20 09:33:06 -04:00
|
|
|
#define MASK_LOG_ATTITUDE_FAST (1<<0)
|
|
|
|
#define MASK_LOG_ATTITUDE_MED (1<<1)
|
|
|
|
#define MASK_LOG_GPS (1<<2)
|
|
|
|
#define MASK_LOG_PM (1<<3)
|
2017-12-07 08:42:06 -04:00
|
|
|
#define MASK_LOG_THR (1<<4)
|
2016-12-20 09:33:06 -04:00
|
|
|
#define MASK_LOG_NTUN (1<<5)
|
2017-10-23 21:38:52 -03:00
|
|
|
//#define MASK_LOG_MODE (1<<6) // no longer used
|
2016-12-20 09:33:06 -04:00
|
|
|
#define MASK_LOG_IMU (1<<7)
|
|
|
|
#define MASK_LOG_CMD (1<<8)
|
|
|
|
#define MASK_LOG_CURRENT (1<<9)
|
2017-07-13 08:36:44 -03:00
|
|
|
#define MASK_LOG_RANGEFINDER (1<<10)
|
2016-12-20 09:33:06 -04:00
|
|
|
#define MASK_LOG_COMPASS (1<<11)
|
|
|
|
#define MASK_LOG_CAMERA (1<<12)
|
|
|
|
#define MASK_LOG_STEERING (1<<13)
|
|
|
|
#define MASK_LOG_RC (1<<14)
|
2019-05-03 09:32:42 -03:00
|
|
|
// #define MASK_LOG_ARM_DISARM (1<<15)
|
2015-05-06 23:11:43 -03:00
|
|
|
#define MASK_LOG_IMU_RAW (1UL<<19)
|
2021-12-15 15:09:29 -04:00
|
|
|
#define MASK_LOG_VIDEO_STABILISATION (1UL<<20)
|
2022-09-07 03:49:51 -03:00
|
|
|
#define MASK_LOG_OPTFLOW (1UL<<21)
|
2016-08-23 03:04:30 -03:00
|
|
|
|
|
|
|
// for mavlink SET_POSITION_TARGET messages
|
2017-12-04 21:42:03 -04:00
|
|
|
#define MAVLINK_SET_POS_TYPE_MASK_POS_IGNORE ((1<<0) | (1<<1))
|
|
|
|
#define MAVLINK_SET_POS_TYPE_MASK_VEL_IGNORE ((1<<3) | (1<<4))
|
|
|
|
#define MAVLINK_SET_POS_TYPE_MASK_ACC_IGNORE ((1<<6) | (1<<7))
|
2016-08-23 03:04:30 -03:00
|
|
|
#define MAVLINK_SET_POS_TYPE_MASK_FORCE (1<<9)
|
|
|
|
#define MAVLINK_SET_POS_TYPE_MASK_YAW_IGNORE (1<<10)
|
|
|
|
#define MAVLINK_SET_POS_TYPE_MASK_YAW_RATE_IGNORE (1<<11)
|
2016-11-21 12:08:24 -04:00
|
|
|
|
2017-05-03 11:21:58 -03:00
|
|
|
// for mavlink SET_ATTITUDE_TARGET messages
|
|
|
|
#define MAVLINK_SET_ATT_TYPE_MASK_ROLL_RATE_IGNORE (1<<0)
|
|
|
|
#define MAVLINK_SET_ATT_TYPE_MASK_PITCH_RATE_IGNORE (1<<1)
|
|
|
|
#define MAVLINK_SET_ATT_TYPE_MASK_YAW_RATE_IGNORE (1<<2)
|
|
|
|
#define MAVLINK_SET_ATT_TYPE_MASK_THROTTLE_IGNORE (1<<6)
|
|
|
|
#define MAVLINK_SET_ATT_TYPE_MASK_ATTITUDE_IGNORE (1<<7)
|
|
|
|
|
2018-11-13 04:40:40 -04:00
|
|
|
// radio failsafe enum (FS_THR_ENABLE parameter)
|
|
|
|
enum fs_thr_enable {
|
|
|
|
FS_THR_DISABLED = 0,
|
|
|
|
FS_THR_ENABLED,
|
|
|
|
FS_THR_ENABLED_CONTINUE_MISSION,
|
|
|
|
};
|
|
|
|
|
|
|
|
// gcs failsafe enum (FS_GCS_ENABLE parameter)
|
|
|
|
enum fs_gcs_enable {
|
|
|
|
FS_GCS_DISABLED = 0,
|
|
|
|
FS_GCS_ENABLED,
|
|
|
|
FS_GCS_ENABLED_CONTINUE_MISSION,
|
|
|
|
};
|
|
|
|
|
2016-11-21 12:08:24 -04:00
|
|
|
enum fs_crash_action {
|
|
|
|
FS_CRASH_DISABLE = 0,
|
|
|
|
FS_CRASH_HOLD = 1,
|
|
|
|
FS_CRASH_HOLD_AND_DISARM = 2
|
|
|
|
};
|
|
|
|
|
2018-11-01 04:04:58 -03:00
|
|
|
enum fs_ekf_action {
|
|
|
|
FS_EKF_DISABLE = 0,
|
2020-11-02 14:38:14 -04:00
|
|
|
FS_EKF_HOLD = 1,
|
|
|
|
FS_EKF_REPORT_ONLY = 2,
|
2018-11-01 04:04:58 -03:00
|
|
|
};
|
|
|
|
|
2018-11-07 18:41:48 -04:00
|
|
|
#define DISTANCE_HOME_MINCHANGE 0.5f // minimum distance to adjust home location
|
2017-07-24 14:05:59 -03:00
|
|
|
|
2024-06-19 10:13:47 -03:00
|
|
|
enum class PilotSteerType : uint8_t {
|
|
|
|
DEFAULT = 0,
|
|
|
|
TWO_PADDLES = 1,
|
|
|
|
DIR_REVERSED_WHEN_REVERSING = 2,
|
|
|
|
DIR_UNCHANGED_WHEN_REVERSING = 3,
|
2017-11-27 09:11:45 -04:00
|
|
|
};
|
|
|
|
|
2017-12-06 22:37:42 -04:00
|
|
|
// frame class enum used for FRAME_CLASS parameter
|
|
|
|
enum frame_class {
|
|
|
|
FRAME_UNDEFINED = 0,
|
|
|
|
FRAME_ROVER = 1,
|
2018-06-05 05:56:46 -03:00
|
|
|
FRAME_BOAT = 2,
|
|
|
|
FRAME_BALANCEBOT = 3,
|
2017-12-06 22:37:42 -04:00
|
|
|
};
|
2022-07-05 15:21:10 -03:00
|
|
|
|
|
|
|
// manual mode options
|
|
|
|
enum ManualOptions {
|
|
|
|
SPEED_SCALING = (1 << 0),
|
|
|
|
};
|