#!/bin/sh
#
# @name ZMR250 Racer
#
# @type Quadrotor x
# @class Copter
#
# @maintainer Anton Matosov <anton.matosov@gmail.com>
#
# @board px4_fmu-v2 exclude
# @board intel_aerofc-v1 exclude
# @board bitcraze_crazyflie exclude
#

. /etc/init.d/rc.mc_defaults

set MIXER quad_x
set PWM_OUT 1234

if [ $AUTOCNF = yes ]
then
	param set CBRK_IO_SAFETY 22027

	param set FAILSAFE 100

	param set MC_ROLL_P 2.2
	param set MC_ROLLRATE_P 0.06
	param set MC_ROLLRATE_I 0.2
	param set MC_ROLLRATE_D 0.0017

	param set MC_PITCH_P 2.2
	param set MC_PITCHRATE_P 0.06
	param set MC_PITCHRATE_I 0.2
	param set MC_PITCHRATE_D 0.0017

	param set MC_YAW_P 1
	param set MC_YAWRATE_P 0.15
	param set MC_YAWRATE_I 0.2
	param set MC_YAWRATE_D 0

	param set MC_ACRO_R_MAX 1000
	param set MC_ACRO_P_MAX 1000
	param set MC_ACRO_Y_MAX 1000

	# param set NAV_RCL_ACT 6 # Lockdown

	param set PWM_MIN 1075
	param set PWM_RATE 400
	param set PWM_DISARMED 900
fi
