#!nsh
#
# @name ZMR250 Racer
#
# @type Quadrotor x
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
#
# @maintainer Anton Matosov <anton.matosov@gmail.com>
#

sh /etc/init.d/rc.mc_defaults

set MIXER zmr250
set PWM_OUT 1234

if [ $AUTOCNF == yes ]
then
	param set MC_ROLL_P 2.0
	param set MC_ROLLRATE_P 0.05
	param set MC_ROLLRATE_I 0.2
	param set MC_ROLLRATE_D	0.0015
	param set MC_ROLL_TC 0.18

	param set MC_PITCH_P 2.0
	param set MC_PITCHRATE_P 0.05
	param set MC_PITCHRATE_I 0.2
	param set MC_PITCHRATE_D 0.0015
	param set MC_PITCH_TC 0.18

	param set MC_YAW_P 1.0
	param set MC_YAWRATE_P 0.15
	param set MC_YAWRATE_I 0.2
	param set MC_YAWRATE_D 0.0
	param set MC_YAW_FF 0.5

	param set MC_ACRO_R_MAX 1080.0
	param set MC_ACRO_P_MAX 1080.0
	param set MC_ACRO_Y_MAX 1080.0

	param set MC_TPA_BREAK_P 0.5
	param set MC_TPA_BREAK_D 0.7
	param set MC_TPA_RATE_P 0.5
	param set MC_TPA_RATE_D 0.5

	param set PWM_MIN 1075
	param set PWM_RATE 400
	param set PWM_DISARMED 900
	param set FAILSAFE 100

	# param set NAV_RCL_ACT 6 # Lockdown

	param set CBRK_IO_SAFETY 22027
fi
