mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-04 22:17:01 +08:00
[modules] mavlink: works via usb_serial
This commit is contained in:
@@ -21,9 +21,15 @@
|
||||
MAVLINK_BAUD ?= B57600
|
||||
MAVLINK_PORT_LOWER=$(shell echo $(MAVLINK_PORT) | tr A-Z a-z)
|
||||
MAVLINK_PORT_UPPER=$(shell echo $(MAVLINK_PORT) | tr a-z A-Z)
|
||||
ifeq ($(MAVLINK_PORT), UsbS)
|
||||
ap.CFLAGS += -DUSE_USB_SERIAL
|
||||
ap.srcs += $(SRC_ARCH)/usb_ser_hw.c
|
||||
ap.CFLAGS += -DMAVLINK_DEV=UsbS
|
||||
else
|
||||
ap.CFLAGS += -DMAVLINK_DEV=$(MAVLINK_PORT_UPPER)
|
||||
ap.CFLAGS += -DUSE_$(MAVLINK_PORT_UPPER)
|
||||
ap.CFLAGS += -D$(MAVLINK_PORT_UPPER)_BAUD=$(MAVLINK_BAUD)
|
||||
endif
|
||||
</raw>
|
||||
<define name="MAVLINK_DEV" value="$(MAVLINK_PORT_UPPER)"/>
|
||||
<define name="USE_$(MAVLINK_PORT_UPPER)"/>
|
||||
<define name="$(MAVLINK_PORT_UPPER)_BAUD" value="$(MAVLINK_BAUD)"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
#if USE_UDP
|
||||
#include "mcu_periph/udp.h"
|
||||
#endif
|
||||
#if USE_USB_SERIAL
|
||||
#include "mcu_periph/usb_serial.h"
|
||||
#endif
|
||||
#include "mcu_periph/uart.h"
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user