Untitled
unknown
plain_text
2 years ago
7.3 kB
4
Indexable
#ifndef CONFIG_H_
#define CONFIG_H_
#define QUADX
#define MINTHROTTLE 1200 // (*) (**)
#define MAXTHROTTLE 2000
#define MINCOMMAND 1000
#define I2C_SPEED 100000L //100kHz normal mode, this value must be used for a genuine WMP
#define PID_CONTROLLER 1
#define YAW_DIRECTION 1
#define ONLYARMWHENFLAT //prevent the copter from arming when the copter is tilted
#define ALLOW_ARM_DISARM_VIA_TX_YAW
#define CAM_TIME_HIGH 1000 // the duration of HIGH state servo expressed in ms
//#define FLAPPERONS AUX4 // Mix Flaps with Aileroins.
#define FLAPPERON_EP { 1500, 1700 } // Endpooints for flaps on a 2 way switch else set {1020,2000} and program in radio.
#define FLAPPERON_INVERT { -1, 1 } // Change direction om flapperons { Wing1, Wing2 }
#define YAW_COLL_PRECOMP 10
#define YAW_COLL_PRECOMP_DEADBAND 120
#define COLLECTIVE_PITCH THROTTLE
#define COLLECTIVE_RANGE { 80, 0, 80 }// {Min%, ZeroPitch offset from 1500, Max%}.
#define YAWMOTOR 0 // If a motor is used as YAW Set to 1 else set to 0.
#define SERVO_NICK { +10, -10, 0 }
#define SERVO_LEFT { +10, +5, +10 }
#define SERVO_RIGHT { +10, +5, -10 }
/* Limit Maximum controll for Roll & Nick in 0-100% */
#define CONTROL_RANGE { 100, 100 } // { ROLL,PITCH }
#define SBUS_MID_OFFSET 988 //SBUS Mid-Point at 1500
#define SERIAL0_COM_SPEED 115200
#define SERIAL1_COM_SPEED 115200
#define SERIAL2_COM_SPEED 115200
#define SERIAL3_COM_SPEED 115200
#define NEUTRALIZE_DELAY 100000
#define FAILSAFE_DELAY 10 // Guard time for failsafe activation after signal lost. 1 step = 0.1sec - 1sec in example
#define FAILSAFE_OFF_DELAY 200 // Time for Landing before motors stop in 0.1sec. 1 step = 0.1sec - 20sec in example
#define FAILSAFE_THROTTLE (MINTHROTTLE + 200) // (*) Throttle level used for landing - may be relative to MINTHROTTLE - as in this case
#define FAILSAFE_DETECT_TRESHOLD 98
#define GPS_BAUD 57600 // GPS_BAUD will override SERIALx_COM_SPEED for the selected port
#define GPS_LED_INDICATOR
// copter faces toward the navigation point, maghold must be enabled for it
#define NAV_CONTROLS_HEADING 1 //(**)
// true - copter comes in with tail first
#define NAV_TAIL_FIRST 0 //(**)
// true - when copter arrives to home position it rotates it's head to takeoff direction
#define NAV_SET_TAKEOFF_HEADING 1 //(**)
#define MAG_DECLINATION 4.02f //(**)
// Adds a forward predictive filterig to compensate gps lag. Code based on Jason Short's lead filter implementation
#define GPS_LEAD_FILTER //(**)
#define GPS_WP_RADIUS 100 //(**)
#define SAFE_WP_DISTANCE 500 //(**)
//Maximu allowable navigation altitude (in meters) automatic altitude control will not go above this height
#define MAX_NAV_ALTITUDE 100 //(**)
// minimum speed when approach waypoint
#define NAV_SPEED_MIN 100 // cm/sec //(**)
// maximum speed to reach between waypoints
#define NAV_SPEED_MAX 400 // cm/sec //(**)
// Slow down to zero when reaching waypoint (same as NAV_SPEED_MIN = 0)
#define NAV_SLOW_NAV 0 //(**)
// Weight factor of the crosstrack error in navigation calculations (do not touch)
#define CROSSTRACK_GAIN .4 //(**)
// Maximum allowable banking than navigation outputs
#define NAV_BANK_MAX 3000 //(**)
//Defines the RTH altitude. 0 means keep current alt during RTH (in meters)
#define RTH_ALTITUDE 15 //(**)
//Wait to reach RTH alt before start moving to home (0-no, 1-yes)
#define WAIT_FOR_RTH_ALT 1 //(**)
//Navigation engine will takeover BARO mode control
#define NAV_TAKEOVER_BARO 1 //(**)
//Throttle stick input will be ignored (only in BARO)
#define IGNORE_THROTTLE 1 //(**)
#define FENCE_DISTANCE 600
//This governs the descent speed during landing. 100 is equals approc 50cm/sec
#define LAND_SPEED 100
#define LCD_SERIAL_PORT 0 // must be 0 on Pro Mini and single serial boards; Set to your choice on any Mega based board
#define LCD_MENU_PREV 'p'
#define LCD_MENU_NEXT 'n'
#define LCD_VALUE_UP 'u'
#define LCD_VALUE_DOWN 'd'
#define LCD_MENU_SAVE_EXIT 's'
#define LCD_MENU_ABORT 'x'
#define VBATSCALE 131 // (*) (**) change this value if readed Battery voltage is different than real voltage
#define VBATNOMINAL 126 // 12,6V full battery nominal voltage - only used for lcd.telemetry
#define VBATLEVEL_WARN1 107 // (*) (**) 10,7V
#define VBATLEVEL_WARN2 99 // (*) (**) 9.9V
#define VBATLEVEL_CRIT 93 // (*) (**) 9.3V - critical condition: if vbat ever goes below this value, permanent alarm is triggered
#define NO_VBAT 16 // Avoid beeping without any battery
#define VBAT_OFFSET 0 // offset in 0.1Volts, gets added to voltage value - useful for zener diodes
#define VBAT_CELLS_NUM 0 // set this to the number of cells you monitor via analog pins
#define VBAT_CELLS_PINS {A0, A1, A2, A3, A4, A5 } // set this to the sequence of analog pins
#define VBAT_CELLS_OFFSETS {0, 50, 83, 121, 149, 177 } // in 0.1 volts, gets added to voltage value - useful for zener diodes
#define VBAT_CELLS_DIVS { 75, 122, 98, 18, 30, 37 } // divisor for proportional part according to resistors - larger value here gives smaller voltage
#define PSENSORNULL 510 /* (*) hard only: set to analogRead() value for zero current; for I=0A my sensor
gives 1/2 Vss; that is approx 2.49Volt; */
#define PINT2mA 132
#define ALT_HOLD_THROTTLE_NEUTRAL_ZONE 50
#define BOARD_NAME "MultiWii V-.--"
#define NO_FLASH_CHECK
#define VBAT_PRESCALER 16 // set this to 8 if vbatscale would exceed 255
#define MIDRC 1500
#define SERVO_RFR_50HZ
#define MEGA_HW_PWM_SERVOS
#define SERVO_RFR_RATE 50 // In Hz, you can set it from 20 to 400Hz, used only in HW PWM mode for mega and 32u4
//#define SERVO_PIN5_RFR_RATE 200 // separate yaw pwm rate.
#define ESC_CALIB_LOW MINCOMMAND
#define ESC_CALIB_HIGH 2000
#define LCD_TELEMETRY_FREQ 23 // to send telemetry data over serial 23 <=> 60ms <=> 16Hz (only sending interlaced, so 8Hz update rate)
#define LCD_TELEMETRY_AUTO_FREQ 967// to step to next telemetry page 967 <=> 3s
#define PSENSOR_SMOOTH 16 // len of averaging vector for smoothing the PSENSOR readings; should be power of 2; set to 1 to disable
#define VBAT_SMOOTH 16 // len of averaging vector for smoothing the VBAT readings; should be power of 2; set to 1 to disable
#define RSSI_SMOOTH 16 // len of averaging vector for smoothing the RSSI readings; should be power of 2; set to 1 to disable
#define DISABLE_POWER_PIN
#endif /* CONFIG_H_ */
Editor is loading...