Copilot fixes

This commit is contained in:
Michal Podhradsky
2017-05-06 14:47:51 -07:00
parent 005b5cbc14
commit e30a03cc00
3 changed files with 6 additions and 22 deletions
-1
View File
@@ -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
+6 -20
View File
@@ -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>