Go to the documentation of this file.00001 #ifndef COMM_H
00002 #define COMM_H
00003
00004
00005
00006 #define MAV_KF_X_BIT 0
00007 #define MAV_KF_Y_BIT 1
00008 #define MAV_KF_Z_BIT 2
00009 #define MAV_KF_ROLL_BIT 3
00010 #define MAV_KF_PITCH_BIT 4
00011 #define MAV_KF_YAW_BIT 5
00012 #define MAV_KF_RESET_BIT 7
00013
00014
00015
00016 #define MAV_LL_CMD_PITCH_BIT 0
00017 #define MAV_LL_CMD_ROLL_BIT 1
00018 #define MAV_LL_CMD_YAW_RATE_BIT 2
00019 #define MAV_LL_CMD_THRUST_BIT 3
00020 #define MAV_LL_CMD_HEIGHT_BIT 4
00021 #define MAV_LL_CMD_GPS_BIT 5
00022
00023 #define MAV_LL_CMD_ROLL_MASK (1<<MAV_LL_CMD_ROLL_BIT)
00024 #define MAV_LL_CMD_PITCH_MASK (1<<MAV_LL_CMD_PITCH_BIT)
00025 #define MAV_LL_CMD_YAW_RATE_MASK (1<<MAV_LL_CMD_YAW_RATE_BIT)
00026 #define MAV_LL_CMD_THRUST_MASK (1<<MAV_LL_CMD_THRUST_BIT)
00027 #define MAV_LL_CMD_HEIGHT_MASK (1<<MAV_LL_CMD_HEIGHT_BIT)
00028 #define MAV_LL_CMD_GPS_MASK (1<<MAV_LL_CMD_GPS_BIT)
00029
00030 #define MAV_LL_CMD_RPYT_MASK (MAV_LL_CMD_ROLL_MASK || MAV_LL_CMD_PITCH_MASK || MAV_LL_CMD_YAW_RATE_MASK || MAV_LL_CMD_THRUST_MASK)
00031
00032
00033
00034 #define MAV_DEFAULT_BAUDRATE 460800
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056 #define MAV_ACTION_ESTOP 0x00
00057 #define MAV_ACTION_ADVANCE_STATE 0x01
00058 #define MAV_ACTION_RETREAT_STATE 0x02
00059 #define MAV_ACTION_TOGGLE_ENGAGE 0x03
00060 #define MAV_ACTION_TAKEOFF 0x04
00061 #define MAV_ACTION_LAND 0x05
00062
00063
00064 #define MAV_STATE_OFF 0x00
00065 #define MAV_STATE_ENGAGING 0x01
00066 #define MAV_STATE_DISENGAGING 0x02
00067 #define MAV_STATE_IDLE 0x03
00068 #define MAV_STATE_LANDING 0x04
00069 #define MAV_STATE_FLYING 0x05
00070 #define MAV_STATE_ERROR 0xFF
00071
00072
00073 #define MAV_CTRL_MODE_DISABLED 0x00
00074 #define MAV_CTRL_MODE_DIRECT 0x01
00075 #define MAV_CTRL_MODE_POSITION 0x02
00076 #define MAV_CTRL_MODE_VELOCITY 0x03
00077
00078
00079
00080 #define MAV_COMM_ACK 0x01
00081
00082 #endif // COMM_H