mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-06 07:53:43 +08:00
Merge branch 'master' of github.com:paparazzi/paparazzi into fastperiodic
This commit is contained in:
@@ -195,7 +195,7 @@ test_usb.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
|
||||
test_usb.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DUSE_USB_SERIAL
|
||||
test_usb.CFLAGS += -DDOWNLINK_DEVICE=UsbS -DPPRZ_UART=UsbS -DDATALINK=PPRZ
|
||||
test_usb.srcs += downlink.c $(SRC_ARCH)/uart_hw.c $(SRC_ARCH)/usb_ser_hw.c pprz_transport.c
|
||||
# datalink.c
|
||||
# $(SRC_FIRMWARE)/datalink.c
|
||||
test_usb.srcs += $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbcontrol.c
|
||||
test_usb.srcs += $(SRC_ARCH)/lpcusb/usbstdreq.c $(SRC_ARCH)/lpcusb/usbinit.c
|
||||
|
||||
@@ -430,7 +430,7 @@ test_amc.srcs += $(SRC_ARCH)/uart_hw.c
|
||||
test_amc.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart1
|
||||
test_amc.srcs += downlink.c pprz_transport.c
|
||||
test_amc.CFLAGS += -DDATALINK=PPRZ -DPPRZ_UART=Uart1
|
||||
test_amc.srcs += $(SRC_BOOZ)/booz2_datalink.c
|
||||
test_amc.srcs += $(SRC_FIRMWARE)/datalink.c
|
||||
|
||||
test_amc.CFLAGS += -DACTUATORS=\"actuators_asctec_twi_blmc_hw.h\"
|
||||
test_amc.srcs += $(SRC_BOOZ_ARCH)/actuators_asctec_twi_blmc_hw.c actuators.c
|
||||
|
||||
@@ -53,6 +53,7 @@ SRC_BOARD=boards/$(BOARD)
|
||||
|
||||
SRC_FIRMWARE=firmwares/rotorcraft
|
||||
SRC_SUBSYSTEMS=subsystems
|
||||
SRC_AIRBORNE=.
|
||||
|
||||
#
|
||||
# default configuration expected from the board files
|
||||
@@ -67,7 +68,9 @@ SRC_SUBSYSTEMS=subsystems
|
||||
test_led.ARCHDIR = $(ARCH)
|
||||
test_led.CFLAGS += -I$(SRC_LISA) -I$(ARCH) -DPERIPHERALS_AUTO_INIT
|
||||
test_led.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||
test_led.srcs += $(SRC_LISA)/test_led.c \
|
||||
test_led.srcs += $(SRC_AIRBORNE)/mcu.c \
|
||||
$(SRC_ARCH)/mcu_arch.c \
|
||||
$(SRC_LISA)/test_led.c \
|
||||
$(SRC_ARCH)/stm32_exceptions.c \
|
||||
$(SRC_ARCH)/stm32_vector_table.c
|
||||
test_led.CFLAGS += -DUSE_LED
|
||||
@@ -79,10 +82,12 @@ test_led.srcs += $(SRC_ARCH)/led_hw.c
|
||||
test_uart.ARCHDIR = $(ARCH)
|
||||
test_uart.CFLAGS = -I$(SRC_LISA) -I$(ARCH) -DPERIPHERALS_AUTO_INIT
|
||||
test_uart.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||
test_uart.srcs = $(SRC_LISA)/test_uart.c \
|
||||
test_uart.srcs = $(SRC_AIRBORNE)/mcu.c \
|
||||
$(SRC_ARCH)/mcu_arch.c \
|
||||
$(SRC_LISA)/test_uart.c \
|
||||
$(SRC_ARCH)/stm32_exceptions.c \
|
||||
$(SRC_ARCH)/stm32_vector_table.c
|
||||
test_uart.CFLAGS += -DUSE_LED
|
||||
test_uart.CFLAGS += -DUSE_LED -DUSE_UART
|
||||
test_uart.srcs += $(SRC_ARCH)/led_hw.c
|
||||
test_uart.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED)
|
||||
test_uart.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
|
||||
@@ -90,7 +95,7 @@ test_uart.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
|
||||
test_uart.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
|
||||
test_uart.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
|
||||
test_uart.CFLAGS += -DUSE_UART3 -DUART3_BAUD=B57600
|
||||
test_uart.srcs += $(SRC_ARCH)/uart_hw.c
|
||||
test_uart.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
|
||||
|
||||
|
||||
|
||||
@@ -104,7 +109,9 @@ test_servos.ARCHDIR = $(ARCH)
|
||||
test_servos.CFLAGS = -I$(SRC_FIRMWARE)/actuators/arch/$(ARCH) -I$(SRC_LISA) -I$(ARCH) -DPERIPHERALS_AUTO_INIT
|
||||
test_servos.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||
test_servos.LDFLAGS += -lm
|
||||
test_servos.srcs += $(SRC_LISA)/test_servos.c \
|
||||
test_servos.srcs += $(SRC_AIRBORNE)/mcu.c \
|
||||
$(SRC_ARCH)/mcu_arch.c \
|
||||
$(SRC_LISA)/test_servos.c \
|
||||
$(SRC_ARCH)/stm32_exceptions.c \
|
||||
$(SRC_ARCH)/stm32_vector_table.c
|
||||
test_servos.CFLAGS += -DUSE_LED
|
||||
@@ -126,9 +133,11 @@ test_servos.srcs += $(SRC_FIRMWARE)/actuators/actuators_pwm.c $(SRC_FIRMWARE)/ac
|
||||
test_telemetry.ARCHDIR = $(ARCH)
|
||||
test_telemetry.CFLAGS += -I$(SRC_LISA) -I$(SRC_ARCH) -DPERIPHERALS_AUTO_INIT
|
||||
test_telemetry.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||
test_telemetry.srcs = test/test_telemetry.c \
|
||||
$(SRC_ARCH)/stm32_exceptions.c \
|
||||
$(SRC_ARCH)/stm32_vector_table.c
|
||||
test_telemetry.srcs = $(SRC_AIRBORNE)/mcu.c \
|
||||
$(SRC_ARCH)/mcu_arch.c \
|
||||
test/test_telemetry.c \
|
||||
$(SRC_ARCH)/stm32_exceptions.c \
|
||||
$(SRC_ARCH)/stm32_vector_table.c
|
||||
test_telemetry.CFLAGS += -DUSE_LED
|
||||
test_telemetry.srcs += $(SRC_ARCH)/led_hw.c
|
||||
test_telemetry.CFLAGS += -DUSE_SYS_TIME
|
||||
@@ -139,7 +148,7 @@ test_telemetry.CFLAGS += -DUSE_$(MODEM_PORT)
|
||||
test_telemetry.CFLAGS += -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
|
||||
test_telemetry.srcs += downlink.c pprz_transport.c
|
||||
test_telemetry.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
|
||||
test_telemetry.srcs += $(SRC_ARCH)/uart_hw.c
|
||||
test_telemetry.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
|
||||
|
||||
|
||||
#
|
||||
@@ -153,7 +162,9 @@ test_telemetry.srcs += $(SRC_ARCH)/uart_hw.c
|
||||
test_baro.ARCHDIR = $(ARCH)
|
||||
test_baro.CFLAGS = -I$(SRC_LISA) -I$(SRC_ARCH) -I$(SRC_BOARD) -DPERIPHERALS_AUTO_INIT
|
||||
test_baro.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||
test_baro.srcs = $(SRC_BOARD)/test_baro.c \
|
||||
test_baro.srcs = $(SRC_AIRBORNE)/mcu.c \
|
||||
$(SRC_ARCH)/mcu_arch.c \
|
||||
$(SRC_BOARD)/test_baro.c \
|
||||
$(SRC_ARCH)/stm32_exceptions.c \
|
||||
$(SRC_ARCH)/stm32_vector_table.c
|
||||
test_baro.CFLAGS += -DUSE_LED
|
||||
@@ -165,10 +176,10 @@ test_baro.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
|
||||
test_baro.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
|
||||
test_baro.srcs += downlink.c pprz_transport.c
|
||||
test_baro.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
|
||||
test_baro.srcs += $(SRC_ARCH)/uart_hw.c
|
||||
test_baro.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
|
||||
test_baro.srcs += $(SRC_BOARD)/baro_board.c
|
||||
test_baro.CFLAGS += -DUSE_I2C2
|
||||
test_baro.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
||||
test_baro.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
|
||||
|
||||
|
||||
#
|
||||
@@ -185,7 +196,9 @@ test_rc_spektrum.ARCHDIR = $(ARCH)
|
||||
|
||||
test_rc_spektrum.CFLAGS += -I$(SRC_ARCH) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) -DPERIPHERALS_AUTO_INIT
|
||||
test_rc_spektrum.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||
test_rc_spektrum.srcs += $(SRC_BOOZ_TEST)/booz2_test_radio_control.c \
|
||||
test_rc_spektrum.srcs += $(SRC_AIRBORNE)/mcu.c \
|
||||
$(SRC_ARCH)/mcu_arch.c \
|
||||
$(SRC_BOOZ_TEST)/booz2_test_radio_control.c \
|
||||
$(SRC_ARCH)/stm32_exceptions.c \
|
||||
$(SRC_ARCH)/stm32_vector_table.c
|
||||
|
||||
@@ -196,7 +209,7 @@ test_rc_spektrum.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
|
||||
test_rc_spektrum.CFLAGS += -DSYS_TIME_LED=$(SYS_TIME_LED)
|
||||
test_rc_spektrum.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
|
||||
test_rc_spektrum.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
|
||||
test_rc_spektrum.srcs += $(SRC_ARCH)/uart_hw.c
|
||||
test_rc_spektrum.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
|
||||
test_rc_spektrum.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
|
||||
test_rc_spektrum.srcs += downlink.c pprz_transport.c
|
||||
test_rc_spektrum.CFLAGS += -DRADIO_CONTROL
|
||||
@@ -226,7 +239,9 @@ test_rc_ppm.ARCHDIR = $(ARCH)
|
||||
test_rc_ppm.CFLAGS += -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) -I$(SRC_BOARD)
|
||||
test_rc_ppm.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||
test_rc_ppm.CFLAGS += -DPERIPHERALS_AUTO_INIT
|
||||
test_rc_ppm.srcs += $(SRC_BOOZ)/test/booz2_test_radio_control.c \
|
||||
test_rc_ppm.srcs += $(SRC_AIRBORNE)/mcu.c \
|
||||
$(SRC_ARCH)/mcu_arch.c \
|
||||
$(SRC_BOOZ)/test/booz2_test_radio_control.c \
|
||||
$(SRC_ARCH)/stm32_exceptions.c \
|
||||
$(SRC_ARCH)/stm32_vector_table.c
|
||||
|
||||
@@ -237,7 +252,7 @@ test_rc_ppm.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
|
||||
test_rc_ppm.CFLAGS += -DSYS_TIME_LED=$(SYS_TIME_LED)
|
||||
test_rc_ppm.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
|
||||
test_rc_ppm.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
|
||||
test_rc_ppm.srcs += $(SRC_ARCH)/uart_hw.c
|
||||
test_rc_ppm.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
|
||||
test_rc_ppm.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
|
||||
test_rc_ppm.srcs += downlink.c pprz_transport.c
|
||||
test_rc_ppm.CFLAGS += -DRADIO_CONTROL
|
||||
@@ -261,7 +276,9 @@ test_adc.ARCHDIR = $(ARCH)
|
||||
test_adc.CFLAGS = -I$(SRC_LISA) -I$(ARCH) -DPERIPHERALS_AUTO_INIT
|
||||
test_adc.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||
|
||||
test_adc.srcs = $(SRC_LISA)/test_adc.c \
|
||||
test_adc.srcs = $(SRC_AIRBORNE)/mcu.c \
|
||||
$(SRC_ARCH)/mcu_arch.c \
|
||||
$(SRC_LISA)/test_adc.c \
|
||||
$(SRC_ARCH)/stm32_exceptions.c \
|
||||
$(SRC_ARCH)/stm32_vector_table.c
|
||||
|
||||
@@ -274,7 +291,7 @@ test_adc.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
|
||||
test_adc.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
|
||||
|
||||
test_adc.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
|
||||
test_adc.srcs += $(SRC_ARCH)/uart_hw.c
|
||||
test_adc.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
|
||||
test_adc.CFLAGS += -DDATALINK=PPRZ -DPPRZ_UART=$(MODEM_PORT)
|
||||
|
||||
test_adc.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
|
||||
@@ -296,7 +313,9 @@ test_adc.CFLAGS += -DUSE_ADC1_2_IRQ_HANDLER
|
||||
test_imu_b2.ARCHDIR = $(ARCH)
|
||||
test_imu_b2.CFLAGS = -I$(SRC_LISA) -I$(ARCH) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) -DPERIPHERALS_AUTO_INIT
|
||||
test_imu_b2.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||
test_imu_b2.srcs += $(SRC_BOOZ_TEST)/booz_test_imu.c \
|
||||
test_imu_b2.srcs += $(SRC_AIRBORNE)/mcu.c \
|
||||
$(SRC_ARCH)/mcu_arch.c \
|
||||
$(SRC_BOOZ_TEST)/booz_test_imu.c \
|
||||
$(SRC_ARCH)/stm32_exceptions.c \
|
||||
$(SRC_ARCH)/stm32_vector_table.c
|
||||
|
||||
@@ -309,7 +328,7 @@ test_imu_b2.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
|
||||
test_imu_b2.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
|
||||
|
||||
test_imu_b2.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
|
||||
test_imu_b2.srcs += $(SRC_ARCH)/uart_hw.c
|
||||
test_imu_b2.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
|
||||
|
||||
test_imu_b2.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
|
||||
test_imu_b2.srcs += downlink.c pprz_transport.c
|
||||
@@ -337,7 +356,9 @@ test_imu_b2.srcs += peripherals/ms2001.c $(SRC_ARCH)/peripherals/ms2001_arch.c
|
||||
test_imu_b2_2.ARCHDIR = $(ARCH)
|
||||
test_imu_b2_2.CFLAGS = -I$(SRC_LISA) -I$(ARCH) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) -DPERIPHERALS_AUTO_INIT
|
||||
test_imu_b2_2.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||
test_imu_b2_2.srcs += $(SRC_BOOZ_TEST)/booz_test_imu.c \
|
||||
test_imu_b2_2.srcs += $(SRC_AIRBORNE)/mcu.c \
|
||||
$(SRC_ARCH)/mcu_arch.c \
|
||||
$(SRC_BOOZ_TEST)/booz_test_imu.c \
|
||||
$(SRC_ARCH)/stm32_exceptions.c \
|
||||
$(SRC_ARCH)/stm32_vector_table.c
|
||||
|
||||
@@ -350,7 +371,7 @@ test_imu_b2_2.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
|
||||
test_imu_b2_2.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
|
||||
|
||||
test_imu_b2_2.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
|
||||
test_imu_b2_2.srcs += $(SRC_ARCH)/uart_hw.c
|
||||
test_imu_b2_2.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
|
||||
|
||||
test_imu_b2_2.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
|
||||
test_imu_b2_2.srcs += downlink.c pprz_transport.c
|
||||
@@ -366,7 +387,7 @@ test_imu_b2_2.CFLAGS += -DUSE_SPI2 -DUSE_DMA1_C4_IRQ -DUSE_EXTI2_IRQ -DUSE_SPI2_
|
||||
test_imu_b2_2.srcs += $(SRC_SUBSYSTEMS)/imu/imu_b2.c $(SRC_ARCH)/subsystems/imu/imu_b2_arch.c
|
||||
test_imu_b2_2.srcs += peripherals/max1168.c $(SRC_ARCH)/peripherals/max1168_arch.c
|
||||
test_imu_b2_2.CFLAGS += -DUSE_I2C2
|
||||
test_imu_b2_2.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
||||
test_imu_b2_2.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
|
||||
test_imu_b2_2.srcs += peripherals/hmc5843.c $(SRC_BOOZ_ARCH)/peripherals/hmc5843_arch.c
|
||||
test_imu_b2_2.CFLAGS += -DUSE_EXTI9_5_IRQ # Mag Int on PB5
|
||||
|
||||
@@ -377,7 +398,9 @@ test_imu_b2_2.CFLAGS += -DUSE_EXTI9_5_IRQ # Mag Int on PB5
|
||||
test_imu_aspirin.ARCHDIR = $(ARCH)
|
||||
test_imu_aspirin.CFLAGS = -I$(SRC_FIRMWARE) -I$(SRC_LISA) -I$(ARCH) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) -DPERIPHERALS_AUTO_INIT
|
||||
test_imu_aspirin.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||
test_imu_aspirin.srcs += $(SRC_BOOZ_TEST)/booz_test_imu.c \
|
||||
test_imu_aspirin.srcs += $(SRC_AIRBORNE)/mcu.c \
|
||||
$(SRC_ARCH)/mcu_arch.c \
|
||||
$(SRC_BOOZ_TEST)/booz_test_imu.c \
|
||||
$(SRC_ARCH)/stm32_exceptions.c \
|
||||
$(SRC_ARCH)/stm32_vector_table.c
|
||||
|
||||
@@ -389,7 +412,7 @@ test_imu_aspirin.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
|
||||
test_imu_aspirin.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
|
||||
|
||||
test_imu_aspirin.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
|
||||
test_imu_aspirin.srcs += $(SRC_ARCH)/uart_hw.c
|
||||
test_imu_aspirin.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
|
||||
|
||||
test_imu_aspirin.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
|
||||
test_imu_aspirin.srcs += downlink.c pprz_transport.c
|
||||
@@ -402,7 +425,7 @@ test_imu_aspirin.srcs += $(SRC_SUBSYSTEMS)/imu.c \
|
||||
$(SRC_ARCH)/subsystems/imu/imu_aspirin_arch.c
|
||||
|
||||
test_imu_aspirin.CFLAGS += -DUSE_I2C2
|
||||
test_imu_aspirin.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
||||
test_imu_aspirin.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
|
||||
test_imu_aspirin.CFLAGS += -DUSE_EXTI15_10_IRQ # Gyro Int on PC14
|
||||
test_imu_aspirin.CFLAGS += -DUSE_EXTI9_5_IRQ # Mag Int on PB5
|
||||
test_imu_aspirin.CFLAGS += -DUSE_EXTI2_IRQ # Accel Int on PD2
|
||||
@@ -422,7 +445,9 @@ test_imu_aspirin.CFLAGS += -DUSE_DMA1_C4_IRQ # SPI2 Rx DMA
|
||||
test_hmc5843.ARCHDIR = $(ARCH)
|
||||
test_hmc5843.CFLAGS = -I$(SRC_FIRMWARE) -I$(SRC_LISA) -I$(ARCH) -Ibooz -DPERIPHERALS_AUTO_INIT
|
||||
test_hmc5843.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||
test_hmc5843.srcs = lisa/test/lisa_test_hmc5843.c \
|
||||
test_hmc5843.srcs = $(SRC_AIRBORNE)/mcu.c \
|
||||
$(SRC_ARCH)/mcu_arch.c \
|
||||
lisa/test/lisa_test_hmc5843.c \
|
||||
$(SRC_ARCH)/stm32_exceptions.c \
|
||||
$(SRC_ARCH)/stm32_vector_table.c
|
||||
test_hmc5843.CFLAGS += -DUSE_LED
|
||||
@@ -432,13 +457,13 @@ test_hmc5843.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
|
||||
test_hmc5843.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
|
||||
|
||||
test_hmc5843.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
|
||||
test_hmc5843.srcs += $(SRC_ARCH)/uart_hw.c
|
||||
test_hmc5843.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
|
||||
|
||||
test_hmc5843.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
|
||||
test_hmc5843.srcs += downlink.c pprz_transport.c
|
||||
|
||||
test_hmc5843.CFLAGS += -DUSE_I2C2
|
||||
test_hmc5843.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
||||
test_hmc5843.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
|
||||
test_hmc5843.CFLAGS += -DIMU_OVERRIDE_CHANNELS
|
||||
test_hmc5843.CFLAGS += -DUSE_EXTI9_5_IRQ # Mag Int on PB5
|
||||
|
||||
@@ -449,7 +474,9 @@ test_hmc5843.CFLAGS += -DUSE_EXTI9_5_IRQ # Mag Int on PB5
|
||||
test_itg3200.ARCHDIR = $(ARCH)
|
||||
test_itg3200.CFLAGS = -I$(SRC_FIRMWARE) -I$(SRC_LISA) -I$(ARCH) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) -DPERIPHERALS_AUTO_INIT
|
||||
test_itg3200.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||
test_itg3200.srcs += lisa/test/lisa_test_itg3200.c \
|
||||
test_itg3200.srcs += $(SRC_AIRBORNE)/mcu.c \
|
||||
$(SRC_ARCH)/mcu_arch.c \
|
||||
lisa/test/lisa_test_itg3200.c \
|
||||
$(SRC_ARCH)/stm32_exceptions.c \
|
||||
$(SRC_ARCH)/stm32_vector_table.c
|
||||
|
||||
@@ -461,13 +488,13 @@ test_itg3200.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
|
||||
test_itg3200.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
|
||||
|
||||
test_itg3200.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
|
||||
test_itg3200.srcs += $(SRC_ARCH)/uart_hw.c
|
||||
test_itg3200.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
|
||||
|
||||
test_itg3200.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
|
||||
test_itg3200.srcs += downlink.c pprz_transport.c
|
||||
|
||||
test_itg3200.CFLAGS += -DUSE_I2C2
|
||||
test_itg3200.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
||||
test_itg3200.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
|
||||
test_itg3200.CFLAGS += -DUSE_EXTI15_10_IRQ # Gyro Int on PC14
|
||||
|
||||
|
||||
@@ -477,7 +504,9 @@ test_itg3200.CFLAGS += -DUSE_EXTI15_10_IRQ # Gyro Int on PC14
|
||||
test_adxl345.ARCHDIR = $(ARCH)
|
||||
test_adxl345.CFLAGS = -I$(SRC_FIRMWARE) -I$(SRC_LISA) -I$(ARCH) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) -DPERIPHERALS_AUTO_INIT
|
||||
test_adxl345.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||
test_adxl345.srcs += lisa/test/lisa_test_adxl345_dma.c \
|
||||
test_adxl345.srcs += $(SRC_AIRBORNE)/mcu.c \
|
||||
$(SRC_ARCH)/mcu_arch.c \
|
||||
lisa/test/lisa_test_adxl345_dma.c \
|
||||
$(SRC_ARCH)/stm32_exceptions.c \
|
||||
$(SRC_ARCH)/stm32_vector_table.c
|
||||
|
||||
@@ -489,7 +518,7 @@ test_adxl345.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
|
||||
test_adxl345.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
|
||||
|
||||
test_adxl345.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
|
||||
test_adxl345.srcs += $(SRC_ARCH)/uart_hw.c
|
||||
test_adxl345.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
|
||||
|
||||
test_adxl345.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
|
||||
test_adxl345.srcs += downlink.c pprz_transport.c
|
||||
@@ -505,7 +534,9 @@ test_adxl345.CFLAGS += -DUSE_DMA1_C4_IRQ # SPI2 Rx DMA
|
||||
test_esc_mkk_simple.ARCHDIR = $(ARCH)
|
||||
test_esc_mkk_simple.CFLAGS = -I$(SRC_FIRMWARE) -I$(SRC_LISA) -I$(ARCH) -DPERIPHERALS_AUTO_INIT
|
||||
test_esc_mkk_simple.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||
test_esc_mkk_simple.srcs = test/test_esc_mkk_simple.c \
|
||||
test_esc_mkk_simple.srcs = $(SRC_AIRBORNE)/mcu.c \
|
||||
$(SRC_ARCH)/mcu_arch.c \
|
||||
test/test_esc_mkk_simple.c \
|
||||
$(SRC_ARCH)/stm32_exceptions.c \
|
||||
$(SRC_ARCH)/stm32_vector_table.c
|
||||
test_esc_mkk_simple.CFLAGS += -DUSE_LED
|
||||
@@ -514,7 +545,7 @@ test_esc_mkk_simple.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED)
|
||||
test_esc_mkk_simple.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
|
||||
test_esc_mkk_simple.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
|
||||
test_esc_mkk_simple.CFLAGS += -DUSE_I2C2
|
||||
test_esc_mkk_simple.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
||||
test_esc_mkk_simple.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
|
||||
test_esc_mkk_simple.CFLAGS += -DACTUATORS_MKK_DEV=i2c2
|
||||
|
||||
|
||||
@@ -524,7 +555,9 @@ test_esc_mkk_simple.CFLAGS += -DACTUATORS_MKK_DEV=i2c2
|
||||
test_esc_asctecv1_simple.ARCHDIR = $(ARCH)
|
||||
test_esc_asctecv1_simple.CFLAGS = -I$(SRC_FIRMWARE) -I$(SRC_LISA) -I$(ARCH) -DPERIPHERALS_AUTO_INIT
|
||||
test_esc_asctecv1_simple.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||
test_esc_asctecv1_simple.srcs = test/test_esc_asctecv1_simple.c \
|
||||
test_esc_asctecv1_simple.srcs = $(SRC_AIRBORNE)/mcu.c \
|
||||
$(SRC_ARCH)/mcu_arch.c \
|
||||
test/test_esc_asctecv1_simple.c \
|
||||
$(SRC_ARCH)/stm32_exceptions.c \
|
||||
$(SRC_ARCH)/stm32_vector_table.c
|
||||
test_esc_asctecv1_simple.CFLAGS += -DUSE_LED
|
||||
@@ -533,7 +566,7 @@ test_esc_asctecv1_simple.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1
|
||||
test_esc_asctecv1_simple.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
|
||||
test_esc_asctecv1_simple.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
|
||||
test_esc_asctecv1_simple.CFLAGS += -DUSE_I2C1
|
||||
test_esc_asctecv1_simple.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
||||
test_esc_asctecv1_simple.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
|
||||
|
||||
|
||||
#
|
||||
@@ -542,7 +575,9 @@ test_esc_asctecv1_simple.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
||||
test_actuators_mkk.ARCHDIR = $(ARCH)
|
||||
test_actuators_mkk.CFLAGS = -I$(SRC_LISA) -I$(ARCH) -I$(SRC_BOOZ) -DPERIPHERALS_AUTO_INIT
|
||||
test_actuators_mkk.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||
test_actuators_mkk.srcs = test/test_actuators.c \
|
||||
test_actuators_mkk.srcs = $(SRC_AIRBORNE)/mcu.c \
|
||||
$(SRC_ARCH)/mcu_arch.c \
|
||||
test/test_actuators.c \
|
||||
$(SRC_ARCH)/stm32_exceptions.c \
|
||||
$(SRC_ARCH)/stm32_vector_table.c
|
||||
|
||||
@@ -554,7 +589,7 @@ test_actuators_mkk.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
|
||||
test_actuators_mkk.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
|
||||
|
||||
test_actuators_mkk.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
|
||||
test_actuators_mkk.srcs += $(SRC_ARCH)/uart_hw.c
|
||||
test_actuators_mkk.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
|
||||
|
||||
test_actuators_mkk.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
|
||||
test_actuators_mkk.srcs += downlink.c pprz_transport.c
|
||||
@@ -564,7 +599,7 @@ test_actuators_mkk.srcs += $(SRC_FIRMWARE)/actuators/actuators_mkk.c
|
||||
test_actuators_mkk.CFLAGS += -DACTUATORS_MKK_DEVICE=i2c1
|
||||
test_actuators_mkk.srcs += $(SRC_FIRMWARE)/actuators/supervision.c
|
||||
test_actuators_mkk.CFLAGS += -DUSE_I2C1
|
||||
test_actuators_mkk.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
||||
test_actuators_mkk.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
|
||||
|
||||
#
|
||||
# test actuators asctecv1
|
||||
@@ -572,7 +607,9 @@ test_actuators_mkk.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
||||
test_actuators_asctecv1.ARCHDIR = $(ARCH)
|
||||
test_actuators_asctecv1.CFLAGS = -I$(SRC_LISA) -I$(ARCH) -I$(SRC_BOOZ) -DPERIPHERALS_AUTO_INIT
|
||||
test_actuators_asctecv1.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||
test_actuators_asctecv1.srcs = test/test_actuators.c \
|
||||
test_actuators_asctecv1.srcs = $(SRC_AIRBORNE)/mcu.c \
|
||||
$(SRC_ARCH)/mcu_arch.c \
|
||||
test/test_actuators.c \
|
||||
$(SRC_ARCH)/stm32_exceptions.c \
|
||||
$(SRC_ARCH)/stm32_vector_table.c
|
||||
|
||||
@@ -584,7 +621,7 @@ test_actuators_asctecv1.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512
|
||||
test_actuators_asctecv1.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
|
||||
|
||||
test_actuators_asctecv1.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
|
||||
test_actuators_asctecv1.srcs += $(SRC_ARCH)/uart_hw.c
|
||||
test_actuators_asctecv1.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
|
||||
|
||||
test_actuators_asctecv1.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
|
||||
test_actuators_asctecv1.srcs += downlink.c pprz_transport.c
|
||||
@@ -593,7 +630,7 @@ test_actuators_asctecv1.srcs += $(SRC_BOOZ)/booz2_commands.c
|
||||
test_actuators_asctecv1.CFLAGS += -DACTUATORS_ASCTEC_DEVICE=i2c1
|
||||
test_actuators_asctecv1.srcs += $(SRC_FIRMWARE)/actuators/actuators_asctec.c
|
||||
test_actuators_asctecv1.CFLAGS += -DUSE_I2C1
|
||||
test_actuators_asctecv1.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
||||
test_actuators_asctecv1.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
|
||||
|
||||
|
||||
#
|
||||
@@ -602,7 +639,9 @@ test_actuators_asctecv1.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
||||
test_bmp085.ARCHDIR = $(ARCH)
|
||||
test_bmp085.CFLAGS = -I$(SRC_FIRMWARE) -I$(SRC_LISA) -I$(ARCH) -DPERIPHERALS_AUTO_INIT
|
||||
test_bmp085.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||
test_bmp085.srcs = lisa/test/lisa_test_bmp085.c \
|
||||
test_bmp085.srcs = $(SRC_AIRBORNE)/mcu.c \
|
||||
$(SRC_ARCH)/mcu_arch.c \
|
||||
lisa/test/lisa_test_bmp085.c \
|
||||
$(SRC_ARCH)/stm32_exceptions.c \
|
||||
$(SRC_ARCH)/stm32_vector_table.c
|
||||
test_bmp085.CFLAGS += -DUSE_LED
|
||||
@@ -612,13 +651,13 @@ test_bmp085.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
|
||||
test_bmp085.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
|
||||
|
||||
test_bmp085.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
|
||||
test_bmp085.srcs += $(SRC_ARCH)/uart_hw.c
|
||||
test_bmp085.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
|
||||
|
||||
test_bmp085.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
|
||||
test_bmp085.srcs += downlink.c pprz_transport.c
|
||||
|
||||
test_bmp085.CFLAGS += -DUSE_I2C2
|
||||
test_bmp085.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
||||
test_bmp085.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
|
||||
#test_bmp085.CFLAGS += -DIMU_OVERRIDE_CHANNELS
|
||||
#test_bmp085.CFLAGS += -DUSE_EXTI9_5_IRQ # Mag Int on PB5
|
||||
|
||||
@@ -630,7 +669,9 @@ test_bmp085.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
||||
test_manual.ARCHDIR = $(ARCH)
|
||||
test_manual.CFLAGS = -I$(SRC_FIRMWARE) -I$(ARCH) -DPERIPHERALS_AUTO_INIT
|
||||
test_manual.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||
test_manual.srcs = test/test_manual.c \
|
||||
test_manual.srcs = $(SRC_AIRBORNE)/mcu.c \
|
||||
$(SRC_ARCH)/mcu_arch.c \
|
||||
test/test_manual.c \
|
||||
$(SRC_ARCH)/stm32_exceptions.c \
|
||||
$(SRC_ARCH)/stm32_vector_table.c
|
||||
test_manual.CFLAGS += -DUSE_LED
|
||||
@@ -640,7 +681,7 @@ test_manual.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
|
||||
test_manual.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
|
||||
|
||||
test_manual.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
|
||||
test_manual.srcs += $(SRC_ARCH)/uart_hw.c
|
||||
test_manual.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
|
||||
|
||||
test_manual.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT)
|
||||
test_manual.srcs += downlink.c pprz_transport.c
|
||||
@@ -674,7 +715,9 @@ test_manual.srcs += $(SRC_SUBSYSTEMS)/radio_control.c
|
||||
tunnel.ARCHDIR = $(ARCH)
|
||||
tunnel.CFLAGS += -I$(SRC_LISA) -I$(ARCH) -DPERIPHERALS_AUTO_INIT
|
||||
tunnel.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||
tunnel.srcs += $(SRC_LISA)/tunnel_hw.c \
|
||||
tunnel.srcs += $(SRC_AIRBORNE)/mcu.c \
|
||||
$(SRC_ARCH)/mcu_arch.c \
|
||||
$(SRC_LISA)/tunnel_hw.c \
|
||||
$(SRC_ARCH)/stm32_exceptions.c \
|
||||
$(SRC_ARCH)/stm32_vector_table.c
|
||||
tunnel.CFLAGS += -DUSE_LED
|
||||
|
||||
@@ -42,7 +42,7 @@ stm_passthrough.CFLAGS += -DDOWNLINK
|
||||
stm_passthrough.CFLAGS += -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
|
||||
stm_passthrough.srcs += downlink.c pprz_transport.c
|
||||
stm_passthrough.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
|
||||
stm_passthrough.srcs += $(SRC_ARCH)/uart_hw.c
|
||||
stm_passthrough.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
|
||||
|
||||
# Link Overo
|
||||
stm_passthrough.CFLAGS += -DUSE_OVERO_LINK
|
||||
@@ -75,7 +75,7 @@ stm_passthrough.srcs += $(SRC_BOOZ)/booz2_commands.c
|
||||
#stm_passthrough.srcs += $(SRC_FIRMWARE)/actuators/supervision.c
|
||||
#stm_passthrough.CFLAGS += -DACTUATORS_ASCTEC_V2_PROTOCOL
|
||||
#stm_passthrough.srcs += $(SRC_FIRMWARE)/actuators/actuators_asctec.c
|
||||
#stm_passthrough.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
||||
#stm_passthrough.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
|
||||
#
|
||||
#stm_passthrough.CFLAGS += -DACTUATORS_ASCTEC_DEVICE=i2c1
|
||||
#stm_passthrough.CFLAGS += -DUSE_I2C1
|
||||
@@ -91,7 +91,7 @@ stm_passthrough.srcs += $(SRC_FIRMWARE)/actuators/arch/$(ARCH)/actuators_pwm_arc
|
||||
# Baro
|
||||
stm_passthrough.srcs += $(SRC_BOARD)/baro_board.c
|
||||
stm_passthrough.CFLAGS += -DUSE_I2C2
|
||||
stm_passthrough.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
||||
stm_passthrough.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
|
||||
|
||||
# Vanes
|
||||
stm_passthrough.CFLAGS += -I $(SRC_CSC)
|
||||
|
||||
@@ -268,7 +268,7 @@ test_datalink.srcs += $(SRC_ARCH)/uart_hw.c
|
||||
test_datalink.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2
|
||||
test_datalink.srcs += downlink.c pprz_transport.c
|
||||
test_datalink.CFLAGS += -DDATALINK=PPRZ -DPPRZ_UART=Uart2
|
||||
#test_datalink.srcs += $(SRC_BOOZ)/booz2_datalink.c
|
||||
#test_datalink.srcs += $(SRC_FIRMWARE)/datalink.c
|
||||
|
||||
#
|
||||
# tunnel
|
||||
|
||||
@@ -95,12 +95,12 @@ endif
|
||||
ap.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c
|
||||
ap.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport
|
||||
ap.CFLAGS += -DDOWNLINK_DEVICE=$(MODEM_PORT)
|
||||
ap.srcs += $(SRC_FIRMWARE)/telemetry.c \
|
||||
downlink.c \
|
||||
pprz_transport.c
|
||||
ap.srcs += $(SRC_FIRMWARE)/telemetry.c
|
||||
ap.srcs += downlink.c
|
||||
ap.srcs += pprz_transport.c
|
||||
ap.CFLAGS += -DDATALINK=PPRZ
|
||||
ap.CFLAGS += -DPPRZ_UART=$(MODEM_PORT)
|
||||
ap.srcs += $(SRC_BOOZ)/booz2_datalink.c
|
||||
ap.srcs += $(SRC_FIRMWARE)/datalink.c
|
||||
ap.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
|
||||
|
||||
ifeq ($(ARCH), lpc21)
|
||||
|
||||
@@ -14,7 +14,7 @@ sim.srcs += latlong.c\
|
||||
sys_time.c\
|
||||
$(SRC_FIRMWARE)/main_fbw.c \
|
||||
$(SRC_FIRMWARE)/main_ap.c \
|
||||
datalink.c \
|
||||
$(SRC_FIRMWARE)/datalink.c \
|
||||
$(SRC_ARCH)/ppm_hw.c \
|
||||
$(SRC_ARCH)/sim_gps.c\
|
||||
$(SRC_ARCH)/sim_ir.c \
|
||||
|
||||
@@ -29,7 +29,7 @@ jsbsim.srcs = $(SRC_ARCH)/jsbsim_hw.c $(SRC_ARCH)/jsbsim_gps.c $(SRC_ARCH)/jsbsi
|
||||
jsbsim.srcs += latlong.c downlink.c commands.c gps.c inter_mcu.c subsystems/sensors/infrared.c \
|
||||
$(SRC_FIXEDWING)/stabilization/stabilization_attitude.c \
|
||||
$(SRC_FIXEDWING)/guidance/guidance_v.c\
|
||||
subsystems/nav.c estimator.c sys_time.c $(SRC_FIRMWARE)/main_fbw.c $(SRC_FIRMWARE)/main_ap.c datalink.c
|
||||
subsystems/nav.c estimator.c sys_time.c $(SRC_FIRMWARE)/main_fbw.c $(SRC_FIRMWARE)/main_ap.c $(SRC_FIRMWARE)/datalink.c
|
||||
jsbsim.srcs += $(SIMDIR)/sim_ac_jsbsim.c
|
||||
# Choose in your airframe file type of airframe
|
||||
# jsbsim.srcs += $(SIMDIR)/sim_ac_fw.c
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
sim.ARCHDIR = $(ARCH)
|
||||
sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DUSE_INFRARED -DRADIO_CONTROL_SETTINGS -DSIM_UART -DDOWNLINK_AP_DEVICE=SimUart -DDOWNLINK_FBW_DEVICE=SimUart -DDATALINK=PPRZ
|
||||
sim.srcs = radio_control.c downlink.c pprz_transport.c commands.c gps.c inter_mcu.c subsystems/sensors/infrared.c $(SRC_FIRMWARE)/stabilization/stabilization_attitude.c $(SRC_FIRMWARE)/guidance/guidance_v.c nav.c estimator.c cam.c sys_time.c $(SRC_FIRMWARE)/main_fbw.c $(SRC_FIRMWARE)/main_ap.c rc_settings.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c $(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/sim_uart.c datalink.c
|
||||
sim.srcs = radio_control.c downlink.c pprz_transport.c commands.c gps.c inter_mcu.c subsystems/sensors/infrared.c $(SRC_FIRMWARE)/stabilization/stabilization_attitude.c $(SRC_FIRMWARE)/guidance/guidance_v.c nav.c estimator.c cam.c sys_time.c $(SRC_FIRMWARE)/main_fbw.c $(SRC_FIRMWARE)/main_ap.c rc_settings.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c $(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/sim_uart.c $(SRC_FIRMWARE)/datalink.c
|
||||
|
||||
@@ -179,7 +179,7 @@ sim.CFLAGS += -DSITL
|
||||
sim.srcs += $(SRC_ARCH)/sim_ap.c
|
||||
|
||||
sim.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport
|
||||
sim.srcs += downlink.c datalink.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/sim_adc_generic.c
|
||||
sim.srcs += downlink.c $(SRC_FIRMWARE)/datalink.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/sim_adc_generic.c
|
||||
|
||||
######################################################################
|
||||
##
|
||||
@@ -200,7 +200,7 @@ jsbsim.CFLAGS += -I$(SIMDIR) -I/usr/include -I$(JSBSIM_INC) `pkg-config glib-2
|
||||
jsbsim.LDFLAGS += `pkg-config glib-2.0 --libs` -lm -lpcre -lglibivy -L/usr/lib -lJSBSim
|
||||
|
||||
jsbsim.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport
|
||||
jsbsim.srcs += downlink.c datalink.c $(SRC_ARCH)/jsbsim_hw.c $(SRC_ARCH)/jsbsim_gps.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/jsbsim_transport.c
|
||||
jsbsim.srcs += downlink.c $(SRC_FIRMWARE)/datalink.c $(SRC_ARCH)/jsbsim_hw.c $(SRC_ARCH)/jsbsim_gps.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/jsbsim_transport.c
|
||||
|
||||
######################################################################
|
||||
##
|
||||
|
||||
@@ -7,6 +7,6 @@ MODEM_UART = Uart$(MODEM_UART_NR)
|
||||
|
||||
ap.CFLAGS += -DDOWNLINK -DDOWNLINK_FBW_DEVICE=$(MODEM_UART) -DDOWNLINK_AP_DEVICE=$(MODEM_UART) -DPPRZ_UART=$(MODEM_UART)
|
||||
ap.CFLAGS += -DDOWNLINK_TRANSPORT=PprzTransport -DDATALINK=PPRZ
|
||||
ap.srcs += $(SRC_FIXEDWING)/downlink.c $(SRC_FIXEDWING)/datalink.c $(SRC_FIXEDWING)/pprz_transport.c
|
||||
ap.srcs += $(SRC_FIXEDWING)/downlink.c $(SRC_FIRMWARE)/datalink.c $(SRC_FIXEDWING)/pprz_transport.c
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
ap.CFLAGS += -DDOWNLINK -DDOWNLINK_FBW_DEVICE=UsbS -DDOWNLINK_AP_DEVICE=UsbS -DPPRZ_UART=UsbS
|
||||
ap.CFLAGS += -DDOWNLINK_TRANSPORT=PprzTransport -DDATALINK=PPRZ -DUSE_USB_SERIAL -DUSE_USB_HIGH_PCLK
|
||||
ap.srcs += $(SRC_FIXEDWING)/downlink.c $(SRC_FIXEDWING)/datalink.c $(SRC_FIXEDWING)/pprz_transport.c
|
||||
ap.srcs += $(SRC_FIXEDWING)/downlink.c $(SRC_FIRMWARE)/datalink.c $(SRC_FIXEDWING)/pprz_transport.c
|
||||
ap.srcs += $(SRC_ARCH)/usb_ser_hw.c $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbcontrol.c
|
||||
ap.srcs += $(SRC_ARCH)/lpcusb/usbstdreq.c $(SRC_ARCH)/lpcusb/usbinit.c
|
||||
|
||||
|
||||
@@ -7,4 +7,4 @@ MODEM_UART = Uart$(MODEM_UART_NR)
|
||||
|
||||
ap.CFLAGS += -DDOWNLINK -DDOWNLINK_FBW_DEVICE=$(MODEM_UART) -DDOWNLINK_AP_DEVICE=$(MODEM_UART) -DXBEE_UART=$(MODEM_UART)
|
||||
ap.CFLAGS += -DDOWNLINK_TRANSPORT=XBeeTransport -DDATALINK=XBEE
|
||||
ap.srcs += $(SRC_FIXEDWING)/downlink.c $(SRC_FIXEDWING)/datalink.c $(SRC_FIXEDWING)/xbee.c
|
||||
ap.srcs += $(SRC_FIXEDWING)/downlink.c $(SRC_FIRMWARE)/datalink.c $(SRC_FIXEDWING)/xbee.c
|
||||
|
||||
@@ -81,7 +81,7 @@ sim.srcs += $(SRC_FIRMWARE)/telemetry.c \
|
||||
|
||||
sim.srcs += $(SRC_BOOZ)/booz2_commands.c
|
||||
|
||||
sim.srcs += $(SRC_BOOZ)/booz2_datalink.c
|
||||
sim.srcs += $(SRC_FIRMWARE)/datalink.c
|
||||
|
||||
#
|
||||
#
|
||||
|
||||
@@ -25,11 +25,19 @@ RADIO_CONTROL_LINK = UART0
|
||||
|
||||
BARO_LED = 2
|
||||
|
||||
ifndef MODEM_PORT
|
||||
MODEM_PORT = UART1
|
||||
endif
|
||||
ifndef MODEM_BAUD
|
||||
MODEM_BAUD = B57600
|
||||
endif
|
||||
|
||||
AHRS_ALIGNER_LED = 3
|
||||
|
||||
ifndef GPS_PORT
|
||||
GPS_PORT=UART0
|
||||
endif
|
||||
ifndef GPS_BAUD
|
||||
GPS_BAUD=B38400
|
||||
endif
|
||||
GPS_LED=4
|
||||
|
||||
@@ -22,8 +22,16 @@ SYS_TIME_LED = 1 # not used on rotorcraft, only for tests
|
||||
|
||||
RADIO_CONTROL_LINK = UART0
|
||||
|
||||
ifndef MODEM_PORT
|
||||
MODEM_PORT = UART0
|
||||
endif
|
||||
ifndef MODEM_BAUD
|
||||
MODEM_BAUD = B57600
|
||||
endif
|
||||
|
||||
ifndef GPS_PORT
|
||||
GPS_PORT=UART1
|
||||
endif
|
||||
ifndef GPS_BAUD
|
||||
GPS_BAUD=B38400
|
||||
endif
|
||||
|
||||
@@ -41,13 +41,21 @@ RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT = UART3
|
||||
RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT = UART5
|
||||
RADIO_CONTROL_LED = 5
|
||||
|
||||
ifndef MODEM_PORT
|
||||
MODEM_PORT=UART2
|
||||
endif
|
||||
ifndef MODEM_BAUD
|
||||
MODEM_BAUD=B57600
|
||||
endif
|
||||
|
||||
AHRS_ALIGNER_LED = 7
|
||||
|
||||
ifndef GPS_PORT
|
||||
GPS_PORT=UART1
|
||||
endif
|
||||
ifndef GPS_BAUD
|
||||
GPS_BAUD=B38400
|
||||
endif
|
||||
GPS_LED = 3
|
||||
|
||||
#
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id: mc22.xml 3610 2009-07-02 16:35:18Z poine $
|
||||
--
|
||||
-- (c) 2003 Pascal Brisset, Antoine Drouin
|
||||
--
|
||||
-- This file is part of paparazzi.
|
||||
--
|
||||
-- paparazzi is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation; either version 2, or (at your option)
|
||||
-- any later version.
|
||||
--
|
||||
-- paparazzi is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with paparazzi; see the file COPYING. If not, write to
|
||||
-- the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
-- Boston, MA 02111-1307, USA.
|
||||
-->
|
||||
|
||||
<!--
|
||||
-- Attributes of root (Radio) tag :
|
||||
-- name: name of RC
|
||||
-- min: min width of a pulse to be considered as a data pulse
|
||||
-- max: max width of a pulse to be considered as a data pulse
|
||||
-- sync: min width of a pulse to be considered as a synchro pulse
|
||||
-- min, max and sync are expressed in micro-seconds
|
||||
-->
|
||||
|
||||
<!--
|
||||
-- Attributes of channel tag :
|
||||
-- ctl: name of the command on the transmitter - only for displaying
|
||||
-- no: order in the PPM frame
|
||||
-- function: logical command
|
||||
-- averaged: channel filtered through several frames (for discrete commands)
|
||||
-- min: minimum pulse length (micro-seconds)
|
||||
-- max: maximum pulse length (micro-seconds)
|
||||
-- neutral: neutral pulse length (micro-seconds)
|
||||
Note: a command may be reversed by exchanging min and max values
|
||||
-->
|
||||
|
||||
<!DOCTYPE radio SYSTEM "radio.dtd">
|
||||
<radio name="GraupnerMC22" data_min="750" data_max="2750" sync_min="5000" sync_max="15000" pulse_type="NEGATIVE">
|
||||
<channel ctl="A" function="THROTTLE" min="1100" neutral="1100" max="1900" average="0"/> <!-- right stick up/down -->
|
||||
<channel ctl="B" function="ROLL" min="1100" neutral="1500" max="1900" average="0"/> <!-- right stick left/right -->
|
||||
<channel ctl="C" function="PITCH" min="1100" neutral="1500" max="1900" average="0"/> <!-- left stick up/down -->
|
||||
<channel ctl="D" function="YAW" min="1100" neutral="1500" max="1900" average="0"/> <!-- left stick left/right-->
|
||||
<channel ctl="E" function="MODE" min="1100" neutral="1500" max="1900" average="10"/> <!-- left switch -->
|
||||
<channel ctl="F" function="PAN" min="1100" neutral="1500" max="1900" average="0"/> <!-- left switch -->
|
||||
<channel ctl="G" function="TILT" min="1100" neutral="1500" max="1900" average="0"/> <!-- left switch -->
|
||||
<channel ctl="H" function="GENERAL1" min="1100" neutral="1500" max="1900" average="10"/> <!-- left switch -->
|
||||
<channel ctl="I" function="GENERAL2" min="1100" neutral="1500" max="1900" average="10"/> <!-- left switch -->
|
||||
</radio>
|
||||
@@ -59,6 +59,7 @@ void max1168_read( void ) {
|
||||
SSP_DisableRti();
|
||||
SSP_Enable();
|
||||
/* write control byte - wait EOC on extint */
|
||||
/* use internal reference and clock, sequentially scan channels 0-7 */
|
||||
SSPDR = (1 << 0 | 1 << 3 | 7 << 5) << 8;
|
||||
max1168_status = STA_MAX1168_SENDING_REQ;
|
||||
|
||||
|
||||
@@ -97,6 +97,7 @@ void max1168_read( void ) {
|
||||
Max1168Select();
|
||||
|
||||
/* write control byte - wait EOC on extint */
|
||||
/* use internal reference and clock, sequentially scan channels 0-7 */
|
||||
const uint16_t ctl_byte = (1 << 0 | 1 << 3 | 7 << 5) << 8;
|
||||
SPI_I2S_SendData(SPI2, ctl_byte);
|
||||
max1168_status = STA_MAX1168_SENDING_REQ;
|
||||
|
||||
@@ -29,8 +29,9 @@
|
||||
|
||||
#include BOARD_CONFIG
|
||||
|
||||
#include "init_hw.h"
|
||||
#include "mcu.h"
|
||||
#include "sys_time.h"
|
||||
#include "mcu_periph/uart.h"
|
||||
|
||||
#include "downlink.h"
|
||||
|
||||
@@ -58,7 +59,7 @@ int main(void) {
|
||||
}
|
||||
|
||||
static inline void main_init( void ) {
|
||||
hw_init();
|
||||
mcu_init();
|
||||
sys_time_init();
|
||||
baro_init();
|
||||
|
||||
|
||||
@@ -23,9 +23,10 @@
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "init_hw.h"
|
||||
#include "mcu.h"
|
||||
#include "sys_time.h"
|
||||
#include "interrupt_hw.h"
|
||||
#include "mcu_periph/uart.h"
|
||||
|
||||
#include "downlink.h"
|
||||
|
||||
@@ -48,7 +49,7 @@ int main( void ) {
|
||||
}
|
||||
|
||||
static inline void main_init( void ) {
|
||||
hw_init();
|
||||
mcu_init();
|
||||
sys_time_init();
|
||||
radio_control_init();
|
||||
int_enable();
|
||||
|
||||
@@ -143,33 +143,32 @@ STATIC_INLINE void main_periodic( void ) {
|
||||
/* set actuators */
|
||||
actuators_set(autopilot_motors_on);
|
||||
|
||||
PeriodicPrescaleBy10( \
|
||||
{ \
|
||||
radio_control_periodic_task(); \
|
||||
if (radio_control.status != RC_OK && \
|
||||
autopilot_mode != AP_MODE_KILL && \
|
||||
autopilot_mode != AP_MODE_NAV) \
|
||||
autopilot_set_mode(AP_MODE_FAILSAFE); \
|
||||
}, \
|
||||
{ \
|
||||
/* booz_fms_periodic(); FIXME */ \
|
||||
}, \
|
||||
{ \
|
||||
/*BoozControlSurfacesSetFromCommands();*/ \
|
||||
}, \
|
||||
{ \
|
||||
LED_PERIODIC(); \
|
||||
}, \
|
||||
{ baro_periodic();
|
||||
}, \
|
||||
{}, \
|
||||
{}, \
|
||||
{}, \
|
||||
{}, \
|
||||
{ \
|
||||
Booz2TelemetryPeriodic(); \
|
||||
} \
|
||||
); \
|
||||
PeriodicPrescaleBy10( \
|
||||
{ \
|
||||
radio_control_periodic_task(); \
|
||||
if (radio_control.status != RC_OK && \
|
||||
autopilot_mode != AP_MODE_KILL && \
|
||||
autopilot_mode != AP_MODE_NAV) \
|
||||
autopilot_set_mode(AP_MODE_FAILSAFE); \
|
||||
}, \
|
||||
{ \
|
||||
/* booz_fms_periodic(); FIXME */ \
|
||||
}, \
|
||||
{ \
|
||||
/*BoozControlSurfacesSetFromCommands();*/ \
|
||||
}, \
|
||||
{ \
|
||||
LED_PERIODIC(); \
|
||||
}, \
|
||||
{ baro_periodic(); \
|
||||
}, \
|
||||
{}, \
|
||||
{}, \
|
||||
{}, \
|
||||
{}, \
|
||||
{ \
|
||||
Booz2TelemetryPeriodic(); \
|
||||
} );
|
||||
|
||||
#ifdef USE_GPS
|
||||
if (radio_control.status != RC_OK && \
|
||||
|
||||
@@ -84,7 +84,7 @@ static void dialog_with_io_proc() {
|
||||
uint8_t crc_valid;
|
||||
|
||||
for (uint8_t i=0; i<6; i++) msg_out.payload.msg_down.pwm_outputs_usecs[i] = otp.servos_outputs_usecs[i];
|
||||
for (uint8_t i=0; i<4; i++) msg_out.payload.msg_down.csc_servo_cmd[i] = otp.csc_servo_outputs[i];
|
||||
// for (uint8_t i=0; i<4; i++) msg_out.payload.msg_down.csc_servo_cmd[i] = otp.csc_servo_outputs[i];
|
||||
|
||||
spi_link_send(&msg_out, sizeof(struct AutopilotMessageCRCFrame), &msg_in, &crc_valid);
|
||||
|
||||
|
||||
@@ -23,20 +23,21 @@
|
||||
*/
|
||||
|
||||
#include "mcu.h"
|
||||
#include "mcu_periph/uart.h"
|
||||
#include "sys_time.h"
|
||||
#include "downlink.h"
|
||||
#include "booz/booz2_commands.h"
|
||||
#include "actuators.h"
|
||||
#include "actuators/actuators_pwm.h"
|
||||
#include "subsystems/imu.h"
|
||||
#include "booz/booz_radio_control.h"
|
||||
#include "subsystems/radio_control.h"
|
||||
#include "autopilot.h"
|
||||
#include "ins.h"
|
||||
#include "subsystems/ins.h"
|
||||
#include "guidance.h"
|
||||
#include "navigation.h"
|
||||
#include "lisa/lisa_overo_link.h"
|
||||
#include "generated/airframe.h"
|
||||
#include "ahrs.h"
|
||||
#include "subsystems/ahrs.h"
|
||||
#ifdef PASSTHROUGH_CYGNUS
|
||||
#include "stabilization.h"
|
||||
#endif
|
||||
|
||||
@@ -34,11 +34,12 @@
|
||||
*/
|
||||
|
||||
#include BOARD_CONFIG
|
||||
#include "init_hw.h"
|
||||
#include "mcu.h"
|
||||
#include "sys_time.h"
|
||||
#include "downlink.h"
|
||||
#include "std.h"
|
||||
|
||||
#include "mcu_periph/uart.h"
|
||||
#include "peripherals/hmc5843.h"
|
||||
#include "my_debug_servo.h"
|
||||
#include "math/pprz_algebra_int.h"
|
||||
@@ -74,7 +75,7 @@ int main(void) {
|
||||
}
|
||||
|
||||
static inline void main_init( void ) {
|
||||
hw_init();
|
||||
mcu_init();
|
||||
sys_time_init();
|
||||
main_init_hw();
|
||||
}
|
||||
|
||||
@@ -35,7 +35,9 @@
|
||||
#include <stm32/spi.h>
|
||||
|
||||
#include BOARD_CONFIG
|
||||
#include "init_hw.h"
|
||||
#include "mcu.h"
|
||||
#include "mcu_periph/uart.h"
|
||||
#include "mcu_periph/i2c.h"
|
||||
#include "sys_time.h"
|
||||
#include "downlink.h"
|
||||
#include "std.h"
|
||||
@@ -71,7 +73,7 @@ int main(void) {
|
||||
}
|
||||
|
||||
static inline void main_init( void ) {
|
||||
hw_init();
|
||||
mcu_init();
|
||||
sys_time_init();
|
||||
main_init_hw();
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "sys_time.h"
|
||||
#include "led.h"
|
||||
#include "mcu_periph/adc.h"
|
||||
#include "mcu_periph/uart.h"
|
||||
#include "downlink.h"
|
||||
|
||||
int main_periodic(void);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <stm32/misc.h>
|
||||
|
||||
#include BOARD_CONFIG
|
||||
#include "init_hw.h"
|
||||
#include "mcu.h"
|
||||
#include "led.h"
|
||||
|
||||
void Delay(__IO uint32_t nCount);
|
||||
@@ -38,7 +38,7 @@ const int LED_PROG_OFF[LED_PROGRAM_SIZE] = {-1, -1, -1, -1, 3, 5, 7, 1,
|
||||
|
||||
int main(void) {
|
||||
int i = 0;
|
||||
hw_init();
|
||||
mcu_init();
|
||||
while (1) {
|
||||
for (i=0; i< LED_PROGRAM_SIZE; i++)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "init_hw.h"
|
||||
#include "mcu.h"
|
||||
#include "sys_time.h"
|
||||
#include "firmwares/rotorcraft/actuators/actuators_pwm.h"
|
||||
|
||||
@@ -41,7 +41,7 @@ int main(void) {
|
||||
}
|
||||
|
||||
static inline void main_init( void ) {
|
||||
hw_init();
|
||||
mcu_init();
|
||||
sys_time_init();
|
||||
actuators_init();
|
||||
}
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
#include <stm32/misc.h>
|
||||
|
||||
#include BOARD_CONFIG
|
||||
#include "init_hw.h"
|
||||
#include "mcu.h"
|
||||
#include "mcu_periph/uart.h"
|
||||
#include "sys_time.h"
|
||||
|
||||
static inline void main_init( void );
|
||||
@@ -46,7 +47,7 @@ int main(void) {
|
||||
}
|
||||
|
||||
static inline void main_init( void ) {
|
||||
hw_init();
|
||||
mcu_init();
|
||||
sys_time_init();
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ void ins_init() {
|
||||
#ifdef USE_INS_NAV_INIT
|
||||
ins_ltp_initialised = TRUE;
|
||||
|
||||
/** FIXME: should use the same code than MOVE_WP in booz2_datalink.c */
|
||||
/** FIXME: should use the same code than MOVE_WP in firmwares/rotorcraft/datalink.c */
|
||||
struct LlaCoor_i llh; /* Height above the ellipsoid */
|
||||
llh.lat = INT32_RAD_OF_DEG(NAV_LAT0);
|
||||
llh.lon = INT32_RAD_OF_DEG(NAV_LON0);
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "mcuw.h"
|
||||
#include "mcu.h"
|
||||
#include "sys_time.h"
|
||||
#include "led.h"
|
||||
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
*/
|
||||
|
||||
#include BOARD_CONFIG
|
||||
#include "init_hw.h"
|
||||
#include "mcu.h"
|
||||
#include "mcu_periph/uart.h"
|
||||
#include "interrupt_hw.h"
|
||||
#include "sys_time.h"
|
||||
#include "downlink.h"
|
||||
@@ -41,7 +42,7 @@ int main(void) {
|
||||
}
|
||||
|
||||
static inline void main_init( void ) {
|
||||
hw_init();
|
||||
mcu_init();
|
||||
sys_time_init();
|
||||
int_enable();
|
||||
}
|
||||
|
||||
@@ -1039,7 +1039,8 @@ let listen_flight_params = fun geomap auto_center_new_ac alert alt_graph ->
|
||||
end else if agl > 25. then
|
||||
ac.ground_prox <- false;
|
||||
try
|
||||
draw_altgraph alt_graph geomap aircrafts
|
||||
if not (alt_graph#drawing_area#misc#parent = None) then
|
||||
draw_altgraph alt_graph geomap aircrafts
|
||||
with _ -> ()
|
||||
|
||||
in
|
||||
|
||||
@@ -106,3 +106,47 @@ let combo_connect = fun ((combo: #GEdit.combo_box), (_,column)) cb ->
|
||||
let data = combo#model#get ~row ~column in
|
||||
cb data))
|
||||
|
||||
|
||||
type tree = GTree.view * (GTree.list_store * string GTree.column)
|
||||
let tree_widget = fst
|
||||
let tree_model = snd
|
||||
|
||||
let tree = fun (t:GTree.view) ->
|
||||
let cols = new GTree.column_list in
|
||||
let col_name = cols#add Gobject.Data.string in
|
||||
let store = GTree.list_store cols in
|
||||
t#set_model (Some store#coerce);
|
||||
let col1 = GTree.view_column ~renderer:(GTree.cell_renderer_text [], ["text",col_name]) () in
|
||||
ignore (t#append_column col1);
|
||||
(t , (store, col_name))
|
||||
|
||||
let tree_of = fun (t:GTree.view) (m:(GTree.list_store * string GTree.column)) ->
|
||||
(t, m)
|
||||
|
||||
let tree_values = fun (tree : tree) ->
|
||||
let (store, column) = tree_model tree in
|
||||
let values = ref "" in
|
||||
store#foreach (fun _ row ->
|
||||
values := !values^" "^(store#get ~row ~column);
|
||||
false);
|
||||
!values
|
||||
|
||||
let get_selected_in_tree = fun (tree : tree) ->
|
||||
let (store, column) = tree_model tree in
|
||||
let t = tree_widget tree in
|
||||
let sel_paths = t#selection#get_selected_rows in
|
||||
List.map (fun p -> store#get_row_reference p) sel_paths
|
||||
|
||||
let add_to_tree = fun (tree : tree) string ->
|
||||
let (store, column) = tree_model tree in
|
||||
let row = store#append () in
|
||||
store#set ~row ~column string
|
||||
|
||||
let remove_selected_from_tree = fun (tree : tree) ->
|
||||
let selected = get_selected_in_tree tree in
|
||||
let (store, _) = tree_model tree in
|
||||
List.iter (fun r -> ignore (store#remove r#iter)) selected
|
||||
|
||||
let clear_tree = fun (tree : tree) ->
|
||||
let (store, _) = tree_model tree in
|
||||
store#clear ()
|
||||
|
||||
@@ -58,3 +58,17 @@ val combo_separator : string
|
||||
val combo_value : combo -> string
|
||||
val select_in_combo : combo -> string -> unit
|
||||
val combo_connect : combo -> (string -> unit) -> unit
|
||||
|
||||
(*** Utilities for a tree view widget ***)
|
||||
type tree
|
||||
val tree_widget : tree -> GTree.view
|
||||
val tree_model : tree -> (GTree.list_store * string GTree.column)
|
||||
|
||||
val tree : GTree.view -> tree
|
||||
val tree_of : GTree.view -> (GTree.list_store * string GTree.column) -> tree
|
||||
|
||||
val tree_values : tree -> string
|
||||
val get_selected_in_tree : tree -> GTree.row_reference list
|
||||
val add_to_tree : tree -> string -> unit
|
||||
val remove_selected_from_tree : tree -> unit
|
||||
val clear_tree : tree -> unit
|
||||
|
||||
@@ -102,6 +102,7 @@
|
||||
<widget class="GtkImageMenuItem" id="menu_item_new_ac">
|
||||
<property name="label">gtk-new</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<signal name="activate" handler="on_menu_item_new_ac_activate"/>
|
||||
<accelerator key="N" signal="activate" modifiers="GDK_CONTROL_MASK"/>
|
||||
@@ -111,6 +112,7 @@
|
||||
<widget class="GtkImageMenuItem" id="delete_ac_menu_item">
|
||||
<property name="label">gtk-delete</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<signal name="activate" handler="on_delete_a/c2_activate"/>
|
||||
<accelerator key="X" signal="activate" modifiers="GDK_CONTROL_MASK"/>
|
||||
@@ -154,6 +156,7 @@
|
||||
<widget class="GtkImageMenuItem" id="menu_item_new session">
|
||||
<property name="label">gtk-new</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<signal name="activate" handler="on_menu_item_new session_activate"/>
|
||||
</widget>
|
||||
@@ -162,6 +165,7 @@
|
||||
<widget class="GtkImageMenuItem" id="menu_item_save_session">
|
||||
<property name="label">gtk-save</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<signal name="activate" handler="on_menu_item_save_session_activate"/>
|
||||
</widget>
|
||||
@@ -542,38 +546,76 @@
|
||||
<widget class="GtkHBox" id="hbox58">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label_settings">
|
||||
<widget class="GtkTreeView" id="tree_settings">
|
||||
<property name="height_request">4</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_________________</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="headers_visible">False</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="button_browse_settings">
|
||||
<property name="label" translatable="yes">...</property>
|
||||
<widget class="GtkVScrollbar" id="tree_settings_scrollbar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip" translatable="yes">Browse (multiple selection allowed)</property>
|
||||
<property name="use_underline">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="button_edit_settings">
|
||||
<property name="label">gtk-edit</property>
|
||||
<widget class="GtkVBox" id="vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip" translatable="yes">Launch an editor on the _first_ settings file</property>
|
||||
<property name="use_stock">True</property>
|
||||
<child>
|
||||
<widget class="GtkButton" id="button_browse_settings">
|
||||
<property name="label">gtk-add</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
<property name="tooltip" translatable="yes">Add a settings file</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="button_edit_settings">
|
||||
<property name="label">gtk-edit</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
<property name="tooltip" translatable="yes">Launch an editor on all the settings file</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="button_remove_settings">
|
||||
<property name="label">gtk-remove</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip" translatable="yes">Remove the selected settings file</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
||||
@@ -96,12 +96,21 @@ let gcs_or_edit = fun file ->
|
||||
| 2 -> ignore (Sys.command (sprintf "%s -edit '%s'&" gcs file))
|
||||
| _ -> failwith "Internal error: gcs_or_edit"
|
||||
|
||||
let ac_files = fun gui ->
|
||||
["airframe", "airframes", gui#label_airframe, gui#button_browse_airframe, gui#button_edit_airframe, edit, false;
|
||||
"flight_plan", "flight_plans", gui#label_flight_plan, gui#button_browse_flight_plan, gui#button_edit_flight_plan, gcs_or_edit, false;
|
||||
"settings", "settings", gui#label_settings, gui#button_browse_settings, gui#button_edit_settings, edit, true;
|
||||
"radio", "radios", gui#label_radio, gui#button_browse_radio, gui#button_edit_radio, edit, false;
|
||||
"telemetry", "telemetry", gui#label_telemetry, gui#button_browse_telemetry, gui#button_edit_telemetry, edit, false]
|
||||
type ac_data =
|
||||
Label of GMisc.label
|
||||
| Tree of Gtk_tools.tree
|
||||
|
||||
let string_of_ac_data = fun d ->
|
||||
match d with
|
||||
Label l -> l#text
|
||||
| Tree t -> Gtk_tools.tree_values t
|
||||
|
||||
let ac_files = fun gui model ->
|
||||
["airframe", "airframes", Label gui#label_airframe, gui#button_browse_airframe, gui#button_edit_airframe, edit, None;
|
||||
"flight_plan", "flight_plans", Label gui#label_flight_plan, gui#button_browse_flight_plan, gui#button_edit_flight_plan, gcs_or_edit, None;
|
||||
"settings", "settings", Tree (Gtk_tools.tree_of gui#tree_settings model), gui#button_browse_settings, gui#button_edit_settings, edit, Some gui#button_remove_settings;
|
||||
"radio", "radios", Label gui#label_radio, gui#button_browse_radio, gui#button_edit_radio, edit, None;
|
||||
"telemetry", "telemetry", Label gui#label_telemetry, gui#button_browse_telemetry, gui#button_edit_telemetry, edit, None]
|
||||
|
||||
|
||||
(* Awful but easier *)
|
||||
@@ -124,7 +133,8 @@ let correct_ac_name = fun s ->
|
||||
with
|
||||
Exit -> false
|
||||
|
||||
let save_callback = fun ?user_save gui ac_combo () ->
|
||||
(*TODO function text of date_type*)
|
||||
let save_callback = fun ?user_save gui ac_combo model () ->
|
||||
let ac_name = Gtk_tools.combo_value ac_combo
|
||||
and ac_id = gui#entry_ac_id#text in
|
||||
|
||||
@@ -133,6 +143,7 @@ let save_callback = fun ?user_save gui ac_combo () ->
|
||||
GToolbox.message_box ~title:"Error on A/C id" "A/C id must be a non null number less than 255"
|
||||
else
|
||||
let color = !current_color in
|
||||
let tree = Gtk_tools.tree_of gui#tree_settings model in
|
||||
let aircraft =
|
||||
Xml.Element ("aircraft",
|
||||
["name", ac_name;
|
||||
@@ -141,7 +152,7 @@ let save_callback = fun ?user_save gui ac_combo () ->
|
||||
"radio", gui#label_radio#text;
|
||||
"telemetry", gui#label_telemetry#text;
|
||||
"flight_plan", gui#label_flight_plan#text;
|
||||
"settings", gui#label_settings#text;
|
||||
"settings", Gtk_tools.tree_values tree;
|
||||
"gui_color", color],
|
||||
[]) in
|
||||
begin try Hashtbl.remove Utils.aircrafts ac_name with _ -> () end;
|
||||
@@ -205,31 +216,43 @@ let parse_ac_targets = fun target_combo ac_file ->
|
||||
|
||||
(* Link A/C to airframe & flight_plan labels *)
|
||||
let ac_combo_handler = fun gui (ac_combo:Gtk_tools.combo) target_combo ->
|
||||
(* build tree for settings *)
|
||||
let tree_set = Gtk_tools.tree gui#tree_settings in
|
||||
let model = Gtk_tools.tree_model tree_set in
|
||||
(* attach vertical scrollbar *)
|
||||
gui#tree_settings#set_vadjustment gui#tree_settings_scrollbar#adjustment;
|
||||
|
||||
(* Update_params callback *)
|
||||
let update_params = fun ac_name ->
|
||||
try
|
||||
let aircraft = Hashtbl.find Utils.aircrafts ac_name in
|
||||
let sample = aircraft_sample ac_name "42" in
|
||||
let value = fun a ->
|
||||
try (ExtXml.attrib aircraft a) with _ -> Xml.attrib sample a in
|
||||
List.iter
|
||||
(fun (a, _subdir, label, _, _, _, _) -> label#set_text (value a))
|
||||
(ac_files gui);
|
||||
let ac_id = ExtXml.attrib aircraft "ac_id"
|
||||
and gui_color = ExtXml.attrib_or_default aircraft "gui_color" "white" in
|
||||
gui#button_clean#misc#set_sensitive true;
|
||||
gui#button_build#misc#set_sensitive true;
|
||||
gui#eventbox_gui_color#misc#modify_bg [`NORMAL, `NAME gui_color];
|
||||
current_color := gui_color;
|
||||
gui#entry_ac_id#set_text ac_id;
|
||||
(Gtk_tools.combo_widget target_combo)#misc#set_sensitive true;
|
||||
parse_ac_targets target_combo (ExtXml.attrib aircraft "airframe");
|
||||
try (ExtXml.attrib aircraft a) with _ -> Xml.attrib sample a in
|
||||
List.iter (fun (a, _subdir, label, _, _, _, _) ->
|
||||
match label with
|
||||
Label l -> l#set_text (value a)
|
||||
| Tree t ->
|
||||
ignore (Gtk_tools.clear_tree tree_set);
|
||||
let names = Str.split regexp_space (value a) in
|
||||
List.iter (fun n -> Gtk_tools.add_to_tree t n) names
|
||||
) (ac_files gui model);
|
||||
let ac_id = ExtXml.attrib aircraft "ac_id"
|
||||
and gui_color = ExtXml.attrib_or_default aircraft "gui_color" "white" in
|
||||
gui#button_clean#misc#set_sensitive true;
|
||||
gui#button_build#misc#set_sensitive true;
|
||||
gui#eventbox_gui_color#misc#modify_bg [`NORMAL, `NAME gui_color];
|
||||
current_color := gui_color;
|
||||
gui#entry_ac_id#set_text ac_id;
|
||||
(Gtk_tools.combo_widget target_combo)#misc#set_sensitive true;
|
||||
parse_ac_targets target_combo (ExtXml.attrib aircraft "airframe");
|
||||
with
|
||||
Not_found ->
|
||||
gui#label_airframe#set_text "";
|
||||
gui#label_flight_plan#set_text "";
|
||||
gui#button_clean#misc#set_sensitive false;
|
||||
gui#button_build#misc#set_sensitive false;
|
||||
(Gtk_tools.combo_widget target_combo)#misc#set_sensitive false
|
||||
gui#label_airframe#set_text "";
|
||||
gui#label_flight_plan#set_text "";
|
||||
gui#button_clean#misc#set_sensitive false;
|
||||
gui#button_build#misc#set_sensitive false;
|
||||
(Gtk_tools.combo_widget target_combo)#misc#set_sensitive false
|
||||
in
|
||||
Gtk_tools.combo_connect ac_combo update_params;
|
||||
|
||||
@@ -275,19 +298,22 @@ let ac_combo_handler = fun gui (ac_combo:Gtk_tools.combo) target_combo ->
|
||||
let colorname = string_of_gdkcolor csd#colorsel#color in
|
||||
gui#eventbox_gui_color#misc#modify_bg [`NORMAL, `NAME colorname];
|
||||
current_color := colorname;
|
||||
save_callback gui ac_combo ();
|
||||
save_callback gui ac_combo model ();
|
||||
csd#destroy () in
|
||||
ignore (csd#ok_button#connect#clicked ~callback);
|
||||
ignore (csd#cancel_button#connect#clicked ~callback:csd#destroy) in
|
||||
ignore(gui#button_gui_color#connect#clicked ~callback);
|
||||
|
||||
(* A/C id *)
|
||||
ignore(gui#entry_ac_id#connect#changed ~callback:(fun () -> save_callback gui ac_combo ()));
|
||||
ignore(gui#entry_ac_id#connect#changed ~callback:(fun () -> save_callback gui ac_combo model ()));
|
||||
|
||||
(* Conf *)
|
||||
List.iter (fun (name, subdir, label, button_browse, button_edit, editor, multiple) ->
|
||||
List.iter (fun (name, subdir, label, button_browse, button_edit, editor, remove) ->
|
||||
let callback = fun _ ->
|
||||
let rel_files = Str.split regexp_space label#text in
|
||||
let rel_files = match label with
|
||||
Label l -> Str.split regexp_space l#text
|
||||
| Tree t -> Str.split regexp_space (Gtk_tools.tree_values t)
|
||||
in
|
||||
let abs_files = List.map (Filename.concat Utils.conf_dir) rel_files in
|
||||
let quoted_files = List.map (fun s -> "'"^s^"'") abs_files in
|
||||
let arg = String.concat " " quoted_files in
|
||||
@@ -295,17 +321,35 @@ let ac_combo_handler = fun gui (ac_combo:Gtk_tools.combo) target_combo ->
|
||||
ignore (button_edit#connect#clicked ~callback);
|
||||
let callback = fun _ ->
|
||||
let cb = fun names ->
|
||||
let names = String.concat " " names in
|
||||
label#set_text names;
|
||||
save_callback gui ac_combo ()
|
||||
ignore (match label with
|
||||
Label l ->
|
||||
let names = String.concat " " names in
|
||||
l#set_text names
|
||||
| Tree t ->
|
||||
List.iter (fun n -> Gtk_tools.add_to_tree t n) names
|
||||
);
|
||||
save_callback gui ac_combo model ()
|
||||
in
|
||||
Utils.choose_xml_file ~multiple name subdir cb in
|
||||
ignore (button_browse#connect#clicked ~callback))
|
||||
(ac_files gui);
|
||||
Utils.choose_xml_file name subdir cb in
|
||||
ignore (button_browse#connect#clicked ~callback);
|
||||
ignore (match remove with
|
||||
Some r ->
|
||||
let callback = fun _ ->
|
||||
match label with
|
||||
Tree t ->
|
||||
Gtk_tools.remove_selected_from_tree t;
|
||||
save_callback gui ac_combo model ()
|
||||
| _ -> ()
|
||||
in
|
||||
ignore (r#connect#clicked ~callback)
|
||||
| _ -> ()
|
||||
)
|
||||
)
|
||||
(ac_files gui model);
|
||||
|
||||
|
||||
(* Save button *)
|
||||
ignore(gui#menu_item_save_ac#connect#activate ~callback:(save_callback ~user_save:true gui ac_combo))
|
||||
ignore(gui#menu_item_save_ac#connect#activate ~callback:(save_callback ~user_save:true gui ac_combo model))
|
||||
|
||||
|
||||
let build_handler = fun ~file gui ac_combo (target_combo:Gtk_tools.combo) (log:string->unit) ->
|
||||
|
||||
Reference in New Issue
Block a user