diff --git a/conf/autopilot/rotorcraft.makefile b/conf/autopilot/rotorcraft.makefile index 5123dfca67..d29a13b1fc 100644 --- a/conf/autopilot/rotorcraft.makefile +++ b/conf/autopilot/rotorcraft.makefile @@ -30,6 +30,7 @@ # MODEM_BAUD # +CFG_SHARED=$(PAPARAZZI_SRC)/conf/autopilot/subsystems/shared CFG_ROTORCRAFT=$(PAPARAZZI_SRC)/conf/autopilot/subsystems/rotorcraft SRC_BOOZ=booz diff --git a/conf/autopilot/subsystems/rotorcraft/radio_control_ppm.makefile b/conf/autopilot/subsystems/rotorcraft/radio_control_ppm.makefile deleted file mode 100644 index bfcc102eb7..0000000000 --- a/conf/autopilot/subsystems/rotorcraft/radio_control_ppm.makefile +++ /dev/null @@ -1,31 +0,0 @@ -# -# Autopilot -# -ap.CFLAGS += -DRADIO_CONTROL -DRADIO_CONTROL_LED=$(RADIO_CONTROL_LED) -ap.CFLAGS += -DRADIO_CONTROL_TYPE_H=\"subsystems/radio_control/ppm.h\" -ap.CFLAGS += -DRADIO_CONTROL_TYPE_PPM -ap.srcs += $(SRC_SUBSYSTEMS)/radio_control.c \ - $(SRC_SUBSYSTEMS)/radio_control/ppm.c \ - $(SRC_ARCH)/subsystems/radio_control/ppm_arch.c -ap.CFLAGS += -DUSE_TIM2_IRQ - -# -# Simulator -# -sim.CFLAGS += -DRADIO_CONTROL -DRADIO_CONTROL_LED=1 -sim.CFLAGS += -DRADIO_CONTROL_TYPE_H=\"subsystems/radio_control/ppm.h\" -sim.CFLAGS += -DRADIO_CONTROL_TYPE_PPM -sim.srcs += $(SRC_SUBSYSTEMS)/radio_control.c \ - $(SRC_SUBSYSTEMS)/radio_control/ppm.c \ - $(SRC_ARCH)/subsystems/radio_control/ppm_arch.c - -# -# test_rc_ppm -# -# configuration -# SYS_TIME_LED -# MODEM_PORT -# MODEM_BAUD -# RADIO_CONTROL_LED -# - diff --git a/conf/autopilot/subsystems/rotorcraft/radio_control_spektrum.makefile b/conf/autopilot/subsystems/rotorcraft/radio_control_spektrum.makefile deleted file mode 100644 index 6e1beda4be..0000000000 --- a/conf/autopilot/subsystems/rotorcraft/radio_control_spektrum.makefile +++ /dev/null @@ -1,22 +0,0 @@ -# -# Makefile for radio_control susbsytem in rotorcraft firmware -# -ifndef RADIO_CONTROL_SPEKTRUM_MODEL -RADIO_CONTROL_SPEKTRUM_MODEL=\"subsystems/radio_control/spektrum_dx7se.h\" -endif - -ap.CFLAGS += -DRADIO_CONTROL -DRADIO_CONTROL_BIND_IMPL_FUNC=radio_control_spektrum_try_bind -ap.CFLAGS += -DRADIO_CONTROL_TYPE_H=\"subsystems/radio_control/spektrum.h\" -ifeq ($(BOARD), booz) -ap.CFLAGS += -DRADIO_CONTROL_SPEKTRUM_MODEL_H=$(RADIO_CONTROL_SPEKTRUM_MODEL) -endif -ifdef RADIO_CONTROL_LED -ap.CFLAGS += -DRADIO_CONTROL_LED=$(RADIO_CONTROL_LED) -endif -ap.CFLAGS += -DRADIO_CONTROL_SPEKTRUM_PRIMARY_PORT=$(RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT) -ap.CFLAGS += -DOVERRIDE_$(RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT)_IRQ_HANDLER -DUSE_TIM6_IRQ - -ap.srcs += $(SRC_SUBSYSTEMS)/radio_control.c \ - $(SRC_SUBSYSTEMS)/radio_control/spektrum.c \ - $(SRC_ARCH)/subsystems/radio_control/spektrum_arch.c - diff --git a/conf/autopilot/subsystems/fixedwing/radio_control_ppm.makefile b/conf/autopilot/subsystems/shared/radio_control_ppm.makefile similarity index 52% rename from conf/autopilot/subsystems/fixedwing/radio_control_ppm.makefile rename to conf/autopilot/subsystems/shared/radio_control_ppm.makefile index 71f8ac63ba..e5479f0e9e 100644 --- a/conf/autopilot/subsystems/fixedwing/radio_control_ppm.makefile +++ b/conf/autopilot/subsystems/shared/radio_control_ppm.makefile @@ -1,3 +1,6 @@ +# +# Makefile for shared radio_control ppm susbsytem +# NORADIO = False @@ -7,25 +10,11 @@ ifeq ($(BOARD),classix) endif endif - - -ifeq ($(ARCH),stm32) - ap.CFLAGS += -DRADIO_CONTROL -ifdef RADIO_CONTROL_LED - ap.CFLAGS += -DRADIO_CONTROL_LED=$(RADIO_CONTROL_LED) -endif - ap.CFLAGS += -DRADIO_CONTROL_TYPE_H=\"subsystems/radio_control/ppm.h\" - ap.CFLAGS += -DRADIO_CONTROL_TYPE_PPM - ap.srcs += $(SRC_SUBSYSTEMS)/radio_control.c \ - $(SRC_SUBSYSTEMS)/radio_control/ppm.c \ - $(SRC_ARCH)/subsystems/radio_control/ppm_arch.c - ap.CFLAGS += -DUSE_TIM2_IRQ - - NORADIO = True -endif - ifeq ($(NORADIO), False) $(TARGET).CFLAGS += -DRADIO_CONTROL + ifdef RADIO_CONTROL_LED + ap.CFLAGS += -DRADIO_CONTROL_LED=$(RADIO_CONTROL_LED) + endif $(TARGET).CFLAGS += -DRADIO_CONTROL_TYPE_H=\"subsystems/radio_control/ppm.h\" $(TARGET).CFLAGS += -DRADIO_CONTROL_TYPE_PPM $(TARGET).srcs += $(SRC_SUBSYSTEMS)/radio_control.c @@ -33,4 +22,7 @@ ifeq ($(NORADIO), False) ifneq ($(ARCH),jsbsim) $(TARGET).srcs += $(SRC_ARCH)/subsystems/radio_control/ppm_arch.c endif + ifeq ($(ARCH),stm32) + ap.CFLAGS += -DUSE_TIM2_IRQ + endif endif diff --git a/conf/autopilot/subsystems/fixedwing/radio_control_spektrum.makefile b/conf/autopilot/subsystems/shared/radio_control_spektrum.makefile similarity index 93% rename from conf/autopilot/subsystems/fixedwing/radio_control_spektrum.makefile rename to conf/autopilot/subsystems/shared/radio_control_spektrum.makefile index 6fa6e23738..5f288cdc7f 100644 --- a/conf/autopilot/subsystems/fixedwing/radio_control_spektrum.makefile +++ b/conf/autopilot/subsystems/shared/radio_control_spektrum.makefile @@ -1,5 +1,5 @@ # -# Makefile for radio_control susbsytem in fixedwing firmware +# Makefile for shared radio_control spektrum susbsytem # ifndef RADIO_CONTROL_SPEKTRUM_MODEL RADIO_CONTROL_SPEKTRUM_MODEL=\"subsystems/radio_control/spektrum_dx7se.h\"