VTOL push motor ESC calibration

At some point my pusher motor stoped working.
I figured out that issue is about calibration.
When drone is powered up it not works.
And if I run ESC calibration it plays some melody and sometimes even works until first reboot.
The most reliable way to calibrate I’ve found is as follows

fw_attitude control stop
pwm -d /dev/pwm_output1 arm
pwm -d /dev/pwm_output1 test -c 4 -p 2000
pwm -d /dev/pwm_output1 test -c 4 -p 900

Then it starts rotating.

fw_attitude control start

But after reboot the situation repeats.

I think there is something with init scripts I changed at some point which prevents motor from working as it was working some time ago. but I can’t figure what what exactly and don’t have the old config unfortunately.

And this is what my init script looks like now:

# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
# @output MAIN5 motor 5
# @output MAIN6 motor 6
# @output MAIN7 motor 7
# @output MAIN8 motor 8
# @output AUX1 Ailerons
# @output AUX2 Elevator
# @output AUX3 Rudder
# @output AUX4 Throttle
# @output AUX5 Flaps
#

sh /etc/init.d/rc.vtol_defaults

if [ $AUTOCNF == yes ]
then
        param set VT_TYPE 2
    param set VT_MOT_COUNT 8
fi

set MIXER octo_cox

set MIXER_AUX vtol_AERTF_ranger
set PWM_ACHDIS 4
set PWM_AUX_DISARMED 900
set PWM_AUX_RATE 400
set PWM_AUX_MIN 900
set PWM_AUX_OUT 12345

set MAV_TYPE 22

param set UAVCAN_ENABLE 3
param set CBRK_IO_SAFETY 22027

The controller is pixhawk 4.

1 Like

Figured out finaly the issue.
This is always confused me. set vs param set.
While there is a PWM_AUX_MIN env variable defined in rcS file:

set PWM_AUX_MIN p:PWM_AUX_MIN

It is not used anywhere in the scripts.
So my min value for pwm was the default one (1000) and ESC requires it to be 900 (the minimum value received during calibration) to get initialized

So to set this parameter up one should use:

param set PWM_AUX_MIN 900

Btw. What does this p:PWM_AUX_MIN means? I did not found documentation about this p: syntax.