rcS: automate tfmini start

disable mavlink on aero telemetry if tfmini enabled and start on mavlink companion device for others (needs SYS_COMPANION to be 0)
This commit is contained in:
ChristophTobler 2018-01-31 09:14:34 +01:00 committed by Lorenz Meier
parent 8a1b6d548f
commit acaf7cd267
2 changed files with 19 additions and 1 deletions

View File

@ -400,6 +400,18 @@ then
then
# start the driver on serial 4/5
tfmini start -d /dev/ttyS6
else
if ver hwcmp AEROFC_V1
then
# start the driver on telemetry
tfmini start -d /dev/ttyS3
else
if param compare SYS_COMPANION 0
then
# start on default mavlink companion device
tfmini start -d /dev/ttyS2
fi
fi
fi
fi

View File

@ -554,7 +554,13 @@ then
if ver hwcmp AEROFC_V1
then
set MAVLINK_F "-r 1200 -d /dev/ttyS3"
# Only start mavlink if the Benewake TFMini isn't being used
if param greater SENS_EN_TFMINI 0
then
set MAVLINK_F none
else
set MAVLINK_F "-r 1200 -d /dev/ttyS3"
fi
fi
if ver hwcmp CRAZYFLIE