/
gps_piksi.xml
51 lines (48 loc) · 2 KB
/
gps_piksi.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
50
51
<!DOCTYPE module SYSTEM "module.dtd">
<module name="gps_piksi">
<doc>
<description>
Swift-Nav Piksi RTK GPS.
Driver for Swift-Nav Piksi RTK GPS connected via UART.
</description>
<configure name="PIKSI_GPS_PORT" value="UARTx" description="UART where the GPS is connected to (UART1, UART2, etc"/>
<configure name="PIKSI_GPS_BAUD" value="B115200" description="UART baud rate"/>
<configure name="GPS_LED" value="2" description="LED number to indicate fix or none"/>
</doc>
<header>
<file name="gps.h" dir="subsystems"/>
</header>
<init fun="gps_piksi_init()"/>
<periodic fun="gps_periodic_check(&gps_piksi)" freq="1." autorun="TRUE"/>
<event fun="gps_piksi_event()"/>
<makefile target="ap">
<configure name="PIKSI_GPS_PORT" default="$(GPS_PORT)" case="upper|lower"/>
<configure name="PIKSI_GPS_BAUD" default="B115200"/>
<configure name="GPS_LED" default="none"/>
<file name="gps.c" dir="subsystems"/>
<file name="gps_piksi.c" dir="subsystems/gps"/>
<include name="$(PAPARAZZI_SRC)/sw/ext/libsbp/c/include"/>
<file name="sbp.c" dir="$(PAPARAZZI_SRC)/sw/ext/libsbp/c/src"/>
<file name="edc.c" dir="$(PAPARAZZI_SRC)/sw/ext/libsbp/c/src"/>
<define name="USE_GPS"/>
<define name="USE_$(PIKSI_GPS_PORT_UPPER)"/>
<define name="PIKSI_GPS_LINK" value="$(PIKSI_GPS_PORT_LOWER)"/>
<define name="$(PIKSI_GPS_PORT_UPPER)_BAUD" value="$(PIKSI_GPS_BAUD)"/>
<define name="GPS_LED" value="$(GPS_LED)" cond="ifneq ($(GPS_LED),none)"/>
<raw>
ifdef SECONDARY_GPS
ifneq (,$(findstring $(SECONDARY_GPS), piksi))
# this is the secondary GPS
ap.CFLAGS += -DGPS_SECONDARY_TYPE_H=\"subsystems/gps/gps_piksi.h\"
ap.CFLAGS += -DSECONDARY_GPS=GPS_PIKSI
else
ap.CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_piksi.h\"
ap.CFLAGS += -DPRIMARY_GPS=GPS_PIKSI
endif
else
# plain old single GPS usage
ap.CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_piksi.h\"
endif
</raw>
</makefile>
</module>