mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
62646d68de
Add two new items in module's dependency: - recommends: a recommended module tells the sorting algo that if the module is found, it should be sorted accordingly. It is useful for optional dependencies, like shell or mission in some modules - suggests: if a functionality is not provided by the user, a module can suggest a list of modules that can provide them. It is a convenient way to have "default" modules. As a result the former autoload node is removed and replaced by suggested modules.
62 lines
2.2 KiB
XML
62 lines
2.2 KiB
XML
<!DOCTYPE module SYSTEM "module.dtd">
|
|
|
|
<module name="gps_piksi" dir="gps" task="sensors">
|
|
<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"/>
|
|
</doc>
|
|
<dep>
|
|
<depends>uart,gps</depends>
|
|
<provides>gps</provides>
|
|
</dep>
|
|
<header>
|
|
<file name="gps.h"/>
|
|
</header>
|
|
<init fun="gps_piksi_init()"/>
|
|
<periodic fun="gps_piksi_periodic_check()" freq="1." autorun="TRUE"/>
|
|
<event fun="gps_piksi_event()"/>
|
|
<makefile target="ap|fbw">
|
|
<configure name="PIKSI_GPS_PORT" default="$(GPS_PORT)" case="upper|lower"/>
|
|
<configure name="PIKSI_GPS_BAUD" default="B115200"/>
|
|
|
|
<file name="gps_piksi.c"/>
|
|
<include name="../ext/libsbp/c/include"/>
|
|
<file name="sbp.c" dir="../ext/libsbp/c/src"/>
|
|
<file name="edc.c" dir="../ext/libsbp/c/src"/>
|
|
|
|
<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)"/>
|
|
<raw>
|
|
ifdef SECONDARY_GPS
|
|
ifneq (,$(findstring $(SECONDARY_GPS), piksi))
|
|
# this is the secondary GPS
|
|
$(TARGET).CFLAGS += -DGPS_SECONDARY_TYPE_H=\"modules/gps/gps_piksi.h\"
|
|
$(TARGET).CFLAGS += -DSECONDARY_GPS=GPS_PIKSI
|
|
else
|
|
$(TARGET).CFLAGS += -DGPS_TYPE_H=\"modules/gps/gps_piksi.h\"
|
|
$(TARGET).CFLAGS += -DPRIMARY_GPS=GPS_PIKSI
|
|
endif
|
|
else
|
|
# plain old single GPS usage
|
|
$(TARGET).CFLAGS += -DGPS_TYPE_H=\"modules/gps/gps_piksi.h\"
|
|
endif
|
|
</raw>
|
|
<test firmware="rotorcraft">
|
|
<define name="PRIMARY_GPS" value="GPS_PIKSI"/>
|
|
<define name="PIKSI_GPS_PORT" value="uart2"/>
|
|
<define name="PIKSI_GPS_BAUD" value="115200"/>
|
|
<define name="USE_UART2"/>
|
|
<define name="PIKSI_GPS_LINK" value="uart2"/>
|
|
<include name="../ext/libsbp/c/include"/>
|
|
</test>
|
|
</makefile>
|
|
<makefile target="fbw">
|
|
<define name="USE_GPS"/>
|
|
</makefile>
|
|
</module>
|