mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 07:23:34 +08:00
Reduce ROMFS footprint
This commit is contained in:
@@ -8,12 +8,11 @@ then
|
|||||||
#
|
#
|
||||||
# Load mixer
|
# Load mixer
|
||||||
#
|
#
|
||||||
set MIXERSD /fs/microsd/etc/mixers/$MIXER.mix
|
|
||||||
|
|
||||||
#Use the mixer file from the SD-card if it exists
|
#Use the mixer file from the SD-card if it exists
|
||||||
if [ -f $MIXERSD ]
|
if [ -f /fs/microsd/etc/mixers/$MIXER.mix ]
|
||||||
then
|
then
|
||||||
set MIXER_FILE $MIXERSD
|
set MIXER_FILE /fs/microsd/etc/mixers/$MIXER.mix
|
||||||
else
|
else
|
||||||
set MIXER_FILE /etc/mixers/$MIXER.mix
|
set MIXER_FILE /etc/mixers/$MIXER.mix
|
||||||
fi
|
fi
|
||||||
@@ -35,19 +34,21 @@ then
|
|||||||
echo "[init] Mixer loaded: $MIXER_FILE"
|
echo "[init] Mixer loaded: $MIXER_FILE"
|
||||||
else
|
else
|
||||||
echo "[init] Error loading mixer: $MIXER_FILE"
|
echo "[init] Error loading mixer: $MIXER_FILE"
|
||||||
tone_alarm $TUNE_OUT_ERROR
|
tone_alarm $TUNE_ERR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
unset MIXER_FILE
|
||||||
else
|
else
|
||||||
if [ $MIXER != skip ]
|
if [ $MIXER != skip ]
|
||||||
then
|
then
|
||||||
echo "[init] Mixer not defined"
|
echo "[init] Mixer not defined"
|
||||||
tone_alarm $TUNE_OUT_ERROR
|
tone_alarm $TUNE_ERR
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $OUTPUT_MODE == fmu -o $OUTPUT_MODE == io ]
|
if [ $OUTPUT_MODE == fmu -o $OUTPUT_MODE == io ]
|
||||||
then
|
then
|
||||||
if [ $PWM_OUTPUTS != none ]
|
if [ $PWM_OUT != none ]
|
||||||
then
|
then
|
||||||
#
|
#
|
||||||
# Set PWM output frequency
|
# Set PWM output frequency
|
||||||
@@ -55,7 +56,7 @@ then
|
|||||||
if [ $PWM_RATE != none ]
|
if [ $PWM_RATE != none ]
|
||||||
then
|
then
|
||||||
echo "[init] Set PWM rate: $PWM_RATE"
|
echo "[init] Set PWM rate: $PWM_RATE"
|
||||||
pwm rate -c $PWM_OUTPUTS -r $PWM_RATE
|
pwm rate -c $PWM_OUT -r $PWM_RATE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -64,17 +65,17 @@ then
|
|||||||
if [ $PWM_DISARMED != none ]
|
if [ $PWM_DISARMED != none ]
|
||||||
then
|
then
|
||||||
echo "[init] Set PWM disarmed: $PWM_DISARMED"
|
echo "[init] Set PWM disarmed: $PWM_DISARMED"
|
||||||
pwm disarmed -c $PWM_OUTPUTS -p $PWM_DISARMED
|
pwm disarmed -c $PWM_OUT -p $PWM_DISARMED
|
||||||
fi
|
fi
|
||||||
if [ $PWM_MIN != none ]
|
if [ $PWM_MIN != none ]
|
||||||
then
|
then
|
||||||
echo "[init] Set PWM min: $PWM_MIN"
|
echo "[init] Set PWM min: $PWM_MIN"
|
||||||
pwm min -c $PWM_OUTPUTS -p $PWM_MIN
|
pwm min -c $PWM_OUT -p $PWM_MIN
|
||||||
fi
|
fi
|
||||||
if [ $PWM_MAX != none ]
|
if [ $PWM_MAX != none ]
|
||||||
then
|
then
|
||||||
echo "[init] Set PWM max: $PWM_MAX"
|
echo "[init] Set PWM max: $PWM_MAX"
|
||||||
pwm max -c $PWM_OUTPUTS -p $PWM_MAX
|
pwm max -c $PWM_OUT -p $PWM_MAX
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user