mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-30 04:03:34 +08:00
Applied code review comments (newline at end of file, whitespaces in empty lines)
This commit is contained in:
@@ -9,4 +9,4 @@ sh /etc/init.d/rc.mc_defaults
|
|||||||
|
|
||||||
set MIXER quad_+
|
set MIXER quad_+
|
||||||
|
|
||||||
set HIL yes
|
set HIL yes
|
||||||
|
|||||||
@@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
sh /etc/init.d/rc.fw_defaults
|
sh /etc/init.d/rc.fw_defaults
|
||||||
|
|
||||||
set MIXER AERT
|
set MIXER AERT
|
||||||
|
|||||||
@@ -4,25 +4,25 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
set SDCARD_MIXERS_PATH /fs/microsd/etc/mixers
|
set SDCARD_MIXERS_PATH /fs/microsd/etc/mixers
|
||||||
|
|
||||||
if [ $MIXER != none -a $MIXER != skip ]
|
if [ $MIXER != none -a $MIXER != skip ]
|
||||||
then
|
then
|
||||||
#
|
#
|
||||||
# Load main mixer
|
# Load main mixer
|
||||||
#
|
#
|
||||||
|
|
||||||
if [ $MIXER_AUX == none ]
|
if [ $MIXER_AUX == none ]
|
||||||
then
|
then
|
||||||
set MIXER_AUX $MIXER.aux
|
set MIXER_AUX $MIXER.aux
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Use the mixer file from the SD-card if it exists
|
# Use the mixer file from the SD-card if it exists
|
||||||
if [ -f $SDCARD_MIXERS_PATH/$MIXER.main.mix ]
|
if [ -f $SDCARD_MIXERS_PATH/$MIXER.main.mix ]
|
||||||
then
|
then
|
||||||
set MIXER_FILE $SDCARD_MIXERS_PATH/$MIXER.main.mix
|
set MIXER_FILE $SDCARD_MIXERS_PATH/$MIXER.main.mix
|
||||||
# Try out the old convention, for backward compatibility
|
# Try out the old convention, for backward compatibility
|
||||||
else
|
else
|
||||||
|
|
||||||
if [ -f $SDCARD_MIXERS_PATH/$MIXER.mix ]
|
if [ -f $SDCARD_MIXERS_PATH/$MIXER.mix ]
|
||||||
then
|
then
|
||||||
set MIXER_FILE $SDCARD_MIXERS_PATH/$MIXER.mix
|
set MIXER_FILE $SDCARD_MIXERS_PATH/$MIXER.mix
|
||||||
@@ -30,19 +30,19 @@ then
|
|||||||
set MIXER_FILE /etc/mixers/$MIXER.main.mix
|
set MIXER_FILE /etc/mixers/$MIXER.main.mix
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $OUTPUT_MODE == mkblctrl ]
|
if [ $OUTPUT_MODE == mkblctrl ]
|
||||||
then
|
then
|
||||||
set OUTPUT_DEV /dev/mkblctrl
|
set OUTPUT_DEV /dev/mkblctrl
|
||||||
else
|
else
|
||||||
set OUTPUT_DEV /dev/pwm_output
|
set OUTPUT_DEV /dev/pwm_output
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $OUTPUT_MODE == uavcan_esc ]
|
if [ $OUTPUT_MODE == uavcan_esc ]
|
||||||
then
|
then
|
||||||
set OUTPUT_DEV /dev/uavcan/esc
|
set OUTPUT_DEV /dev/uavcan/esc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if mixer load $OUTPUT_DEV $MIXER_FILE
|
if mixer load $OUTPUT_DEV $MIXER_FILE
|
||||||
then
|
then
|
||||||
echo "[i] Mixer: $MIXER_FILE"
|
echo "[i] Mixer: $MIXER_FILE"
|
||||||
@@ -71,7 +71,7 @@ then
|
|||||||
then
|
then
|
||||||
pwm rate -c $PWM_OUT -r $PWM_RATE
|
pwm rate -c $PWM_OUT -r $PWM_RATE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Set disarmed, min and max PWM values
|
# Set disarmed, min and max PWM values
|
||||||
#
|
#
|
||||||
@@ -101,20 +101,20 @@ then
|
|||||||
#
|
#
|
||||||
# Load aux mixer
|
# Load aux mixer
|
||||||
#
|
#
|
||||||
|
|
||||||
set MIXER_AUX_FILE none
|
set MIXER_AUX_FILE none
|
||||||
|
|
||||||
if [ -f $SDCARD_MIXERS_PATH/$MIXER_AUX.mix ]
|
if [ -f $SDCARD_MIXERS_PATH/$MIXER_AUX.mix ]
|
||||||
then
|
then
|
||||||
set MIXER_AUX_FILE $SDCARD_MIXERS_PATH/$MIXER_AUX.mix
|
set MIXER_AUX_FILE $SDCARD_MIXERS_PATH/$MIXER_AUX.mix
|
||||||
else
|
else
|
||||||
|
|
||||||
if [ -f /etc/mixers/$MIXER_AUX.mix ]
|
if [ -f /etc/mixers/$MIXER_AUX.mix ]
|
||||||
then
|
then
|
||||||
set MIXER_AUX_FILE /etc/mixers/$MIXER_AUX.mix
|
set MIXER_AUX_FILE /etc/mixers/$MIXER_AUX.mix
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $MIXER_AUX_FILE != none -a $FMU_MODE == pwm ]
|
if [ $MIXER_AUX_FILE != none -a $FMU_MODE == pwm ]
|
||||||
then
|
then
|
||||||
if fmu mode_pwm
|
if fmu mode_pwm
|
||||||
@@ -124,4 +124,4 @@ then
|
|||||||
tone_alarm $TUNE_ERR
|
tone_alarm $TUNE_ERR
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user