Skip to content

Commit

Permalink
FMU boot: Do not set params unless in config mode
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzMeier committed Sep 4, 2016
1 parent 585147d commit 2548705
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions ROMFS/px4fmu_common/init.d/rcS
Original file line number Diff line number Diff line change
Expand Up @@ -219,16 +219,6 @@ then
fi
unset FCONFIG

#
# If autoconfig parameter was set, reset it and save parameters
#
if [ $AUTOCNF == yes ]
then
param set SYS_AUTOCONFIG 0
param save
fi
unset AUTOCNF

set IO_PRESENT no

if [ $USE_IO == yes ]
Expand Down Expand Up @@ -837,8 +827,7 @@ then
then
echo "WARN [init] Unknown MAV_TYPE"
param set MAV_TYPE 19
else
param set MAV_TYPE $MAV_TYPE
set MAV_TYPE 19
fi

# Load mixer and configure outputs
Expand All @@ -861,8 +850,6 @@ then

# Start standard rover apps
sh /etc/init.d/rc.axialracing_ax10_apps

param set MAV_TYPE 10
fi

#
Expand Down Expand Up @@ -905,6 +892,17 @@ then
pwm rate -a -r 400
fi

#
# If autoconfig parameter was set, reset it and save parameters
#
if [ $AUTOCNF == yes ]
then
param set MAV_TYPE $MAV_TYPE
param set SYS_AUTOCONFIG 0
param save
fi
unset AUTOCNF

unset MIXER
unset MAV_TYPE
unset OUTPUT_MODE
Expand Down

0 comments on commit 2548705

Please sign in to comment.