2012-04-30 04:17:14 -03:00
|
|
|
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
|
|
|
//
|
|
|
|
// DO NOT EDIT this file to adjust your configuration. Create your own
|
|
|
|
// APM_Config.h and use APM_Config.h.example as a reference.
|
|
|
|
//
|
|
|
|
// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
|
|
|
///
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Default and automatic configuration details.
|
|
|
|
//
|
|
|
|
// Notes for maintainers:
|
|
|
|
//
|
|
|
|
// - Try to keep this file organised in the same order as APM_Config.h.example
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "defines.h"
|
|
|
|
|
|
|
|
///
|
|
|
|
/// DO NOT EDIT THIS INCLUDE - if you want to make a local change, make that
|
|
|
|
/// change in your local copy of APM_Config.h.
|
|
|
|
///
|
|
|
|
#include "APM_Config.h" // <== THIS INCLUDE, DO NOT EDIT IT. EVER.
|
|
|
|
///
|
|
|
|
/// DO NOT EDIT THIS INCLUDE - if you want to make a local change, make that
|
|
|
|
/// change in your local copy of APM_Config.h.
|
|
|
|
///
|
|
|
|
|
2012-12-21 22:21:34 -04:00
|
|
|
#if defined( __AVR_ATmega1280__ )
|
|
|
|
// default choices for a 1280. We can't fit everything in, so we
|
|
|
|
// make some popular choices by default
|
|
|
|
#define LOGGING_ENABLED DISABLED
|
|
|
|
#ifndef CONFIG_RELAY
|
|
|
|
# define CONFIG_RELAY DISABLED
|
|
|
|
#endif
|
|
|
|
#ifndef MOUNT2
|
|
|
|
# define MOUNT2 DISABLED
|
|
|
|
#endif
|
|
|
|
#ifndef MOUNT
|
|
|
|
# define MOUNT DISABLED
|
|
|
|
#endif
|
|
|
|
#ifndef CAMERA
|
|
|
|
# define CAMERA DISABLED
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2012-04-30 04:17:14 -03:00
|
|
|
// Just so that it's completely clear...
|
|
|
|
#define ENABLED 1
|
|
|
|
#define DISABLED 0
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// HARDWARE CONFIGURATION AND CONNECTIONS
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// LED and IO Pins
|
|
|
|
//
|
2012-12-18 07:44:12 -04:00
|
|
|
#if CONFIG_HAL_BOARD == HAL_BOARD_APM1
|
2012-12-18 14:25:26 -04:00
|
|
|
# define CONFIG_INS_TYPE CONFIG_INS_OILPAN
|
2012-04-30 04:17:14 -03:00
|
|
|
# define A_LED_PIN 37
|
|
|
|
# define B_LED_PIN 36
|
|
|
|
# define C_LED_PIN 35
|
|
|
|
# define LED_ON HIGH
|
|
|
|
# define LED_OFF LOW
|
|
|
|
# define SLIDE_SWITCH_PIN 40
|
|
|
|
# define PUSHBUTTON_PIN 41
|
|
|
|
# define USB_MUX_PIN -1
|
|
|
|
# define CONFIG_RELAY ENABLED
|
|
|
|
# define BATTERY_PIN_1 0
|
|
|
|
# define CURRENT_PIN_1 1
|
2013-02-28 16:14:08 -04:00
|
|
|
# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ADC
|
2012-12-18 07:44:12 -04:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_APM2
|
2012-12-18 14:25:26 -04:00
|
|
|
# define CONFIG_INS_TYPE CONFIG_INS_MPU6000
|
|
|
|
# define CONFIG_PUSHBUTTON DISABLED
|
|
|
|
# define CONFIG_RELAY DISABLED
|
|
|
|
# define MAG_ORIENTATION AP_COMPASS_APM2_SHIELD
|
|
|
|
# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN
|
2012-04-30 04:17:14 -03:00
|
|
|
# define A_LED_PIN 27
|
|
|
|
# define B_LED_PIN 26
|
|
|
|
# define C_LED_PIN 25
|
|
|
|
# define LED_ON LOW
|
|
|
|
# define LED_OFF HIGH
|
|
|
|
# define SLIDE_SWITCH_PIN (-1)
|
|
|
|
# define PUSHBUTTON_PIN (-1)
|
|
|
|
# define CLI_SLIDER_ENABLED DISABLED
|
|
|
|
# define USB_MUX_PIN 23
|
|
|
|
# define BATTERY_PIN_1 1
|
|
|
|
# define CURRENT_PIN_1 2
|
2012-12-18 07:44:12 -04:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
|
2012-12-18 14:25:26 -04:00
|
|
|
# define CONFIG_INS_TYPE CONFIG_INS_SITL
|
|
|
|
# define CONFIG_PUSHBUTTON DISABLED
|
|
|
|
# define CONFIG_RELAY DISABLED
|
2012-12-18 15:30:42 -04:00
|
|
|
# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN
|
2012-12-18 07:44:12 -04:00
|
|
|
# define A_LED_PIN 27
|
|
|
|
# define B_LED_PIN 26
|
|
|
|
# define C_LED_PIN 25
|
|
|
|
# define LED_ON LOW
|
|
|
|
# define LED_OFF HIGH
|
|
|
|
# define SLIDE_SWITCH_PIN (-1)
|
|
|
|
# define PUSHBUTTON_PIN (-1)
|
|
|
|
# define CLI_SLIDER_ENABLED DISABLED
|
|
|
|
# define USB_MUX_PIN -1
|
|
|
|
# define BATTERY_PIN_1 1
|
|
|
|
# define CURRENT_PIN_1 2
|
2013-01-17 02:23:14 -04:00
|
|
|
# define MAG_ORIENTATION AP_COMPASS_COMPONENTS_DOWN_PINS_FORWARD
|
2013-01-02 07:14:35 -04:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
|
|
|
# define CONFIG_INS_TYPE CONFIG_INS_SITL
|
|
|
|
# define CONFIG_PUSHBUTTON DISABLED
|
|
|
|
# define CONFIG_RELAY DISABLED
|
|
|
|
# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN
|
|
|
|
# define A_LED_PIN 27
|
|
|
|
# define B_LED_PIN 26
|
|
|
|
# define C_LED_PIN 25
|
|
|
|
# define LED_ON LOW
|
|
|
|
# define LED_OFF HIGH
|
|
|
|
# define SLIDE_SWITCH_PIN (-1)
|
|
|
|
# define PUSHBUTTON_PIN (-1)
|
|
|
|
# define CLI_SLIDER_ENABLED DISABLED
|
|
|
|
# define USB_MUX_PIN -1
|
|
|
|
# define BATTERY_PIN_1 -1
|
|
|
|
# define CURRENT_PIN_1 -1
|
2013-01-17 02:23:14 -04:00
|
|
|
# define MAG_ORIENTATION ROTATION_NONE
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// IMU Selection
|
|
|
|
//
|
2012-11-07 03:28:20 -04:00
|
|
|
#ifndef CONFIG_INS_TYPE
|
|
|
|
# define CONFIG_INS_TYPE CONFIG_INS_OILPAN
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// ADC Enable - used to eliminate for systems which don't have ADC.
|
|
|
|
//
|
|
|
|
#ifndef CONFIG_ADC
|
2012-11-07 03:28:20 -04:00
|
|
|
# if CONFIG_INS_TYPE == CONFIG_INS_OILPAN
|
2012-04-30 04:17:14 -03:00
|
|
|
# define CONFIG_ADC ENABLED
|
|
|
|
# else
|
|
|
|
# define CONFIG_ADC DISABLED
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef SONAR_TYPE
|
2012-08-29 00:09:10 -03:00
|
|
|
# define SONAR_TYPE MAX_SONAR_LV // MAX_SONAR_XL,
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
|
2012-05-14 12:47:08 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Sonar
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef CONFIG_SONAR_SOURCE
|
|
|
|
# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ADC
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if CONFIG_SONAR_SOURCE == SONAR_SOURCE_ADC && CONFIG_ADC == DISABLED
|
|
|
|
# warning Cannot use ADC for CONFIG_SONAR_SOURCE, becaude CONFIG_ADC is DISABLED
|
|
|
|
# warning Defaulting CONFIG_SONAR_SOURCE to ANALOG_PIN
|
|
|
|
# undef CONFIG_SONAR_SOURCE
|
|
|
|
# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if CONFIG_SONAR_SOURCE == SONAR_SOURCE_ADC
|
|
|
|
# ifndef CONFIG_SONAR_SOURCE_ADC_CHANNEL
|
|
|
|
# define CONFIG_SONAR_SOURCE_ADC_CHANNEL 7
|
|
|
|
# endif
|
|
|
|
#elif CONFIG_SONAR_SOURCE == SONAR_SOURCE_ANALOG_PIN
|
|
|
|
# ifndef CONFIG_SONAR_SOURCE_ANALOG_PIN
|
2012-12-18 07:44:12 -04:00
|
|
|
# define CONFIG_SONAR_SOURCE_ANALOG_PIN 0
|
2012-05-14 12:47:08 -03:00
|
|
|
# endif
|
|
|
|
#else
|
|
|
|
# warning Invalid value for CONFIG_SONAR_SOURCE, disabling sonar
|
|
|
|
# undef SONAR_ENABLED
|
|
|
|
# define SONAR_ENABLED DISABLED
|
|
|
|
#endif
|
|
|
|
|
2012-04-30 04:17:14 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// HIL_MODE OPTIONAL
|
|
|
|
|
|
|
|
#ifndef HIL_MODE
|
|
|
|
#define HIL_MODE HIL_MODE_DISABLED
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// GPS_PROTOCOL
|
|
|
|
//
|
|
|
|
// Note that this test must follow the HIL_PROTOCOL block as the HIL
|
|
|
|
// setup may override the GPS configuration.
|
|
|
|
//
|
|
|
|
#ifndef GPS_PROTOCOL
|
|
|
|
# define GPS_PROTOCOL GPS_PROTOCOL_AUTO
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef MAV_SYSTEM_ID
|
|
|
|
# define MAV_SYSTEM_ID 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Serial port speeds.
|
|
|
|
//
|
|
|
|
#ifndef SERIAL0_BAUD
|
|
|
|
# define SERIAL0_BAUD 115200
|
|
|
|
#endif
|
|
|
|
#ifndef SERIAL3_BAUD
|
|
|
|
# define SERIAL3_BAUD 57600
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CH7_OPTION
|
2013-02-07 18:21:22 -04:00
|
|
|
# define CH7_OPTION CH7_SAVE_WP
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef TUNING_OPTION
|
|
|
|
# define TUNING_OPTION TUN_NONE
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Battery monitoring
|
|
|
|
//
|
|
|
|
#ifndef BATTERY_EVENT
|
|
|
|
# define BATTERY_EVENT DISABLED
|
|
|
|
#endif
|
|
|
|
#ifndef LOW_VOLTAGE
|
|
|
|
# define LOW_VOLTAGE 9.6
|
|
|
|
#endif
|
|
|
|
#ifndef VOLT_DIV_RATIO
|
|
|
|
# define VOLT_DIV_RATIO 3.56 // This is the proper value for an on-board APM1 voltage divider with a 3.9kOhm resistor
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CURR_AMP_PER_VOLT
|
|
|
|
# define CURR_AMP_PER_VOLT 27.32 // This is the proper value for the AttoPilot 50V/90A sensor
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CURR_AMPS_OFFSET
|
|
|
|
# define CURR_AMPS_OFFSET 0.0
|
|
|
|
#endif
|
|
|
|
#ifndef HIGH_DISCHARGE
|
|
|
|
# define HIGH_DISCHARGE 1760
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// INPUT_VOLTAGE
|
|
|
|
//
|
|
|
|
#ifndef INPUT_VOLTAGE
|
|
|
|
# define INPUT_VOLTAGE 4.68 // 4.68 is the average value for a sample set. This is the value at the processor with 5.02 applied at the servo rail
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// MAGNETOMETER
|
|
|
|
#ifndef MAGNETOMETER
|
2013-02-21 16:14:38 -04:00
|
|
|
# define MAGNETOMETER ENABLED
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
#ifndef MAG_ORIENTATION
|
|
|
|
# define MAG_ORIENTATION AP_COMPASS_COMPONENTS_DOWN_PINS_FORWARD
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
2013-02-07 18:21:22 -04:00
|
|
|
// MODE
|
|
|
|
// MODE_CHANNEL
|
2012-04-30 04:17:14 -03:00
|
|
|
//
|
2013-02-07 18:21:22 -04:00
|
|
|
#ifndef MODE_CHANNEL
|
|
|
|
# define MODE_CHANNEL 8
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
2013-02-07 18:21:22 -04:00
|
|
|
#if (MODE_CHANNEL != 5) && (MODE_CHANNEL != 6) && (MODE_CHANNEL != 7) && (MODE_CHANNEL != 8)
|
2012-04-30 04:17:14 -03:00
|
|
|
# error XXX
|
2013-02-07 18:21:22 -04:00
|
|
|
# error XXX You must set MODE_CHANNEL to 5, 6, 7 or 8
|
2012-04-30 04:17:14 -03:00
|
|
|
# error XXX
|
|
|
|
#endif
|
|
|
|
|
2013-02-07 18:21:22 -04:00
|
|
|
#if !defined(MODE_1)
|
|
|
|
# define MODE_1 LEARNING
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
2013-02-07 18:21:22 -04:00
|
|
|
#if !defined(MODE_2)
|
|
|
|
# define MODE_2 LEARNING
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
2013-02-07 18:21:22 -04:00
|
|
|
#if !defined(MODE_3)
|
|
|
|
# define MODE_3 LEARNING
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
2013-02-07 18:21:22 -04:00
|
|
|
#if !defined(MODE_4)
|
|
|
|
# define MODE_4 LEARNING
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
2013-02-07 18:21:22 -04:00
|
|
|
#if !defined(MODE_5)
|
|
|
|
# define MODE_5 LEARNING
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
2013-02-07 18:21:22 -04:00
|
|
|
#if !defined(MODE_6)
|
|
|
|
# define MODE_6 MANUAL
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
2013-02-07 18:21:22 -04:00
|
|
|
// failsafe defaults
|
2012-04-30 04:17:14 -03:00
|
|
|
#ifndef THROTTLE_FAILSAFE
|
|
|
|
# define THROTTLE_FAILSAFE ENABLED
|
|
|
|
#endif
|
|
|
|
#ifndef THROTTLE_FS_VALUE
|
|
|
|
# define THROTTLE_FS_VALUE 950
|
|
|
|
#endif
|
|
|
|
#ifndef LONG_FAILSAFE_ACTION
|
|
|
|
# define LONG_FAILSAFE_ACTION 0
|
|
|
|
#endif
|
|
|
|
#ifndef GCS_HEARTBEAT_FAILSAFE
|
|
|
|
# define GCS_HEARTBEAT_FAILSAFE DISABLED
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// THROTTLE_OUT
|
|
|
|
//
|
|
|
|
#ifndef THROTTE_OUT
|
|
|
|
# define THROTTLE_OUT ENABLED
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// STARTUP BEHAVIOUR
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// GROUND_START_DELAY
|
|
|
|
//
|
|
|
|
#ifndef GROUND_START_DELAY
|
|
|
|
# define GROUND_START_DELAY 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// MOUNT (ANTENNA OR CAMERA)
|
|
|
|
//
|
|
|
|
#ifndef MOUNT
|
|
|
|
# define MOUNT DISABLED
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// AIRSPEED_CRUISE
|
|
|
|
//
|
2013-02-07 18:21:22 -04:00
|
|
|
#ifndef SPEED_CRUISE
|
|
|
|
# define SPEED_CRUISE 3 // 3 m/s
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef GSBOOST
|
|
|
|
# define GSBOOST 0
|
|
|
|
#endif
|
|
|
|
#ifndef GSBOOST
|
|
|
|
# define GSBOOST 0
|
|
|
|
#endif
|
|
|
|
#ifndef NUDGE_OFFSET
|
|
|
|
# define NUDGE_OFFSET 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef E_GLIDER
|
|
|
|
# define E_GLIDER ENABLED
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef TURN_GAIN
|
|
|
|
# define TURN_GAIN 5
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Servo Mapping
|
|
|
|
//
|
|
|
|
#ifndef THROTTLE_MIN
|
|
|
|
# define THROTTLE_MIN 0 // percent
|
|
|
|
#endif
|
|
|
|
#ifndef THROTTLE_CRUISE
|
|
|
|
# define THROTTLE_CRUISE 45
|
|
|
|
#endif
|
|
|
|
#ifndef THROTTLE_MAX
|
2013-02-21 17:38:13 -04:00
|
|
|
# define THROTTLE_MAX 100
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Attitude control gains
|
|
|
|
//
|
2013-02-07 18:21:22 -04:00
|
|
|
#ifndef SERVO_STEER_P
|
|
|
|
# define SERVO_STEER_P 0.4
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
2013-02-07 18:21:22 -04:00
|
|
|
#ifndef SERVO_STEER_I
|
|
|
|
# define SERVO_STEER_I 0.0
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
2013-02-07 18:21:22 -04:00
|
|
|
#ifndef SERVO_STEER_D
|
|
|
|
# define SERVO_STEER_D 0.0
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
2013-02-07 18:21:22 -04:00
|
|
|
#ifndef SERVO_STEER_INT_MAX
|
|
|
|
# define SERVO_STEER_INT_MAX 5
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
2013-02-07 18:21:22 -04:00
|
|
|
#define SERVO_STEER_INT_MAX_CENTIDEGREE SERVO_STEER_INT_MAX*100
|
2012-04-30 04:17:14 -03:00
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Crosstrack compensation
|
|
|
|
//
|
|
|
|
#ifndef XTRACK_GAIN
|
|
|
|
# define XTRACK_GAIN 1 // deg/m
|
|
|
|
#endif
|
|
|
|
#ifndef XTRACK_ENTRY_ANGLE
|
2013-02-21 17:38:13 -04:00
|
|
|
# define XTRACK_ENTRY_ANGLE 50 // deg
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
# define XTRACK_GAIN_SCALED XTRACK_GAIN*100
|
|
|
|
# define XTRACK_ENTRY_ANGLE_CENTIDEGREE XTRACK_ENTRY_ANGLE*100
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Dataflash logging control
|
|
|
|
//
|
|
|
|
#ifndef LOGGING_ENABLED
|
|
|
|
# define LOGGING_ENABLED ENABLED
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef LOG_ATTITUDE_FAST
|
|
|
|
# define LOG_ATTITUDE_FAST DISABLED
|
|
|
|
#endif
|
|
|
|
#ifndef LOG_ATTITUDE_MED
|
|
|
|
# define LOG_ATTITUDE_MED ENABLED
|
|
|
|
#endif
|
|
|
|
#ifndef LOG_GPS
|
|
|
|
# define LOG_GPS ENABLED
|
|
|
|
#endif
|
|
|
|
#ifndef LOG_PM
|
|
|
|
# define LOG_PM DISABLED
|
|
|
|
#endif
|
|
|
|
#ifndef LOG_CTUN
|
|
|
|
# define LOG_CTUN ENABLED
|
|
|
|
#endif
|
|
|
|
#ifndef LOG_NTUN
|
|
|
|
# define LOG_NTUN DISABLED
|
|
|
|
#endif
|
|
|
|
#ifndef LOG_MODE
|
|
|
|
# define LOG_MODE ENABLED
|
|
|
|
#endif
|
2013-01-26 04:35:18 -04:00
|
|
|
#ifndef LOG_IMU
|
|
|
|
# define LOG_IMU DISABLED
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
#ifndef LOG_CMD
|
|
|
|
# define LOG_CMD ENABLED
|
|
|
|
#endif
|
2013-01-26 04:41:38 -04:00
|
|
|
#ifndef LOG_CURRENT
|
|
|
|
# define LOG_CURRENT DISABLED
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// calculate the default log_bitmask
|
|
|
|
#define LOGBIT(_s) (LOG_##_s ? MASK_LOG_##_s : 0)
|
|
|
|
|
|
|
|
#define DEFAULT_LOG_BITMASK \
|
|
|
|
LOGBIT(ATTITUDE_FAST) | \
|
|
|
|
LOGBIT(ATTITUDE_MED) | \
|
|
|
|
LOGBIT(GPS) | \
|
|
|
|
LOGBIT(PM) | \
|
|
|
|
LOGBIT(CTUN) | \
|
|
|
|
LOGBIT(NTUN) | \
|
|
|
|
LOGBIT(MODE) | \
|
2013-01-26 04:35:18 -04:00
|
|
|
LOGBIT(IMU) | \
|
2012-04-30 04:17:14 -03:00
|
|
|
LOGBIT(CMD) | \
|
2013-01-26 04:41:38 -04:00
|
|
|
LOGBIT(CURRENT)
|
2012-04-30 04:17:14 -03:00
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Developer Items
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef STANDARD_SPEED
|
|
|
|
# define STANDARD_SPEED 3.0
|
|
|
|
#define STANDARD_SPEED_SQUARED (STANDARD_SPEED * STANDARD_SPEED)
|
|
|
|
#endif
|
|
|
|
#define STANDARD_THROTTLE_SQUARED (THROTTLE_CRUISE * THROTTLE_CRUISE)
|
|
|
|
|
|
|
|
// use this to enable servos in HIL mode
|
|
|
|
#ifndef HIL_SERVOS
|
|
|
|
# define HIL_SERVOS DISABLED
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// use this to completely disable the CLI
|
|
|
|
#ifndef CLI_ENABLED
|
|
|
|
# define CLI_ENABLED ENABLED
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// if RESET_SWITCH_CH is not zero, then this is the PWM value on
|
|
|
|
// that channel where we reset the control mode to the current switch
|
|
|
|
// position (to for example return to switched mode after failsafe or
|
|
|
|
// fence breach)
|
|
|
|
#ifndef RESET_SWITCH_CHAN_PWM
|
|
|
|
# define RESET_SWITCH_CHAN_PWM 1750
|
|
|
|
#endif
|
|
|
|
|
2012-11-17 02:45:20 -04:00
|
|
|
#ifndef BOOSTER
|
|
|
|
# define BOOSTER 2 // booster factor x1 = 1 or x2 = 2
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef SONAR_ENABLED
|
|
|
|
# define SONAR_ENABLED DISABLED
|
|
|
|
#endif
|