Files
PX4-Autopilot/ROMFS/px4fmu_common/init.d/rc.fw_interface
T
2014-01-13 08:03:38 +01:00

35 lines
592 B
Plaintext

#!nsh
#
# Script to configure fixedwing control interface
#
#
# Force some key parameters to sane values
# MAV_TYPE 1 = fixed wing
#
param set MAV_TYPE 1
#
# Load mixer
#
echo "[init] Frame geometry: $FRAME_GEOMETRY"
set MIXERSD /fs/microsd/etc/mixers/FMU_$FRAME_GEOMETRY.mix
#Use the mixer file from the sd-card if it exists
if [ -f $MIXERSD ]
then
set MIXER $MIXERSD
else
set MIXER /etc/mixers/FMU_$FRAME_GEOMETRY.mix
fi
if mixer load /dev/pwm_output $MIXER
then
echo "[init] Mixer loaded: $MIXER"
else
echo "[init] Error loading mixer: $MIXER"
tone_alarm $TUNE_OUT_ERROR
fi