mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
posix-configs/rpi: Fix mavlink over UART (/dev/ttyAMA0)
UART is the primary interface for telemetry radio: https://docs.emlid.com/navio2/ardupilot/hardware-setup/#uart-radio Check first if /dev/ttyUSB0 exists (https://docs.emlid.com/navio2/ardupilot/hardware-setup/#usb-radio); if not, fall back to configuring over UART (/dev/ttyAMA0). Use stricter check for character special file (-c) rather than just file (-f). 'console=serial0,115200' needs to be removed from /cmdline.txt as additional configuration step. This should be documented in the Navio2 section of docs.px4.io. Presumably, this is already performed as part of the Raspberry Pi OS prebuilt image Emlid spins.
This commit is contained in:
parent
91fa2002e3
commit
57da61dc17
@ -45,9 +45,12 @@ mc_rate_control start
|
||||
|
||||
mavlink start -x -u 14556 -r 1000000
|
||||
|
||||
if [ -f /dev/ttyUSB0 ]
|
||||
if [ -c /dev/ttyUSB0 ]
|
||||
then
|
||||
mavlink start -x -d /dev/ttyUSB0
|
||||
elif [ -c /dev/ttyAMA0 ]
|
||||
then
|
||||
mavlink start -x -d /dev/ttyAMA0
|
||||
fi
|
||||
|
||||
navio_sysfs_rc_in start
|
||||
|
||||
@ -44,9 +44,12 @@ fw_pos_control_l1 start
|
||||
|
||||
mavlink start -x -u 14556 -r 1000000
|
||||
|
||||
if [ -f /dev/ttyUSB0 ]
|
||||
if [ -c /dev/ttyUSB0 ]
|
||||
then
|
||||
mavlink start -x -d /dev/ttyUSB0
|
||||
elif [ -c /dev/ttyAMA0 ]
|
||||
then
|
||||
mavlink start -x -d /dev/ttyAMA0
|
||||
fi
|
||||
|
||||
navio_sysfs_rc_in start
|
||||
|
||||
@ -44,9 +44,12 @@ mc_att_control start
|
||||
|
||||
mavlink start -x -u 14556 -r 1000000
|
||||
|
||||
if [ -f /dev/ttyUSB0 ]
|
||||
if [ -c /dev/ttyUSB0 ]
|
||||
then
|
||||
mavlink start -x -d /dev/ttyUSB0
|
||||
elif [ -c /dev/ttyAMA0 ]
|
||||
then
|
||||
mavlink start -x -d /dev/ttyAMA0
|
||||
fi
|
||||
|
||||
navio_sysfs_rc_in start
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user