mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
Copilot fixes
This commit is contained in:
@@ -43,7 +43,6 @@ VPATH += $(PAPARAZZI_HOME)/var/share
|
||||
## COMMON ROTORCRAFT ALL TARGETS (AP + NPS)
|
||||
##
|
||||
|
||||
$(TARGET).CFLAGS += -DFIRMWARE=ROTORCRAFT
|
||||
$(TARGET).CFLAGS += $(ROTORCRAFT_INC)
|
||||
$(TARGET).CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||
$(TARGET).CFLAGS += -DPERIPHERALS_AUTO_INIT
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
##
|
||||
## COMMON FIXEDWING ALL TARGETS (SIM + AP + FBW ...)
|
||||
##
|
||||
$(TARGET).CFLAGS += -DFIRMWARE=FIXEDWING
|
||||
|
||||
#
|
||||
# Board config + Include paths
|
||||
|
||||
@@ -36,26 +36,12 @@
|
||||
<datalink message="MOVE_WP" fun="copilot_parse_move_wp_dl(buf)"/>
|
||||
<makefile target="ap">
|
||||
<file name="copilot_common.c"/>
|
||||
<raw>
|
||||
# attach the correct file based on firmware
|
||||
RESULT=0
|
||||
|
||||
ifneq (,$(findstring ROTORCRAFT,$($(TARGET).CFLAGS)))
|
||||
# Rotorcraft
|
||||
RESULT=1
|
||||
$(TARGET).srcs += $(SRC_MODULES)/mission/copilot_rotorcraft.c
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring FIXEDWING,$($(TARGET).CFLAGS)))
|
||||
# Fixedwing
|
||||
$(TARGET).srcs += $(SRC_MODULES)/mission/copilot_fixedwing.c
|
||||
RESULT=1
|
||||
endif
|
||||
|
||||
ifeq ($(RESULT), 0)
|
||||
$(error Error: Copilot module can be compiled only in Fixeding or Rotorcraft firmware. Please check your firmware.)
|
||||
endif
|
||||
</raw>
|
||||
</makefile>
|
||||
<makefile target="ap" firmware="fixedwing">
|
||||
<file name="copilot_fixedwing.c"/>
|
||||
</makefile>
|
||||
<makefile target="ap" firmware="rotorcraft">
|
||||
<file name="copilot_rotorcraft.c"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user