aboutsummaryrefslogtreecommitdiff
path: root/ROMFS/px4fmu_common/init.d/rc.fw_interface
blob: 1bf7a0e0300b85e8382b86660e7096539bd3f228 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!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