mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 16:48:52 +08:00
Mavlink startup script per board
-moved rc.mavlink to the boards optional rc additions (now it's called rc.board_mavlink) to handle board specific mavlink needs (mavlink over usb, ethernet, additional streams, etc.) -mavlink module will be responsible to usb defaults, therefore less args are needed to be passed to mavlink module if one wants to use mavlink over usb. -the way to check if connection is usb is by it's designated variable and not by config mode.
This commit is contained in:
@@ -143,6 +143,7 @@ list(APPEND OPTIONAL_BOARD_RC
|
||||
rc.board_defaults
|
||||
rc.board_sensors
|
||||
rc.board_extras
|
||||
rc.board_mavlink
|
||||
)
|
||||
|
||||
foreach(board_rc_file ${OPTIONAL_BOARD_RC})
|
||||
|
||||
@@ -39,7 +39,6 @@ px4_add_romfs_files(
|
||||
rc.interface
|
||||
rc.io
|
||||
rc.logging
|
||||
rc.mavlink
|
||||
rc.mc_apps
|
||||
rc.mc_defaults
|
||||
rcS
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# MAVLink startup script.
|
||||
#
|
||||
# NOTE: Script variables are declared/initialized/unset in the rcS script.
|
||||
#
|
||||
|
||||
if ! ver hwcmp INTEL_AEROFC_V1
|
||||
then
|
||||
# Start MAVLink on the USB port
|
||||
mavlink start -r 800000 -d /dev/ttyACM0 -m config -x
|
||||
fi
|
||||
|
||||
@@ -396,9 +396,15 @@ else
|
||||
fi
|
||||
|
||||
#
|
||||
# Start mavlink streams that are not configurable (e.g. on USB).
|
||||
# Optional board mavlink streams: rc.board_mavlink
|
||||
#
|
||||
sh /etc/init.d/rc.mavlink
|
||||
set BOARD_RC_MAVLINK /etc/init.d/rc.board_mavlink
|
||||
if [ -f $BOARD_RC_MAVLINK ]
|
||||
then
|
||||
echo "Board extras: ${BOARD_RC_MAVLINK}"
|
||||
sh $BOARD_RC_MAVLINK
|
||||
fi
|
||||
unset BOARD_RC_MAVLINK
|
||||
|
||||
#
|
||||
# Start UART/Serial device drivers.
|
||||
|
||||
Reference in New Issue
Block a user