-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
mavlink.xml
46 lines (43 loc) · 1.94 KB
/
mavlink.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE module SYSTEM "module.dtd">
<module name="mavlink" dir="datalink" task="datalink">
<doc>
<description>Basic MAVLink implementation</description>
<configure name="MAVLINK_PORT" value="UARTx|UDPx|UsbS" description="The port device to use for mavlink (default: UART1)"/>
<configure name="MAVLINK_BAUD" value="B57600" description="Baud rate if MAVLINK_PORT is a UART"/>
<define name="MAV_AUTOPILOT_ID" value="MAV_AUTOPILOT_PPZ|MAV_AUTOPILOT_ARDUPILOTMEGA" description="Some MAVLink GCS/Devices require specific ID's to work. Default is to identify as MAV_AUTOPILOT_PPZ."/>
</doc>
<header>
<file name="mavlink.h"/>
</header>
<init fun="mavlink_init()"/>
<periodic fun="mavlink_periodic()" freq="10" autorun="TRUE"/>
<periodic fun="mavlink_periodic_telemetry()" autorun="TRUE"/>
<event fun="mavlink_event()"/>
<makefile>
<file name="mavlink.c"/>
<file name="mission_manager.c" dir="modules/datalink/missionlib"/>
<file name="waypoints.c" dir="modules/datalink/missionlib"/>
<file name="blocks.c" dir="modules/datalink/missionlib"/>
<configure name="MAVLINK_PORT" default="uart1" case="upper|lower"/>
<configure name="TELEMETRY_FREQUENCY" default="$(PERIODIC_FREQUENCY)"/>
<define name="TELEMETRY_FREQUENCY" value="$(TELEMETRY_FREQUENCY)"/>
<raw>
ifneq (,$(findstring usb,$(MAVLINK_PORT_LOWER)))
ap.CFLAGS += -DUSE_USB_SERIAL
ap.srcs += $(SRC_ARCH)/usb_ser_hw.c
ap.CFLAGS += -DMAVLINK_DEV=usb_serial
else
ifneq (,$(findstring udp,$(MAVLINK_PORT_LOWER)))
include $(CFG_SHARED)/udp.makefile
$(TARGET).CFLAGS += -DMAVLINK_DEV=$(MAVLINK_PORT_LOWER)
$(TARGET).CFLAGS += -DUSE_$(MAVLINK_PORT_UPPER)
else
MAVLINK_BAUD ?= B57600
ap.CFLAGS += -DMAVLINK_DEV=$(MAVLINK_PORT_LOWER)
ap.CFLAGS += -DUSE_$(MAVLINK_PORT_UPPER)
ap.CFLAGS += -D$(MAVLINK_PORT_UPPER)_BAUD=$(MAVLINK_BAUD)
endif
endif
</raw>
</makefile>
</module>