mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-02-05 18:51:00 +08:00
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.
46 lines
1.3 KiB
XML
46 lines
1.3 KiB
XML
<!DOCTYPE module SYSTEM "module.dtd">
|
|
|
|
<module name="gps_intermcu" dir="gps" task="sensors">
|
|
<doc>
|
|
<description>
|
|
Remote GPS via intermcu.
|
|
Parses the IMCU_REMOTE_GPS message and publishes it onboard via ABI.
|
|
</description>
|
|
</doc>
|
|
<dep>
|
|
<depends>gps,@datalink</depends>
|
|
<provides>gps</provides>
|
|
</dep>
|
|
<header>
|
|
<file name="gps.h"/>
|
|
</header>
|
|
<init fun="gps_intermcu_init()"/>
|
|
<periodic fun="gps_intermcu_periodic_check()" freq="1." autorun="TRUE"/>
|
|
<datalink message="IMCU_REMOTE_GPS" fun="gps_intermcu_parse_IMCU_REMOTE_GPS(buf)"/>
|
|
<makefile target="ap|fbw">
|
|
<file name="gps_intermcu.c"/>
|
|
<raw>
|
|
ifdef SECONDARY_GPS
|
|
ifneq (,$(findstring $(SECONDARY_GPS), intermcu))
|
|
# this is the secondary GPS
|
|
$(TARGET).CFLAGS += -DGPS_SECONDARY_TYPE_H=\"modules/gps/gps_intermcu.h\"
|
|
$(TARGET).CFLAGS += -DSECONDARY_GPS=GPS_IMCU
|
|
else
|
|
$(TARGET).CFLAGS += -DGPS_TYPE_H=\"modules/gps/gps_intermcu.h\"
|
|
$(TARGET).CFLAGS += -DPRIMARY_GPS=GPS_IMCU
|
|
endif
|
|
else
|
|
# plain old single GPS usage
|
|
$(TARGET).CFLAGS += -DGPS_TYPE_H=\"modules/gps/gps_intermcu.h\"
|
|
endif
|
|
</raw>
|
|
<test firmware="rotorcraft">
|
|
<define name="PRIMARY_GPS" value="GPS_IMCU"/>
|
|
</test>
|
|
</makefile>
|
|
<makefile target="fbw">
|
|
<define name="USE_GPS"/>
|
|
</makefile>
|
|
</module>
|
|
|