diff --git a/conf/modules/mavlink.xml b/conf/modules/mavlink.xml index 0c5ee3dcbe..7a914eec1b 100644 --- a/conf/modules/mavlink.xml +++ b/conf/modules/mavlink.xml @@ -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)