mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
56a2eb21e0
* [FBW_GPS] Run GPS driver in FBW, e.g. for geofencing * [FBW_GPS] convert all GPS modules to run in FBW
51 lines
1.7 KiB
XML
51 lines
1.7 KiB
XML
<!DOCTYPE module SYSTEM "module.dtd">
|
|
|
|
<module name="gps_ublox" dir="gps">
|
|
<doc>
|
|
<description>
|
|
U-blox GPS (UART)
|
|
Driver for u-blox GPS modules parsing the binary UBX protocol.
|
|
</description>
|
|
<configure name="UBX_GPS_PORT" value="UARTx" description="UART where the GPS is connected to (UART1, UART2, etc"/>
|
|
<configure name="UBX_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_ubx_init()"/>
|
|
<periodic fun="gps_ubx_periodic_check()" freq="1." autorun="TRUE"/>
|
|
<event fun="gps_ubx_event()"/>
|
|
<makefile target="ap|fbw">
|
|
<configure name="UBX_GPS_PORT" default="$(GPS_PORT)" case="upper|lower"/>
|
|
<configure name="UBX_GPS_BAUD" default="$(GPS_BAUD)"/>
|
|
|
|
<file name="gps_ubx.c" dir="subsystems/gps"/>
|
|
|
|
<define name="USE_$(UBX_GPS_PORT_UPPER)"/>
|
|
<define name="UBX_GPS_LINK" value="$(UBX_GPS_PORT_LOWER)"/>
|
|
<define name="$(UBX_GPS_PORT_UPPER)_BAUD" value="$(UBX_GPS_BAUD)"/>
|
|
<raw>
|
|
ifdef SECONDARY_GPS
|
|
ifneq (,$(findstring $(SECONDARY_GPS), ublox))
|
|
# this is the secondary GPS
|
|
$(TARGET).CFLAGS += -DGPS_SECONDARY_TYPE_H=\"subsystems/gps/gps_ubx.h\"
|
|
$(TARGET).CFLAGS += -DSECONDARY_GPS=GPS_UBX
|
|
else
|
|
$(TARGET).CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_ubx.h\"
|
|
$(TARGET).CFLAGS += -DPRIMARY_GPS=GPS_UBX
|
|
endif
|
|
else
|
|
# plain old single GPS usage
|
|
$(TARGET).CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_ubx.h\"
|
|
endif
|
|
</raw>
|
|
</makefile>
|
|
<makefile target="fbw">
|
|
<define name="USE_GPS"/>
|
|
</makefile>
|
|
</module>
|
|
|