mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-23 04:45:37 +08:00
[modules] mavlink: more flexible MAVLINK_PORT configure options
This commit is contained in:
@@ -20,12 +20,12 @@
|
||||
MAVLINK_PORT ?= UART1
|
||||
MAVLINK_PORT_UPPER=$(shell echo $(MAVLINK_PORT) | tr a-z A-Z)
|
||||
MAVLINK_PORT_LOWER=$(shell echo $(MAVLINK_PORT) | tr A-Z a-z)
|
||||
ifeq ($(MAVLINK_PORT), UsbS)
|
||||
ifneq (,$(findstring usb,$(MAVLINK_PORT_LOWER)))
|
||||
ap.CFLAGS += -DUSE_USB_SERIAL
|
||||
ap.srcs += $(SRC_ARCH)/usb_ser_hw.c
|
||||
ap.CFLAGS += -DMAVLINK_DEV=usb_serial
|
||||
else
|
||||
ifeq ($(findstring UDP,$(MAVLINK_PORT)), UDP)
|
||||
ifneq (,$(findstring udp,$(MAVLINK_PORT_LOWER)))
|
||||
include $(CFG_SHARED)/udp.makefile
|
||||
$(TARGET).CFLAGS += -DMAVLINK_DEV=$(MAVLINK_PORT_LOWER)
|
||||
$(TARGET).CFLAGS += -DUSE_$(MAVLINK_PORT_UPPER)
|
||||
|
||||
Reference in New Issue
Block a user