mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 02:16:53 +08:00
fmu v4: make starting mavlink on WIFI port configurable and make it start by default
This commit is contained in:
committed by
Lorenz Meier
parent
653b7c0007
commit
6260c164e7
@@ -9,6 +9,25 @@ then
|
|||||||
# Disable safety switch by default
|
# Disable safety switch by default
|
||||||
param set CBRK_IO_SAFETY 22027
|
param set CBRK_IO_SAFETY 22027
|
||||||
|
|
||||||
|
# start MAVLink on Wifi (ESP8266 port). Except for the TealOne airframe.
|
||||||
|
if ! param compare SYS_AUTOSTART 4250
|
||||||
|
then
|
||||||
|
param set MAV_2_CONFIG 301
|
||||||
|
param set MAV_2_RATE 20000
|
||||||
|
param set SER_WIFI_BAUD 921600
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if param compare SER_WIFI_BAUD 1
|
||||||
|
then
|
||||||
|
# Transitional support: The Wifi port has not been configured by the user,
|
||||||
|
# configure it for MAVLink via the ESP8266 Wifi module. Except for the TealOne airframe.
|
||||||
|
if ! param compare SYS_AUTOSTART 4250
|
||||||
|
then
|
||||||
|
param set MAV_2_CONFIG 301
|
||||||
|
param set MAV_2_RATE 20000
|
||||||
|
param set SER_WIFI_BAUD 921600
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
safety_button start
|
safety_button start
|
||||||
|
|||||||
@@ -6,8 +6,3 @@
|
|||||||
# Start MAVLink on the USB port
|
# Start MAVLink on the USB port
|
||||||
mavlink start -d /dev/ttyACM0
|
mavlink start -d /dev/ttyACM0
|
||||||
|
|
||||||
# Pixracer: start MAVLink on Wifi (ESP8266 port). Except for the TealOne airframe.
|
|
||||||
if ! param compare SYS_AUTOSTART 4250
|
|
||||||
then
|
|
||||||
mavlink start -r 20000 -b 921600 -d /dev/ttyS0
|
|
||||||
fi
|
|
||||||
|
|||||||
Reference in New Issue
Block a user