#!nsh
#
# @name Generic quad delta VTOL
# @type Standard VTOL
# @maintainer Simon Wilks <simon@uaventure.com>
# @output MAIN1 Front right motor: CCW
# @output MAIN2 Back left motor: CCW
# @output MAIN3 Front left motor: CW
# @output MAIN4 Back right motor: CW
# @output AUX1 Right elevon
# @output AUX2 Left elevon
# @output AUX3 Motor
#

sh /etc/init.d/rc.vtol_defaults

if [ $AUTOCNF == yes ]
then
	param set VT_TYPE 2
	param set VT_MOT_COUNT 4
	param set VT_TRANS_THR 0.75

	param set MC_ROLL_P 6.5
	param set MC_ROLLRATE_P 0.15
	param set MC_ROLLRATE_I 0.01
	param set MC_ROLLRATE_D 0.003
	param set MC_ROLLRATE_FF 0.0
	param set MC_PITCH_P 6.5
	param set MC_PITCHRATE_P 0.15
	param set MC_PITCHRATE_I 0.01
	param set MC_PITCHRATE_D 0.003
	param set MC_PITCHRATE_FF 0.0
	param set MC_YAW_P 3.5
	param set MC_YAW_FF 0.5
	param set MC_YAWRATE_P 0.2
	param set MC_YAWRATE_I 0.1
	param set MC_YAWRATE_D 0.0
	param set MC_YAWRATE_FF 0.0
	param set MC_YAWRATE_MAX 20
	param set MC_YAWRAUTO_MAX 20

	param set MPC_XY_P 0.8
	param set MPC_XY_VEL_P 0.1
	param set MPC_ACC_HOR_MAX 2.0

	param set VT_MOT_COUNT 4
	param set VT_IDLE_PWM_MC 1080
	param set VT_TYPE 2
fi

set MIXER vtol_quad_x
set PWM_OUT 1234
set PWM_RATE 400

set MIXER_AUX vtol_delta
set PWM_ACHDIS 3
set PWM_AUX_DISARMED 950

set MAV_TYPE 22
