mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
b4ba0dac47
* T4 actuators and T4 AOA now usable in Paparazzi master * Rename ACTUATORS_T4_UART_DEV to ACTUATORS_T4_UART_PORT since build failure on semaphore test gave: modules/actuators/actuators_t4_uart.c:194:19: error: ‘ACTUATORS_T4_PORT’ undeclared * Rename ACTUATORS_T4_UART_PORT to ACTUATORS_T4_PORT Wrongly named, FYI since for the future plans port could be as well CAN or I2C type no specific reference to UART device just plain ACTUATORS_T4_PORT
88 lines
3.5 KiB
XML
88 lines
3.5 KiB
XML
<!DOCTYPE module SYSTEM "module.dtd">
|
|
|
|
<module name="gps_ublox" dir="gps" task="sensors">
|
|
<doc>
|
|
<description>
|
|
U-blox GPS (UART)
|
|
Driver for u-blox GPS modules parsing the binary UBX protocol.
|
|
|
|
The reset variable allows us to manually restart the u-blox GPS. There are three modes:
|
|
- Hotstart (GPS_UBX_BOOTRESET = 1)
|
|
- Warmstart (GPS_UBX_BOOTRESET = 2)
|
|
- Coldstart (GPS_UBX_BOOTRESET = 3)
|
|
</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"/>
|
|
<configure name="GPS_UBX_BOOTRESET" value="0" description="Force a hot, warm or cold reset when the system boot up"/>
|
|
</doc>
|
|
|
|
<settings>
|
|
<dl_settings>
|
|
<dl_settings name="gps_ublox">
|
|
<dl_setting MIN="1" MAX="3" STEP="1" values="Hotstart|Warmstart|Coldstart" module="gps/gps_ubx" VAR="gps_ubx_reset" shortname="reset"/>
|
|
</dl_settings>
|
|
</dl_settings>
|
|
</settings>
|
|
|
|
<dep>
|
|
<depends>uart,gps</depends>
|
|
<provides>gps</provides>
|
|
</dep>
|
|
<header>
|
|
<file name="gps.h"/>
|
|
</header>
|
|
<init fun="gps_ubx_init()"/>
|
|
<periodic fun="gps_ubx_periodic_check()" freq="1." autorun="TRUE"/>
|
|
<event fun="gps_ubx_event()"/>
|
|
<datalink message="HITL_UBX" fun="gps_ubx_parse_HITL_UBX(buf)"/>
|
|
<makefile target="ap|fbw">
|
|
<file name="gps_ubx.c"/>
|
|
|
|
<!-- GPS Ublox 1 -->
|
|
<configure name="UBX_GPS_PORT" default="$(GPS_PORT)" case="upper|lower"/>
|
|
<configure name="UBX_GPS_BAUD" default="$(GPS_BAUD)"/>
|
|
<define name="USE_$(UBX_GPS_PORT_UPPER)"/>
|
|
<define name="UBX_GPS_PORT" value="$(UBX_GPS_PORT_LOWER)"/>
|
|
<define name="$(UBX_GPS_PORT_UPPER)_BAUD" value="$(UBX_GPS_BAUD)"/>
|
|
|
|
<!-- GPS Ublox 2 -->
|
|
<configure name="UBX2_GPS_PORT" default="$(GPS2_PORT)" case="upper|lower"/>
|
|
<configure name="UBX2_GPS_BAUD" default="$(GPS2_BAUD)"/>
|
|
<define name="USE_$(UBX2_GPS_PORT_UPPER)" cond="ifneq ($(UBX2_GPS_PORT)$(SECONDARY_GPS),)"/>
|
|
<define name="UBX2_GPS_PORT" value="$(UBX2_GPS_PORT_LOWER)" cond="ifneq ($(UBX2_GPS_PORT)$(SECONDARY_GPS),)"/>
|
|
<define name="$(UBX2_GPS_PORT_UPPER)_BAUD" value="$(UBX2_GPS_BAUD)" cond="ifdef SECONDARY_GPS"/>
|
|
|
|
<raw>
|
|
ifdef SECONDARY_GPS
|
|
ifneq (,$(findstring ublox2, $(SECONDARY_GPS)))
|
|
# this is the secondary GPS
|
|
$(TARGET).CFLAGS += -DGPS_SECONDARY_TYPE_H=\"modules/gps/gps_ubx.h\"
|
|
$(TARGET).CFLAGS += -DSECONDARY_GPS=GPS_UBX2
|
|
$(TARGET).CFLAGS += -DGPS_UBX_NB=2
|
|
else ifneq (,$(findstring ublox, $(SECONDARY_GPS)))
|
|
# this is the secondary GPS
|
|
$(TARGET).CFLAGS += -DGPS_SECONDARY_TYPE_H=\"modules/gps/gps_ubx.h\"
|
|
$(TARGET).CFLAGS += -DSECONDARY_GPS=GPS_UBX
|
|
endif
|
|
|
|
ifneq (,$(findstring ublox2, $(PRIMARY_GPS)))
|
|
$(TARGET).CFLAGS += -DGPS_TYPE_H=\"modules/gps/gps_ubx.h\"
|
|
$(TARGET).CFLAGS += -DPRIMARY_GPS=GPS_UBX2
|
|
$(TARGET).CFLAGS += -DGPS_UBX_NB=2
|
|
else ifneq (,$(findstring ublox, $(PRIMARY_GPS)))
|
|
$(TARGET).CFLAGS += -DGPS_TYPE_H=\"modules/gps/gps_ubx.h\"
|
|
$(TARGET).CFLAGS += -DPRIMARY_GPS=GPS_UBX
|
|
endif
|
|
else
|
|
# plain old single GPS usage
|
|
$(TARGET).CFLAGS += -DGPS_TYPE_H=\"modules/gps/gps_ubx.h\"
|
|
endif
|
|
</raw>
|
|
<test>
|
|
<define name="PRIMARY_GPS" value="GPS_UBX"/>
|
|
<define name="USE_UART2"/>
|
|
<define name="UBX_GPS_PORT" value="uart2"/>
|
|
</test>
|
|
</makefile>
|
|
</module>
|