diff --git a/conf/autopilot/subsystems/fixedwing/actuators_direct.makefile b/conf/autopilot/subsystems/fixedwing/actuators_direct.makefile index 9cba0ddef0..06a9e8000a 100644 --- a/conf/autopilot/subsystems/fixedwing/actuators_direct.makefile +++ b/conf/autopilot/subsystems/fixedwing/actuators_direct.makefile @@ -8,6 +8,6 @@ ap.srcs += $(SRC_ARCH)/servos_direct_hw.c $(SRC_FIXEDWING)/actuators.c # Carefull: paths might get broken with this silly rotorcraft/fixedwing mixup of directories ifeq ($(ARCH), stm32) -ap.srcs += $(SRC_FIXEDWING)/booz/arch/stm32/actuators/actuators_pwm_arch.c -ap.CFLAGS += -I$(SRC_FIXEDWING)/booz/arch/stm32/ +ap.srcs += firmwares/rotorcraft/actuators/arch/stm32/actuators_pwm_arch.c +ap.CFLAGS += -Ifirmwares/rotorcraft/actuators/arch/stm32 endif diff --git a/conf/autopilot/subsystems/fixedwing/attitude_infrared.makefile b/conf/autopilot/subsystems/fixedwing/attitude_infrared.makefile index 0d44bf162e..a0b1e934e6 100644 --- a/conf/autopilot/subsystems/fixedwing/attitude_infrared.makefile +++ b/conf/autopilot/subsystems/fixedwing/attitude_infrared.makefile @@ -10,9 +10,25 @@ # to change just redefine these before including this file # +# +# LPC only has one ADC +# +ifeq ($(ARCH), lpc21) ap.CFLAGS += -DADC_CHANNEL_IR1=$(ADC_IR1) -DUSE_$(ADC_IR1) ap.CFLAGS += -DADC_CHANNEL_IR2=$(ADC_IR2) -DUSE_$(ADC_IR2) ap.CFLAGS += -DADC_CHANNEL_IR_TOP=$(ADC_IR_TOP) -DUSE_$(ADC_IR_TOP) +endif + +# +# On STM32 let's hardwire infrared sensors to AD1 for now +# +ifeq ($(ARCH), stm32) +ap.CFLAGS += -DUSE_AD1 +ap.CFLAGS += -DADC_CHANNEL_IR1=$(ADC_IR1) -DUSE_AD1_$(ADC_IR1) +ap.CFLAGS += -DADC_CHANNEL_IR2=$(ADC_IR2) -DUSE_AD1_$(ADC_IR2) +ap.CFLAGS += -DADC_CHANNEL_IR_TOP=$(ADC_IR_TOP) -DUSE_AD1_$(ADC_IR_TOP) +endif + ap.CFLAGS += -DADC_CHANNEL_IR_NB_SAMPLES=$(ADC_IR_NB_SAMPLES) $(TARGET).CFLAGS += -DINFRARED diff --git a/conf/autopilot/subsystems/fixedwing/autopilot.makefile b/conf/autopilot/subsystems/fixedwing/autopilot.makefile index 167aa2d3a5..bbce93d92a 100644 --- a/conf/autopilot/subsystems/fixedwing/autopilot.makefile +++ b/conf/autopilot/subsystems/fixedwing/autopilot.makefile @@ -127,12 +127,12 @@ ns_srcs += $(SRC_ARCH)/uart_hw.c # ANALOG # -ifeq ($(ARCH), lpc21) +#ifeq ($(ARCH), lpc21) ns_CFLAGS += -DADC ns_srcs += $(SRC_ARCH)/adc_hw.c -else ifeq ($(ARCH), stm32) - ns_srcs += lisa/lisa_analog_plug.c -endif +#else ifeq ($(ARCH), stm32) +# ns_srcs += lisa/lisa_analog_plug.c +#endif ###################################################################### diff --git a/conf/autopilot/subsystems/fixedwing/radio_control_ppm.makefile b/conf/autopilot/subsystems/fixedwing/radio_control_ppm.makefile index 41927dffae..71f8ac63ba 100644 --- a/conf/autopilot/subsystems/fixedwing/radio_control_ppm.makefile +++ b/conf/autopilot/subsystems/fixedwing/radio_control_ppm.makefile @@ -10,7 +10,10 @@ endif ifeq ($(ARCH),stm32) - ap.CFLAGS += -DRADIO_CONTROL -DRADIO_CONTROL_LED=$(RADIO_CONTROL_LED) + 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 \