-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
gps_mediatek_diy.xml
49 lines (46 loc) · 1.7 KB
/
gps_mediatek_diy.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
47
48
49
<!DOCTYPE module SYSTEM "module.dtd">
<module name="gps_mediatek" dir="gps">
<doc>
<description>
Mediatek MT3329 GPS (UART)
Driver for Mediatek MT3329 GPS, DIYDrones V1.4/1.6 protocol
</description>
<configure name="MTK_GPS_PORT" value="UARTx" description="UART where the GPS is connected to (UART1, UART2, etc"/>
<configure name="MTK_GPS_BAUD" value="B38400" description="UART baud rate"/>
</doc>
<autoload name="gps"/>
<autoload name="gps_nps"/>
<autoload name="gps_sim"/>
<header>
<file name="gps.h" dir="subsystems"/>
</header>
<init fun="gps_mtk_init()"/>
<periodic fun="gps_mtk_periodic_check()" freq="1." autorun="TRUE"/>
<event fun="gps_mtk_event()"/>
<makefile target="ap|fbw">
<configure name="MTK_GPS_PORT" default="$(GPS_PORT)" case="upper|lower"/>
<configure name="MTK_GPS_BAUD" default="$(GPS_BAUD)"/>
<file name="gps_mtk.c" dir="subsystems/gps"/>
<define name="USE_$(MTK_GPS_PORT_UPPER)"/>
<define name="MTK_GPS_LINK" value="$(MTK_GPS_PORT_LOWER)"/>
<define name="$(MTK_GPS_PORT_UPPER)_BAUD" value="$(MTK_GPS_BAUD)"/>
<raw>
ifdef SECONDARY_GPS
ifneq (,$(findstring $(SECONDARY_GPS), mtk mediatek))
# this is the secondary GPS
$(TARGET).CFLAGS += -DGPS_SECONDARY_TYPE_H=\"subsystems/gps/gps_mtk.h\"
$(TARGET).CFLAGS += -DSECONDARY_GPS=GPS_MTK
else
$(TARGET).CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_mtk.h\"
$(TARGET).CFLAGS += -DPRIMARY_GPS=GPS_MTK
endif
else
# plain old single GPS usage
$(TARGET).CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_mtk.h\"
endif
</raw>
</makefile>
<makefile target="fbw">
<define name="USE_GPS"/>
</makefile>
</module>