Added support in Mavlink Ethernet channel parameters

Mavlink Ethernet channel settings such as udp port, remote port and broadcast mode now can be changed dynamically via parameters.
This commit is contained in:
garfieldG
2021-01-31 05:36:27 -08:00
committed by David Sidrane
parent b66a9629e0
commit 3cd9b3c2cf
36 changed files with 242 additions and 85 deletions

View File

@@ -81,6 +81,9 @@ file(GLOB jinja_templates ${PX4_SOURCE_DIR}/Tools/serial/*.jinja)
if (px4_constrained_flash_build)
set(added_arguments --constrained-flash)
endif()
if(PX4_ETHERNET)
set(added_arguments ${added_arguments} --ethernet)
endif()
# create list of relative romfs file names
set(romfs_copy_files_relative)
foreach(romfs_file IN LISTS romfs_copy_files)

View File

@@ -1,2 +1,2 @@
# shellcheck disable=SC2154
mavlink start -x -u 14558 -r 4000000 -m onboard -o 14541 # add mavlink stream for SDK
mavlink start -x -u 14558 -r 4000000 -m onboard -o 14541 -p # add mavlink stream for SDK

View File

@@ -38,7 +38,6 @@ then
param set NAV_LOITER_RAD 100
param set RWTO_TKOFF 1
param set MAV_BROADCAST 1
param set FW_ARSP_SCALE_EN 0

View File

@@ -1,7 +1,7 @@
mixer append /dev/pwm_output0 etc/mixers/mount_legs.aux.mix
mavlink start -x -u 14558 -r 4000 -f -m onboard -o 14530
mavlink start -x -u 14558 -r 4000 -f -m onboard -o 14530 -p
# shellcheck disable=SC2154
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_gcs_port_local

View File

@@ -1,7 +1,7 @@
mixer append /dev/pwm_output0 etc/mixers/mount_legs.aux.mix
mavlink start -x -u 14558 -r 4000 -f -m onboard -o 14530
mavlink start -x -u 14558 -r 4000 -f -m onboard -o 14530 -p
# shellcheck disable=SC2154
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_gcs_port_local

View File

@@ -244,7 +244,7 @@ then
sh etc/init.d-posix/rc.mavlink_override
else
# GCS link
mavlink start -x -u $udp_gcs_port_local -r 4000000 -f
mavlink start -x -u $udp_gcs_port_local -r 4000000 -f -p
mavlink stream -r 50 -s POSITION_TARGET_LOCAL_NED -u $udp_gcs_port_local
mavlink stream -r 50 -s LOCAL_POSITION_NED -u $udp_gcs_port_local
mavlink stream -r 50 -s GLOBAL_POSITION_INT -u $udp_gcs_port_local
@@ -256,10 +256,10 @@ else
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u $udp_gcs_port_local
# API/Offboard link
mavlink start -x -u $udp_offboard_port_local -r 4000000 -f -m onboard -o $udp_offboard_port_remote
mavlink start -x -u $udp_offboard_port_local -r 4000000 -f -m onboard -o $udp_offboard_port_remote -p
# 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 -p
# Onboard link to gimbal
mavlink start -x -u $udp_onboard_gimbal_port_local -r 400000 -m gimbal -o $udp_onboard_gimbal_port_remote