diff --git a/conf/airframes/AirborneCodeReorg/LisaFw.xml b/conf/airframes/AirborneCodeReorg/LisaFw.xml index c41a7991cf..1be8b75191 100644 --- a/conf/airframes/AirborneCodeReorg/LisaFw.xml +++ b/conf/airframes/AirborneCodeReorg/LisaFw.xml @@ -185,7 +185,7 @@ ap.CFLAGS += -DSTM32 GPS_UART_NR = 1 GPS_BAUD = 38400 -include $(CFG_FIXEDWING)/subsystems/fixedwing_gps_ublox.makefile +include $(CFG_FIXEDWING)/subsystems/fixedwing_gps_ublox_lea4p.makefile MODEM_UART_NR = 2 MODEM_BAUD = 57600 diff --git a/conf/airframes/AirborneCodeReorg/TinyFw.xml b/conf/airframes/AirborneCodeReorg/TinyFw.xml index b2fa5917c4..1228963baf 100644 --- a/conf/airframes/AirborneCodeReorg/TinyFw.xml +++ b/conf/airframes/AirborneCodeReorg/TinyFw.xml @@ -187,7 +187,7 @@ include $(CFG_FIXEDWING)/subsystems/fixedwing_radio_control_ppm.makefile GPS_UART_NR = 0 GPS_BAUD = 38400 -include $(CFG_FIXEDWING)/subsystems/fixedwing_gps_ublox.makefile +include $(CFG_FIXEDWING)/subsystems/fixedwing_gps_ublox_lea4p.makefile MODEM_UART_NR = 1 MODEM_BAUD = 9600 diff --git a/conf/autopilot/fixedwing_autopilot.makefile b/conf/autopilot/fixedwing_autopilot.makefile index 873cf52376..a08136c6a5 100644 --- a/conf/autopilot/fixedwing_autopilot.makefile +++ b/conf/autopilot/fixedwing_autopilot.makefile @@ -1,6 +1,6 @@ # # $Id: booz2_autopilot.makefile 4827 2010-04-21 08:02:18Z poine $ -# +# # Copyright (C) 2008 Antoine Drouin # # This file is part of paparazzi. @@ -18,7 +18,7 @@ # 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. +# Boston, MA 02111-1307, USA. # # @@ -33,7 +33,7 @@ ap.CFLAGS += $(FIXEDWING_INC) ap.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) ap.srcs = $(SRC_FIXEDWING)/main.c -ifeq ($(ARCHI), stm32) +ifeq ($(ARCHI), stm32) ap.srcs += lisa/plug_sys.c endif @@ -42,7 +42,7 @@ endif # ifeq ($(ARCHI), arm7) ap.srcs += $(SRC_ARCH)/armVIC.c -else ifeq ($(ARCHI), stm32) +else ifeq ($(ARCHI), stm32) ap.srcs += $(SRC_ARCH)/stm32_exceptions.c ap.srcs += $(SRC_ARCH)/stm32_vector_table.c endif @@ -51,7 +51,7 @@ endif # LEDs # ap.CFLAGS += -DUSE_LED -DLED -DTIME_LED=1 -ifeq ($(ARCHI), stm32) +ifeq ($(ARCHI), stm32) ap.srcs += $(SRC_ARCH)/led_hw.c endif @@ -62,7 +62,7 @@ ap.CFLAGS += -DUSE_SYS_TIME ap.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c #ap.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)' ap.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./60.))' -ifeq ($(ARCHI), stm32) +ifeq ($(ARCHI), stm32) ap.CFLAGS += -DSYS_TIME_LED=1 -DPERIPHERALS_AUTO_INIT endif @@ -79,16 +79,13 @@ ap.srcs += $(SRC_FIXEDWING)/main_fbw.c ap.CFLAGS += -DAP ap.srcs += $(SRC_FIXEDWING)/main_ap.c ap.srcs += $(SRC_FIXEDWING)/estimator.c -ap.CFLAGS += -DNAV -ap.srcs += $(SRC_FIXEDWING)/nav.c $(SRC_FIXEDWING)/fw_h_ctl.c $(SRC_FIXEDWING)/fw_v_ctl.c -ap.srcs += $(SRC_FIXEDWING)/nav_survey_rectangle.c $(SRC_FIXEDWING)/nav_line.c # # InterMCU & Commands # ap.CFLAGS += -DINTER_MCU -ap.srcs += $(SRC_FIXEDWING)/inter_mcu.c +ap.srcs += $(SRC_FIXEDWING)/inter_mcu.c ap.srcs += $(SRC_FIXEDWING)/commands.c # @@ -100,15 +97,17 @@ ap.srcs += $(SRC_ARCH)/uart_hw.c ifeq ($(ARCHI), arm7) ap.CFLAGS += -DADC ap.srcs += $(SRC_ARCH)/adc_hw.c -else ifeq ($(ARCHI), stm32) +else ifeq ($(ARCHI), stm32) ap.srcs += lisa/lisa_analog_plug.c endif # # GPS choice -# -# include booz2_gps.makefile +# +# include fixedwing_gps_ublox_lea5h.makefile +# or +# include fixedwing_gps_ublox_lea4p.makefile # or # nothing # @@ -117,27 +116,7 @@ endif # # AHRS choice # -# include booz2_ahrs_cmpl.makefile +# include fixedwing_attitude_infrared.makefile # or -# include booz2_ahrs_lkf.makefile -# - - -# -# INS choice -# -# include booz2_ins_hff.makefile -# or -# nothing -# - - -# -# FMS choice -# -# include booz2_fms_test_signal.makefile -# or -# include booz2_fms_datalink.makefile -# or -# nothing +# not done yet # diff --git a/conf/autopilot/subsystems/fixedwing_attitude_infrared.makefile b/conf/autopilot/subsystems/fixedwing_attitude_infrared.makefile index ad5d272931..81bfaf19dc 100644 --- a/conf/autopilot/subsystems/fixedwing_attitude_infrared.makefile +++ b/conf/autopilot/subsystems/fixedwing_attitude_infrared.makefile @@ -1,5 +1,7 @@ +# attitude via IR sensors and standard assignment for tiny and twog + +ap.CFLAGS += -DUSE_$(ADC_CHANNEL_IR1) -DUSE_$(ADC_CHANNEL_IR2) -DUSE_$(ADC_CHANNEL_IR_TOP) ap.CFLAGS += -DINFRARED -ap.srcs += $(SRC_FIXEDWING)/infrared.c - +ap.srcs += $(SRC_FIXEDWING)/infrared.c diff --git a/conf/autopilot/subsystems/fixedwing_gps_ublox.makefile b/conf/autopilot/subsystems/fixedwing_gps_ublox_lea4p.makefile similarity index 84% rename from conf/autopilot/subsystems/fixedwing_gps_ublox.makefile rename to conf/autopilot/subsystems/fixedwing_gps_ublox_lea4p.makefile index 1db0f77190..1d3c3d22ed 100644 --- a/conf/autopilot/subsystems/fixedwing_gps_ublox.makefile +++ b/conf/autopilot/subsystems/fixedwing_gps_ublox_lea4p.makefile @@ -1,10 +1,9 @@ +# UBlox LEA 4P - -ap.CFLAGS += -DGPS -DUBX +ap.CFLAGS += -DGPS -DUBX ap.CFLAGS += -DGPS_LINK=Uart$(GPS_UART_NR) ap.CFLAGS += -DUSE_UART$(GPS_UART_NR) ap.CFLAGS += -DUART$(GPS_UART_NR)_BAUD=B$(GPS_BAUD) ap.srcs += $(SRC_FIXEDWING)/gps_ubx.c $(SRC_FIXEDWING)/gps.c $(SRC_FIXEDWING)/latlong.c - diff --git a/conf/autopilot/subsystems/fixedwing_gps_ublox_lea5h.makefile b/conf/autopilot/subsystems/fixedwing_gps_ublox_lea5h.makefile new file mode 100644 index 0000000000..218d1ce9eb --- /dev/null +++ b/conf/autopilot/subsystems/fixedwing_gps_ublox_lea5h.makefile @@ -0,0 +1,9 @@ +# UBlox LEA 5H + + +ap.CFLAGS += -DGPS -DUBX -DGPS_USE_LATLONG +ap.CFLAGS += -DGPS_LINK=Uart$(GPS_UART_NR) +ap.CFLAGS += -DUSE_UART$(GPS_UART_NR) +ap.CFLAGS += -DUART$(GPS_UART_NR)_BAUD=B$(GPS_BAUD) + +ap.srcs += $(SRC_FIXEDWING)/gps_ubx.c $(SRC_FIXEDWING)/gps.c $(SRC_FIXEDWING)/latlong.c diff --git a/conf/autopilot/subsystems/fixedwing_gyro.makefile b/conf/autopilot/subsystems/fixedwing_gyro.makefile new file mode 100644 index 0000000000..7e72a843a0 --- /dev/null +++ b/conf/autopilot/subsystems/fixedwing_gyro.makefile @@ -0,0 +1,5 @@ +# Standard setup for roll stabilization with gyro on a tiny or twog + +ap.CFLAGS += -DUSE_$(ADC_CHANNEL_GYRO_ROLL) +ap.CFLAGS += -DGYRO -DADXRS150 +ap.srcs += $(SRC_FIXEDWING)/gyro.c diff --git a/conf/autopilot/subsystems/fixedwing_navigation.makefile b/conf/autopilot/subsystems/fixedwing_navigation.makefile new file mode 100644 index 0000000000..5cb3ed3f10 --- /dev/null +++ b/conf/autopilot/subsystems/fixedwing_navigation.makefile @@ -0,0 +1,7 @@ +# Standard fixed wing navigation + +ap.CFLAGS += -DNAV +ap.srcs += $(SRC_FIXEDWING)/nav.c $(SRC_FIXEDWING)/fw_h_ctl.c $(SRC_FIXEDWING)/fw_v_ctl.c +ap.srcs += $(SRC_FIXEDWING)/nav_survey_rectangle.c $(SRC_FIXEDWING)/nav_line.c + +sim.srcs += $(SRC_FIXEDWING)/nav_survey_rectangle.c $(SRC_FIXEDWING)/nav_line.c diff --git a/conf/autopilot/subsystems/fixedwing_radio_control_ppm.makefile b/conf/autopilot/subsystems/fixedwing_radio_control_ppm.makefile index f2cbe8c15d..04f52ece8b 100644 --- a/conf/autopilot/subsystems/fixedwing_radio_control_ppm.makefile +++ b/conf/autopilot/subsystems/fixedwing_radio_control_ppm.makefile @@ -1,5 +1,5 @@ ap.CFLAGS += -DRADIO_CONTROL -ap.srcs += $(SRC_FIXEDWING)/radio_control.c $(SRC_ARCH)/ppm_hw.c +ap.srcs += $(SRC_FIXEDWING)/radio_control.c $(SRC_ARCH)/ppm_hw.c diff --git a/conf/autopilot/subsystems/fixedwing_telemetry_transparent.makefile b/conf/autopilot/subsystems/fixedwing_telemetry_transparent.makefile index 902fdd779d..785ea77802 100644 --- a/conf/autopilot/subsystems/fixedwing_telemetry_transparent.makefile +++ b/conf/autopilot/subsystems/fixedwing_telemetry_transparent.makefile @@ -1,6 +1,6 @@ -ap.CFLAGS += -DUSE_UART$(MODEM_UART_NR) +ap.CFLAGS += -DUSE_UART$(MODEM_UART_NR) ap.CFLAGS += -DUART$(MODEM_UART_NR)_BAUD=B$(MODEM_BAUD) MODEM_UART = Uart$(MODEM_UART_NR) diff --git a/conf/autopilot/subsystems/fixedwing_telemetry_xbee24.makefile b/conf/autopilot/subsystems/fixedwing_telemetry_xbee24.makefile deleted file mode 100644 index 4d563abb33..0000000000 --- a/conf/autopilot/subsystems/fixedwing_telemetry_xbee24.makefile +++ /dev/null @@ -1,5 +0,0 @@ - -ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600 -ap.srcs += $(SRC_FIXEDWING)/downlink.c $(SRC_FIXEDWING)/datalink.c $(SRC_FIXEDWING)/pprz_transport.c - - diff --git a/conf/autopilot/subsystems/fixedwing_telemetry_xbee_api.makefile b/conf/autopilot/subsystems/fixedwing_telemetry_xbee_api.makefile new file mode 100644 index 0000000000..1db2b728ed --- /dev/null +++ b/conf/autopilot/subsystems/fixedwing_telemetry_xbee_api.makefile @@ -0,0 +1,10 @@ +# XBee modems in API mode + +ap.CFLAGS += -DUSE_UART$(MODEM_UART_NR) +ap.CFLAGS += -DUART$(MODEM_UART_NR)_BAUD=B$(MODEM_BAUD) + +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=XBeeTransport -DDATALINK=XBEE +ap.srcs += $(SRC_FIXEDWING)/downlink.c $(SRC_FIXEDWING)/datalink.c $(SRC_FIXEDWING)/xbee.c diff --git a/conf/autopilot/tiny.makefile b/conf/autopilot/tiny.makefile index 3c9aae48aa..e4eceb3595 100644 --- a/conf/autopilot/tiny.makefile +++ b/conf/autopilot/tiny.makefile @@ -15,6 +15,13 @@ fbw.TARGETDIR = autopilot LPC21ISP_BAUD = 38400 LPC21ISP_XTAL = 12000 + +# default settings for tiny and twog +GPS_UART_NR = 0 +GPS_BAUD = 38400 +MODEM_UART_NR = 1 +MODEM_BAUD = 57600 + # a test program to setup actuators setup_actuators.ARCHDIR = $(ARCHI) setup_actuators.ARCH = arm7tdmi