mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-26 09:26:25 +08:00
pwm_out, dshot: add dynamic mixing support
This commit is contained in:
@@ -96,10 +96,16 @@ then
|
||||
|
||||
if [ $OUTPUT_MODE = $OUTPUT_CMD -o $OUTPUT_MODE = io ]
|
||||
then
|
||||
if ! $OUTPUT_CMD start
|
||||
if param compare SYS_CTRL_ALLOC 1
|
||||
then
|
||||
echo "$OUTPUT_CMD start failed"
|
||||
tune_control play error
|
||||
pwm_out start
|
||||
dshot start
|
||||
else
|
||||
if ! $OUTPUT_CMD start
|
||||
then
|
||||
echo "$OUTPUT_CMD start failed"
|
||||
tune_control play error
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -214,10 +220,10 @@ fi
|
||||
|
||||
if [ $OUTPUT_MODE = pwm_out -o $OUTPUT_MODE = io ]
|
||||
then
|
||||
if [ $PWM_OUT != none ]
|
||||
if [ $PWM_OUT != none -a $PWM_MAIN_RATE != none ]
|
||||
then
|
||||
# Set PWM output frequency.
|
||||
if [ $PWM_MAIN_RATE != none ]
|
||||
if ! param compare SYS_CTRL_ALLOC 1
|
||||
then
|
||||
pwm rate -c ${PWM_OUT} -r ${PWM_MAIN_RATE}
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user