diff --git a/ROMFS/px4fmu_common/init.d/4010_dji_f330 b/ROMFS/px4fmu_common/init.d/4010_dji_f330 index 50b8320613..a530d75ba9 100644 --- a/ROMFS/px4fmu_common/init.d/4010_dji_f330 +++ b/ROMFS/px4fmu_common/init.d/4010_dji_f330 @@ -21,25 +21,12 @@ then param set MC_YAWRATE_P 0.2 param set MC_YAWRATE_I 0.1 param set MC_YAWRATE_D 0.0 - param set PWM_DISARMED 900 + # DJI ESCs do not support calibration and need a higher min param set PWM_MIN 1230 - param set PWM_MAX 1950 fi # Transitional support: ensure suitable PWM min/max param values -if param compare PWM_MIN 1000 +if param compare PWM_MIN 1075 then param set PWM_MIN 1230 fi -if param compare PWM_MAX 2000 -then - param set PWM_MAX 1950 -fi -if param compare PWM_DISARMED 0 -then - param set PWM_DISARMED 900 -fi - -set PWM_DISARMED p:PWM_DISARMED -set PWM_MIN p:PWM_MIN -set PWM_MAX p:PWM_MAX diff --git a/ROMFS/px4fmu_common/init.d/4011_dji_f450 b/ROMFS/px4fmu_common/init.d/4011_dji_f450 index 1075a5376f..dafa3bf7bf 100644 --- a/ROMFS/px4fmu_common/init.d/4011_dji_f450 +++ b/ROMFS/px4fmu_common/init.d/4011_dji_f450 @@ -22,25 +22,12 @@ then param set MC_YAWRATE_P 0.3 param set MC_YAWRATE_I 0.1 param set MC_YAWRATE_D 0.0 - param set PWM_DISARMED 900 + # DJI ESCs do not support calibration and need a higher min param set PWM_MIN 1230 - param set PWM_MAX 1950 fi # Transitional support: ensure suitable PWM min/max param values -if param compare PWM_MIN 1000 +if param compare PWM_MIN 1075 then param set PWM_MIN 1230 fi -if param compare PWM_MAX 2000 -then - param set PWM_MAX 1950 -fi -if param compare PWM_DISARMED 0 -then - param set PWM_DISARMED 900 -fi - -set PWM_DISARMED p:PWM_DISARMED -set PWM_MIN p:PWM_MIN -set PWM_MAX p:PWM_MAX diff --git a/ROMFS/px4fmu_common/init.d/rc.mc_defaults b/ROMFS/px4fmu_common/init.d/rc.mc_defaults index 3482078165..eccee07e7b 100644 --- a/ROMFS/px4fmu_common/init.d/rc.mc_defaults +++ b/ROMFS/px4fmu_common/init.d/rc.mc_defaults @@ -14,13 +14,31 @@ then param set NAV_ACC_RAD 2.0 param set RTL_RETURN_ALT 30.0 param set RTL_DESCEND_ALT 10.0 + param set PWM_DISARMED 900 + param set PWM_MIN 1075 + param set PWM_MAX 1950 +fi + +# Transitional support: ensure suitable PWM min/max param values +if param compare PWM_MIN 1000 +then + param set PWM_MIN 1075 +fi +if param compare PWM_MAX 2000 +then + param set PWM_MAX 1950 +fi +if param compare PWM_DISARMED 0 +then + param set PWM_DISARMED 900 fi # set environment variables (!= parameters) set PWM_RATE 400 -set PWM_DISARMED 900 -set PWM_MIN 1075 -set PWM_MAX 2000 +# tell the mixer to use parameters for these instead +set PWM_DISARMED p:PWM_DISARMED +set PWM_MIN p:PWM_MIN +set PWM_MAX p:PWM_MAX # This is the gimbal pass mixer set MIXER_AUX pass