I am programming a Pixhawk MINI, the 8 PMW outputs from pixhawk MINI are all MAIN outputs.
I want to set the PWM rate of the first 4 MAIN outputs to be 400Hz for ESCs, and the PWM rate of the last 4 MAIN outputs to be 50Hz for servo motors. I have written the following startup script
set VEHICLE_TYPE mc if [ $AUTOCNF == yes ] then param set NAV_ACC_RAD 2.0 param set RTL_RETURN_ALT 30.0 param set RTL_DESCEND_ALT 10.0 param set RTL_LAND_DELAY 0 fi set MIXER kly_delta_x3 param set PWM_MAX 1950 param set PWM_MIN 1075 set PWM_OUT 1234 set PWM_RATE 400 param set PWM_MAX 2200 param set PWM_MIN 800 set PWM_OUT 5678 set PWM_RATE 50
However, this startup script gives me 50Hz pwm rate for all 8 outputs. I have been changing this scripts in all different ways but could not set them at different PWM rates and ranges.
I am wondering what does “set PWM_OUT 1234” do exactly? Should I put the settings for 1234 before this line or after this line for them to take effect?
Please suggest what is the correct way to set different PWM rates and ranges for MAIN 1234 and 5678 in startup script.