2016-02-17 21:25:58 -04:00
|
|
|
#pragma once
|
2013-10-13 04:14:13 -03:00
|
|
|
|
2014-03-02 03:00:37 -04:00
|
|
|
// Command/Waypoint/Location Options Bitmask
|
|
|
|
//--------------------
|
|
|
|
#define MASK_OPTIONS_RELATIVE_ALT (1<<0) // 1 = Relative
|
|
|
|
// altitude
|
|
|
|
|
2014-03-06 18:13:53 -04:00
|
|
|
// Controller modes
|
|
|
|
// ----------------
|
|
|
|
|
|
|
|
enum ControlMode {
|
|
|
|
MANUAL=0,
|
2014-03-22 05:08:17 -03:00
|
|
|
STOP=1,
|
2014-04-09 02:27:56 -03:00
|
|
|
SCAN=2,
|
2014-10-06 08:45:07 -03:00
|
|
|
SERVO_TEST=3,
|
2014-03-06 18:13:53 -04:00
|
|
|
AUTO=10,
|
|
|
|
INITIALISING=16
|
|
|
|
};
|
|
|
|
|
2014-07-23 05:41:25 -03:00
|
|
|
enum ServoType {
|
|
|
|
SERVO_TYPE_POSITION=0,
|
2015-06-03 11:05:58 -03:00
|
|
|
SERVO_TYPE_ONOFF=1,
|
|
|
|
SERVO_TYPE_CR=2
|
2014-07-23 05:41:25 -03:00
|
|
|
};
|
|
|
|
|
2016-06-13 05:50:41 -03:00
|
|
|
enum AltSource {
|
2016-06-13 05:44:23 -03:00
|
|
|
ALT_SOURCE_BARO=0,
|
2016-07-06 04:49:52 -03:00
|
|
|
ALT_SOURCE_GPS=1,
|
|
|
|
ALT_SOURCE_GPS_VEH_ONLY=2
|
2016-06-13 05:44:23 -03:00
|
|
|
};
|
|
|
|
|
2018-02-21 19:02:00 -04:00
|
|
|
enum mode_reason_t {
|
|
|
|
MODE_REASON_INITIALISED = 0,
|
|
|
|
MODE_REASON_STARTUP,
|
|
|
|
MODE_REASON_SERVOTEST,
|
|
|
|
MODE_REASON_GCS_COMMAND,
|
|
|
|
};
|
|
|
|
|
2016-07-27 23:19:54 -03:00
|
|
|
// Filter
|
|
|
|
#define SERVO_OUT_FILT_HZ 0.1f
|
|
|
|
#define G_Dt 0.02f
|
|
|
|
|
2015-12-27 03:05:14 -04:00
|
|
|
// Logging parameters
|
|
|
|
#define MASK_LOG_ATTITUDE (1<<0)
|
|
|
|
#define MASK_LOG_GPS (1<<1)
|
|
|
|
#define MASK_LOG_RCIN (1<<2)
|
|
|
|
#define MASK_LOG_IMU (1<<3)
|
|
|
|
#define MASK_LOG_RCOUT (1<<4)
|
|
|
|
#define MASK_LOG_COMPASS (1<<5)
|
2018-01-16 16:06:27 -04:00
|
|
|
#define MASK_LOG_CURRENT (1<<6)
|
2015-12-27 03:05:14 -04:00
|
|
|
#define MASK_LOG_ANY 0xFFFF
|
2016-05-12 02:17:31 -03:00
|
|
|
|
|
|
|
// Logging messages
|
|
|
|
#define LOG_V_BAR_MSG 0x04
|
2016-06-09 03:33:07 -03:00
|
|
|
#define LOG_V_POS_MSG 0x05
|