#!/bin/sh
#
# @name Fun Cub Quad VTOL
#
# @type Standard VTOL
# @class VTOL
#
# @maintainer Simon Wilks <simon@uaventure.com>
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
# @output AUX1 Aileron 1
# @output AUX2 Aileron 2
# @output AUX3 Elevator
# @output AUX4 Rudder
# @output AUX5 Throttle
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#

. ${R}etc/init.d/rc.vtol_defaults


param set-default PWM_AUX_DIS5 950

param set-default PWM_MAIN_RATE 400

param set-default MC_ROLL_P 6
param set-default MC_ROLLRATE_P 0.17
param set-default MC_ROLLRATE_I 0.002
param set-default MC_ROLLRATE_D 0.004
param set-default MC_ROLLRATE_FF 0
param set-default MC_PITCH_P 6
param set-default MC_PITCHRATE_P 0.19
param set-default MC_PITCHRATE_I 0.002
param set-default MC_PITCHRATE_D 0.004
param set-default MC_PITCHRATE_FF 0
param set-default MC_YAW_P 2.8
param set-default MC_YAWRATE_P 0.22
param set-default MC_YAWRATE_I 0.02
param set-default MC_YAWRATE_D 0
param set-default MC_YAWRATE_FF 0
param set-default MC_YAWRATE_MAX 40

param set-default MPC_YAWRAUTO_MAX 40

param set-default FW_PR_FF 0.5
param set-default FW_PR_I 0.02
param set-default FW_PR_IMAX 0.4
param set-default FW_PR_P 0.08
param set-default FW_RR_FF 0.6
param set-default FW_RR_I 0.01
param set-default FW_RR_IMAX 0.2
param set-default FW_RR_P 0.05
param set-default FW_THR_CRUISE 0.75

param set-default VT_ARSP_BLEND 6
param set-default VT_ARSP_TRANS 12
param set-default VT_F_TRANS_THR 0.75
param set-default VT_MOT_ID 1234
param set-default VT_FW_MOT_OFFID 1234
param set-default VT_IDLE_PWM_MC 1080
param set-default VT_TYPE 2
set MAV_TYPE 22

set MIXER quad_x
set MIXER_AUX vtol_AAERT

set PWM_OUT 1234
