2013-07-18 17:49:04 -03:00
|
|
|
#!nsh
|
|
|
|
|
2014-01-09 05:05:24 -04:00
|
|
|
# Maintainers: Anton Babushkin <anton.babushkin@me.com>
|
|
|
|
|
2013-08-28 09:58:29 -03:00
|
|
|
echo "[init] PX4FMU v1, v2 with or without IO on DJI F330"
|
2013-08-19 17:58:50 -03:00
|
|
|
|
2014-01-09 05:05:24 -04:00
|
|
|
# Use generic quad X PWM as base
|
|
|
|
sh /etc/init.d/4001_quad_x_pwm
|
|
|
|
|
2014-01-08 15:55:12 -04:00
|
|
|
if [ $DO_AUTOCONFIG == yes ]
|
2013-07-18 17:49:04 -03:00
|
|
|
then
|
2014-01-08 15:55:12 -04:00
|
|
|
#
|
|
|
|
# Default parameters for this platform
|
|
|
|
#
|
2013-10-13 10:54:02 -03:00
|
|
|
param set MC_ATT_P 7.0
|
2014-01-08 15:55:12 -04:00
|
|
|
param set MC_ATT_I 0.0
|
|
|
|
param set MC_ATT_D 0.0
|
2014-01-09 05:05:24 -04:00
|
|
|
param set MC_ATTRATE_P 0.12
|
|
|
|
param set MC_ATTRATE_I 0.0
|
|
|
|
param set MC_ATTRATE_D 0.004
|
|
|
|
param set MC_YAWPOS_P 2.8
|
2014-01-08 15:55:12 -04:00
|
|
|
param set MC_YAWPOS_I 0.0
|
|
|
|
param set MC_YAWPOS_D 0.0
|
2014-01-09 05:05:24 -04:00
|
|
|
param set MC_YAWRATE_P 0.2
|
|
|
|
param set MC_YAWRATE_I 0.05
|
|
|
|
param set MC_YAWRATE_D 0.0
|
2014-01-08 15:55:12 -04:00
|
|
|
|
2013-09-03 18:16:32 -03:00
|
|
|
param set MPC_TILT_MAX 0.5
|
2014-01-08 15:55:12 -04:00
|
|
|
param set MPC_THR_MAX 0.8
|
|
|
|
param set MPC_THR_MIN 0.2
|
2013-09-03 18:16:32 -03:00
|
|
|
param set MPC_XY_D 0
|
|
|
|
param set MPC_XY_P 0.5
|
|
|
|
param set MPC_XY_VEL_D 0
|
|
|
|
param set MPC_XY_VEL_I 0
|
2013-09-05 05:27:35 -03:00
|
|
|
param set MPC_XY_VEL_MAX 3
|
2013-09-03 18:16:32 -03:00
|
|
|
param set MPC_XY_VEL_P 0.2
|
|
|
|
param set MPC_Z_D 0
|
|
|
|
param set MPC_Z_P 1
|
|
|
|
param set MPC_Z_VEL_D 0
|
2013-09-05 05:27:35 -03:00
|
|
|
param set MPC_Z_VEL_I 0.1
|
2013-09-03 18:16:32 -03:00
|
|
|
param set MPC_Z_VEL_MAX 2
|
|
|
|
param set MPC_Z_VEL_P 0.20
|
2013-07-18 17:49:04 -03:00
|
|
|
fi
|
2013-08-19 17:58:50 -03:00
|
|
|
|
2014-01-09 05:05:24 -04:00
|
|
|
# DJI ESC range
|
|
|
|
set PWM_DISARMED 900
|
2014-01-08 15:55:12 -04:00
|
|
|
set PWM_MIN 1200
|
|
|
|
set PWM_MAX 1900
|