#!nsh
#
# @name Intel Aero RTF
#
# @board px4fmu-v1 exclude
# @board px4fmu-v2 exclude
# @board px4fmu-v3 exclude
# @board px4fmu-v4 exclude
# @board px4fmu-v4pro exclude
# @board px4fmu-v5 exclude
#
# @type Quadrotor x

sh /etc/init.d/rc.mc_defaults

#
# Load default params for this platform
#
if [ $AUTOCNF == yes ]
then
	# Set all params here, then disable autoconfig
	param set MC_ROLL_P 8.0000
	param set MC_ROLLRATE_P 0.1300
	param set MC_ROLLRATE_I 0.05
	param set MC_ROLLRATE_D 0.0012
	param set MC_ROLLRATE_MAX 360
	param set MC_PITCH_P 8.0000
	param set MC_PITCHRATE_P 0.1300
	param set MC_PITCHRATE_I 0.05
	param set MC_PITCHRATE_D 0.0012
	param set MC_PITCHRATE_MAX 360
	param set MC_YAW_P 4.0
	param set MC_YAWRATE_P 0.119999997317790985
	param set MC_YAWRATE_I 0.050000000745058060
	param set MC_YAWRATE_D 0.0
	param set MC_YAW_FF 0.5
	param set MPC_XY_CRUISE 8

	param set SYS_LOGGER 1
fi

tap_esc start -d /dev/ttyS0 -n 4
usleep 300000

set OUTPUT_MODE tap_esc
set MIXER quad_x
set USE_IO no

param set SYS_COMPANION 1500000
set MAVLINK_COMPANION_DEVICE /dev/ttyS1
