Add option for custom mavlink configuration

This commit enables a option for users to add a custom mavlink configuration through rc.mavlink_override
This commit is contained in:
Jaeyoung-Lim
2021-01-22 15:42:56 +01:00
committed by Beat Küng
parent 17ea6f68e2
commit fa5a6cf712
+6
View File
@@ -238,6 +238,11 @@ fi
# #
. ${R}etc/init.d/rc.vehicle_setup . ${R}etc/init.d/rc.vehicle_setup
if [ -e etc/init.d-posix/rc.mavlink_override ]
then
echo "Running non-default mavlink config rc.mavlink_override"
sh etc/init.d-posix/rc.mavlink_override
else
# GCS link # GCS link
mavlink start -x -u $udp_gcs_port_local -r 4000000 mavlink start -x -u $udp_gcs_port_local -r 4000000
mavlink stream -r 50 -s POSITION_TARGET_LOCAL_NED -u $udp_gcs_port_local mavlink stream -r 50 -s POSITION_TARGET_LOCAL_NED -u $udp_gcs_port_local
@@ -256,6 +261,7 @@ mavlink start -x -u $udp_offboard_port_local -r 4000000 -m onboard -o $udp_offbo
# Onboard link to camera # Onboard link to camera
mavlink start -x -u $udp_onboard_payload_port_local -r 4000 -f -m onboard -o $udp_onboard_payload_port_remote mavlink start -x -u $udp_onboard_payload_port_local -r 4000 -f -m onboard -o $udp_onboard_payload_port_remote
fi
# execute autostart post script if any # execute autostart post script if any
[ -e "$autostart_file".post ] && . "$autostart_file".post [ -e "$autostart_file".post ] && . "$autostart_file".post