pwm_out, dshot: add dynamic mixing support

This commit is contained in:
Beat Küng
2021-09-17 11:56:42 +02:00
committed by Daniel Agar
parent 3ff6014a3c
commit c1e5e666f0
6 changed files with 305 additions and 68 deletions
+11 -5
View File
@@ -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