Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/Rover/defines.h
Views: 1798
#pragma once12// Internal defines, don't edit and expect things to work3// -------------------------------------------------------45#define SERVO_MAX 4500.0 // This value represents 45 degrees and is just an arbitrary representation of servo max travel.67// types of failsafe events8#define FAILSAFE_EVENT_THROTTLE (1<<0)9#define FAILSAFE_EVENT_GCS (1<<1)1011// Logging parameters - only 32 messages are available to the vehicle here.12enum LoggingParameters {13LOG_THR_MSG,14LOG_NTUN_MSG,15LOG_STEERING_MSG,16LOG_GUIDEDTARGET_MSG,17};1819#define MASK_LOG_ATTITUDE_FAST (1<<0)20#define MASK_LOG_ATTITUDE_MED (1<<1)21#define MASK_LOG_GPS (1<<2)22#define MASK_LOG_PM (1<<3)23#define MASK_LOG_THR (1<<4)24#define MASK_LOG_NTUN (1<<5)25//#define MASK_LOG_MODE (1<<6) // no longer used26#define MASK_LOG_IMU (1<<7)27#define MASK_LOG_CMD (1<<8)28#define MASK_LOG_CURRENT (1<<9)29#define MASK_LOG_RANGEFINDER (1<<10)30#define MASK_LOG_COMPASS (1<<11)31#define MASK_LOG_CAMERA (1<<12)32#define MASK_LOG_STEERING (1<<13)33#define MASK_LOG_RC (1<<14)34// #define MASK_LOG_ARM_DISARM (1<<15)35#define MASK_LOG_IMU_RAW (1UL<<19)36#define MASK_LOG_VIDEO_STABILISATION (1UL<<20)37#define MASK_LOG_OPTFLOW (1UL<<21)3839// for mavlink SET_POSITION_TARGET messages40#define MAVLINK_SET_POS_TYPE_MASK_POS_IGNORE ((1<<0) | (1<<1))41#define MAVLINK_SET_POS_TYPE_MASK_VEL_IGNORE ((1<<3) | (1<<4))42#define MAVLINK_SET_POS_TYPE_MASK_ACC_IGNORE ((1<<6) | (1<<7))43#define MAVLINK_SET_POS_TYPE_MASK_FORCE (1<<9)44#define MAVLINK_SET_POS_TYPE_MASK_YAW_IGNORE (1<<10)45#define MAVLINK_SET_POS_TYPE_MASK_YAW_RATE_IGNORE (1<<11)4647// for mavlink SET_ATTITUDE_TARGET messages48#define MAVLINK_SET_ATT_TYPE_MASK_ROLL_RATE_IGNORE (1<<0)49#define MAVLINK_SET_ATT_TYPE_MASK_PITCH_RATE_IGNORE (1<<1)50#define MAVLINK_SET_ATT_TYPE_MASK_YAW_RATE_IGNORE (1<<2)51#define MAVLINK_SET_ATT_TYPE_MASK_THROTTLE_IGNORE (1<<6)52#define MAVLINK_SET_ATT_TYPE_MASK_ATTITUDE_IGNORE (1<<7)5354// radio failsafe enum (FS_THR_ENABLE parameter)55enum fs_thr_enable {56FS_THR_DISABLED = 0,57FS_THR_ENABLED,58FS_THR_ENABLED_CONTINUE_MISSION,59};6061// gcs failsafe enum (FS_GCS_ENABLE parameter)62enum fs_gcs_enable {63FS_GCS_DISABLED = 0,64FS_GCS_ENABLED,65FS_GCS_ENABLED_CONTINUE_MISSION,66};6768enum fs_crash_action {69FS_CRASH_DISABLE = 0,70FS_CRASH_HOLD = 1,71FS_CRASH_HOLD_AND_DISARM = 272};7374enum fs_ekf_action {75FS_EKF_DISABLE = 0,76FS_EKF_HOLD = 1,77FS_EKF_REPORT_ONLY = 2,78};7980#define DISTANCE_HOME_MINCHANGE 0.5f // minimum distance to adjust home location8182enum class PilotSteerType : uint8_t {83DEFAULT = 0,84TWO_PADDLES = 1,85DIR_REVERSED_WHEN_REVERSING = 2,86DIR_UNCHANGED_WHEN_REVERSING = 3,87};8889// frame class enum used for FRAME_CLASS parameter90enum frame_class {91FRAME_UNDEFINED = 0,92FRAME_ROVER = 1,93FRAME_BOAT = 2,94FRAME_BALANCEBOT = 3,95};9697// manual mode options98enum ManualOptions {99SPEED_SCALING = (1 << 0),100};101102103