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) ## COMMON ROTORCRAFT ALL TARGETS (AP + NPS)
## ##
$(TARGET).CFLAGS += -DFIRMWARE=ROTORCRAFT
$(TARGET).CFLAGS += $(ROTORCRAFT_INC) $(TARGET).CFLAGS += $(ROTORCRAFT_INC)
$(TARGET).CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) $(TARGET).CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
$(TARGET).CFLAGS += -DPERIPHERALS_AUTO_INIT $(TARGET).CFLAGS += -DPERIPHERALS_AUTO_INIT
@@ -25,7 +25,6 @@
## ##
## COMMON FIXEDWING ALL TARGETS (SIM + AP + FBW ...) ## COMMON FIXEDWING ALL TARGETS (SIM + AP + FBW ...)
## ##
$(TARGET).CFLAGS += -DFIRMWARE=FIXEDWING
# #
# Board config + Include paths # Board config + Include paths
+6 -20
View File
@@ -36,26 +36,12 @@
<datalink message="MOVE_WP" fun="copilot_parse_move_wp_dl(buf)"/> <datalink message="MOVE_WP" fun="copilot_parse_move_wp_dl(buf)"/>
<makefile target="ap"> <makefile target="ap">
<file name="copilot_common.c"/> <file name="copilot_common.c"/>
<raw> </makefile>
# attach the correct file based on firmware <makefile target="ap" firmware="fixedwing">
RESULT=0 <file name="copilot_fixedwing.c"/>
</makefile>
ifneq (,$(findstring ROTORCRAFT,$($(TARGET).CFLAGS))) <makefile target="ap" firmware="rotorcraft">
# Rotorcraft <file name="copilot_rotorcraft.c"/>
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>
</module> </module>