2012-04-30 04:17:14 -03:00
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// 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
|
|
|
|
//
|
2016-02-17 21:25:59 -04:00
|
|
|
#pragma once
|
2012-04-30 04:17:14 -03:00
|
|
|
|
|
|
|
#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.
|
|
|
|
///
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
2014-07-06 23:05:56 -03:00
|
|
|
// sensor types
|
|
|
|
|
2012-04-30 04:17:14 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
2014-07-06 23:05:56 -03:00
|
|
|
// HIL_MODE OPTIONAL
|
|
|
|
|
|
|
|
#ifndef HIL_MODE
|
2016-12-20 09:32:46 -04:00
|
|
|
#define HIL_MODE HIL_MODE_DISABLED
|
2014-07-06 23:05:56 -03:00
|
|
|
#endif
|
|
|
|
|
2015-11-03 09:46:30 -04:00
|
|
|
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
|
2016-12-20 09:32:46 -04:00
|
|
|
#define BATTERY_PIN_1 1
|
|
|
|
#define CURRENT_PIN_1 2
|
2013-01-02 07:14:35 -04:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
2016-12-20 09:32:46 -04:00
|
|
|
#define BATTERY_PIN_1 -1
|
|
|
|
#define CURRENT_PIN_1 -1
|
2013-09-28 08:48:00 -03:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_LINUX
|
2016-12-20 09:32:46 -04:00
|
|
|
#define BATTERY_PIN_1 -1
|
|
|
|
#define CURRENT_PIN_1 -1
|
2014-03-31 14:58:48 -03:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN
|
2016-12-20 09:32:46 -04:00
|
|
|
#define BATTERY_PIN_1 -1
|
|
|
|
#define CURRENT_PIN_1 -1
|
2013-12-21 07:27:06 -04:00
|
|
|
#endif
|
|
|
|
|
2012-04-30 04:17:14 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// HIL_MODE OPTIONAL
|
|
|
|
|
|
|
|
#ifndef HIL_MODE
|
2016-12-20 09:32:46 -04:00
|
|
|
#define HIL_MODE HIL_MODE_DISABLED
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef MAV_SYSTEM_ID
|
2016-12-20 09:32:46 -04:00
|
|
|
#define MAV_SYSTEM_ID 1
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2014-07-29 08:36:26 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// FrSky telemetry support
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef FRSKY_TELEM_ENABLED
|
2016-12-20 09:32:46 -04:00
|
|
|
#define FRSKY_TELEM_ENABLED ENABLED
|
2014-07-29 08:36:26 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2012-04-30 04:17:14 -03:00
|
|
|
#ifndef CH7_OPTION
|
2016-12-20 09:32:46 -04:00
|
|
|
#define CH7_OPTION CH7_SAVE_WP
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef TUNING_OPTION
|
2016-12-20 09:32:46 -04:00
|
|
|
#define TUNING_OPTION TUN_NONE
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// INPUT_VOLTAGE
|
|
|
|
//
|
|
|
|
#ifndef INPUT_VOLTAGE
|
2016-12-20 09:32:46 -04:00
|
|
|
#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
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// MAGNETOMETER
|
|
|
|
#ifndef MAGNETOMETER
|
2016-12-20 09:32:46 -04:00
|
|
|
#define MAGNETOMETER ENABLED
|
2012-04-30 04:17:14 -03:00
|
|
|
#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
|
2016-12-20 09:32:46 -04:00
|
|
|
#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)
|
2016-12-20 09:32:46 -04:00
|
|
|
#error XXX
|
|
|
|
#error XXX You must set MODE_CHANNEL to 5, 6, 7 or 8
|
|
|
|
#error XXX
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
|
2013-02-07 18:21:22 -04:00
|
|
|
#if !defined(MODE_1)
|
2016-12-20 09:32:46 -04:00
|
|
|
#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)
|
2016-12-20 09:32:46 -04:00
|
|
|
#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)
|
2016-12-20 09:32:46 -04:00
|
|
|
#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)
|
2016-12-20 09:32:46 -04:00
|
|
|
#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)
|
2016-12-20 09:32:46 -04:00
|
|
|
#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)
|
2016-12-20 09:32:46 -04:00
|
|
|
#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
|
2016-12-20 09:32:46 -04:00
|
|
|
#define THROTTLE_FAILSAFE ENABLED
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
#ifndef THROTTLE_FS_VALUE
|
2016-12-20 09:32:46 -04:00
|
|
|
#define THROTTLE_FS_VALUE 950
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
#ifndef LONG_FAILSAFE_ACTION
|
2016-12-20 09:32:46 -04:00
|
|
|
#define LONG_FAILSAFE_ACTION 0
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
#ifndef GCS_HEARTBEAT_FAILSAFE
|
2016-12-20 09:32:46 -04:00
|
|
|
#define GCS_HEARTBEAT_FAILSAFE DISABLED
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// THROTTLE_OUT
|
|
|
|
//
|
|
|
|
#ifndef THROTTE_OUT
|
2016-12-20 09:32:46 -04:00
|
|
|
#define THROTTLE_OUT ENABLED
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// STARTUP BEHAVIOUR
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// GROUND_START_DELAY
|
|
|
|
//
|
|
|
|
#ifndef GROUND_START_DELAY
|
2016-12-20 09:32:46 -04:00
|
|
|
#define GROUND_START_DELAY 0
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// MOUNT (ANTENNA OR CAMERA)
|
|
|
|
//
|
|
|
|
#ifndef MOUNT
|
2016-12-20 09:32:46 -04:00
|
|
|
#define MOUNT ENABLED
|
2013-07-14 20:57:00 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// CAMERA control
|
|
|
|
//
|
|
|
|
#ifndef CAMERA
|
2016-12-20 09:32:46 -04:00
|
|
|
#define CAMERA ENABLED
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// AIRSPEED_CRUISE
|
|
|
|
//
|
2013-02-07 18:21:22 -04:00
|
|
|
#ifndef SPEED_CRUISE
|
2016-12-20 09:32:46 -04:00
|
|
|
#define SPEED_CRUISE 5 // in m/s
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef TURN_GAIN
|
2016-12-20 09:32:46 -04:00
|
|
|
#define TURN_GAIN 5
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Servo Mapping
|
|
|
|
//
|
|
|
|
#ifndef THROTTLE_MIN
|
2016-12-20 09:32:46 -04:00
|
|
|
#define THROTTLE_MIN 0 // percent
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
#ifndef THROTTLE_CRUISE
|
2016-12-20 09:32:46 -04:00
|
|
|
#define THROTTLE_CRUISE 45
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
#ifndef THROTTLE_MAX
|
2016-12-20 09:32:46 -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
|
2016-12-20 09:32:46 -04:00
|
|
|
#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
|
2016-12-20 09:32:46 -04:00
|
|
|
#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
|
2016-12-20 09:32:46 -04:00
|
|
|
#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
|
2016-12-20 09:32:46 -04:00
|
|
|
#define SERVO_STEER_INT_MAX 5
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
2016-12-20 09:32:46 -04:00
|
|
|
#define SERVO_STEER_INT_MAX_CENTIDEGREE (SERVO_STEER_INT_MAX * 100)
|
2012-04-30 04:17:14 -03:00
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Dataflash logging control
|
|
|
|
//
|
|
|
|
#ifndef LOGGING_ENABLED
|
2016-12-20 09:32:46 -04:00
|
|
|
#define LOGGING_ENABLED ENABLED
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
|
2016-12-20 09:32:46 -04:00
|
|
|
#define DEFAULT_LOG_BITMASK 0xffff
|
2012-04-30 04:17:14 -03:00
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Developer Items
|
|
|
|
//
|
|
|
|
|
|
|
|
// use this to enable servos in HIL mode
|
|
|
|
#ifndef HIL_SERVOS
|
2016-12-20 09:32:46 -04:00
|
|
|
#define HIL_SERVOS DISABLED
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// use this to completely disable the CLI
|
|
|
|
#ifndef CLI_ENABLED
|
2016-12-20 09:32:46 -04:00
|
|
|
#define CLI_ENABLED ENABLED
|
2012-04-30 04:17:14 -03:00
|
|
|
#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
|
2016-12-20 09:32:46 -04:00
|
|
|
#define RESET_SWITCH_CHAN_PWM 1750
|
2012-04-30 04:17:14 -03:00
|
|
|
#endif
|
2017-01-30 10:21:55 -04:00
|
|
|
|
|
|
|
#ifndef ADVANCED_FAILSAFE
|
|
|
|
#define ADVANCED_FAILSAFE DISABLED
|
|
|
|
#endif
|