diff --git a/conf/airframes/demo_module.xml b/conf/airframes/demo_module.xml index e5d7de2015..9eb12183df 100644 --- a/conf/airframes/demo_module.xml +++ b/conf/airframes/demo_module.xml @@ -165,7 +165,7 @@ include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile FLASH_MODE=IAP ap.CFLAGS += -DFBW -DAP -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1 -ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c +ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c $(SRC_FIRMWARE)/main_fbw.c $(SRC_FIRMWARE)/main_ap.c $(SRC_FIRMWARE)/main.c ap.CFLAGS += -DINTER_MCU ap.srcs += inter_mcu.c diff --git a/conf/autopilot/sitl.makefile b/conf/autopilot/sitl.makefile index 3ec10c07a1..d300a0a77a 100644 --- a/conf/autopilot/sitl.makefile +++ b/conf/autopilot/sitl.makefile @@ -1,6 +1,6 @@ sim.ARCHDIR = $(ARCH) sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DINFRARED -DNAV -DLED -DWIND_INFO -sim.srcs += latlong.c radio_control.c downlink.c commands.c gps.c inter_mcu.c infrared.c fw_h_ctl.c fw_v_ctl.c nav.c estimator.c sys_time.c main_fbw.c main_ap.c datalink.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c $(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/sim_adc_generic.c $(SRC_ARCH)/led_hw.c +sim.srcs += latlong.c radio_control.c downlink.c commands.c gps.c inter_mcu.c infrared.c fw_h_ctl.c fw_v_ctl.c nav.c estimator.c sys_time.c $(SRC_FIRMWARE)/main_fbw.c $(SRC_FIRMWARE)/main_ap.c datalink.c $(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c $(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/sim_adc_generic.c $(SRC_ARCH)/led_hw.c diff --git a/conf/autopilot/sitl_jsbsim.makefile b/conf/autopilot/sitl_jsbsim.makefile index 4f485deda1..2147a2e6d1 100644 --- a/conf/autopilot/sitl_jsbsim.makefile +++ b/conf/autopilot/sitl_jsbsim.makefile @@ -26,7 +26,7 @@ endif jsbsim.CFLAGS += -DSITL -DAP -DFBW -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=IvyTransport -DINFRARED -DNAV -DLED -DWIND_INFO -Ifirmwares/fixedwing jsbsim.srcs = $(SRC_ARCH)/jsbsim_hw.c $(SRC_ARCH)/jsbsim_gps.c $(SRC_ARCH)/jsbsim_ir.c $(SRC_ARCH)/jsbsim_transport.c $(SRC_ARCH)/ivy_transport.c -jsbsim.srcs += latlong.c downlink.c commands.c gps.c inter_mcu.c infrared.c fw_h_ctl.c fw_v_ctl.c nav.c estimator.c sys_time.c main_fbw.c main_ap.c datalink.c +jsbsim.srcs += latlong.c downlink.c commands.c gps.c inter_mcu.c infrared.c fw_h_ctl.c fw_v_ctl.c nav.c estimator.c sys_time.c $(SRC_FIRMWARE)/main_fbw.c $(SRC_FIRMWARE)/main_ap.c datalink.c jsbsim.srcs += $(SIMDIR)/sim_ac_jsbsim.c # Choose in your airframe file type of airframe # jsbsim.srcs += $(SIMDIR)/sim_ac_fw.c diff --git a/conf/autopilot/sitl_link_pprz.makefile b/conf/autopilot/sitl_link_pprz.makefile index 11e7353827..0e6216771e 100644 --- a/conf/autopilot/sitl_link_pprz.makefile +++ b/conf/autopilot/sitl_link_pprz.makefile @@ -1,3 +1,3 @@ sim.ARCHDIR = $(ARCH) sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DINFRARED -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 infrared.c fw_h_ctl.c fw_v_ctl.c nav.c estimator.c cam.c sys_time.c main_fbw.c 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 infrared.c fw_h_ctl.c fw_v_ctl.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 diff --git a/conf/autopilot/sitl_link_xbee.makefile b/conf/autopilot/sitl_link_xbee.makefile index b1723aa41c..c0bb033e22 100644 --- a/conf/autopilot/sitl_link_xbee.makefile +++ b/conf/autopilot/sitl_link_xbee.makefile @@ -1,3 +1,3 @@ sim.ARCHDIR = $(ARCH) sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK -DDOWNLINK_TRANSPORT=XBeeTransport -DINFRARED -DRADIO_CONTROL_SETTINGS -DSIM_UART -DSIM_XBEE -DXBEE_UART=SimUart -sim.srcs = radio_control.c downlink.c xbee.c commands.c gps.c inter_mcu.c infrared.c fw_h_ctl.c fw_v_ctl.c nav.c estimator.c cam.c sys_time.c main_fbw.c 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 +sim.srcs = radio_control.c downlink.c xbee.c commands.c gps.c inter_mcu.c infrared.c fw_h_ctl.c fw_v_ctl.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 diff --git a/conf/autopilot/subsystems/fixedwing/autopilot.makefile b/conf/autopilot/subsystems/fixedwing/autopilot.makefile index 20d3f9d480..167aa2d3a5 100644 --- a/conf/autopilot/subsystems/fixedwing/autopilot.makefile +++ b/conf/autopilot/subsystems/fixedwing/autopilot.makefile @@ -95,7 +95,7 @@ endif # Main # -ns_srcs += $(SRC_FIXEDWING)/main.c +ns_srcs += $(SRC_FIRMWARE)/main.c # # LEDs @@ -141,7 +141,7 @@ endif ## fbw_CFLAGS += -DFBW -fbw_srcs += $(SRC_FIXEDWING)/main_fbw.c +fbw_srcs += $(SRC_FIRMWARE)/main_fbw.c fbw_srcs += $(SRC_FIXEDWING)/commands.c ###################################################################### @@ -150,7 +150,7 @@ fbw_srcs += $(SRC_FIXEDWING)/commands.c ## ap_CFLAGS += -DAP -ap_srcs += $(SRC_FIXEDWING)/main_ap.c +ap_srcs += $(SRC_FIRMWARE)/main_ap.c ap_srcs += $(SRC_FIXEDWING)/estimator.c diff --git a/conf/autopilot/twin_mcu.makefile b/conf/autopilot/twin_mcu.makefile index 464fa13a94..3fb0f7d7d7 100644 --- a/conf/autopilot/twin_mcu.makefile +++ b/conf/autopilot/twin_mcu.makefile @@ -1,6 +1,6 @@ -ap.srcs += main_ap.c sys_time.c main.c inter_mcu.c link_mcu.c gps_ubx.c gps.c infrared.c fw_h_ctl.c fw_v_ctl.c nav.c estimator.c cam.c spi.c rc_settings.c latlong.c nav_survey_rectangle.c +ap.srcs += $(SRC_FIRMWARE)/main_ap.c sys_time.c $(SRC_FIRMWARE)/main.c inter_mcu.c link_mcu.c gps_ubx.c gps.c infrared.c fw_h_ctl.c fw_v_ctl.c nav.c estimator.c cam.c spi.c rc_settings.c latlong.c nav_survey_rectangle.c ap.CFLAGS += -DMCU_SPI_LINK -DGPS -DUBX -DINFRARED -DRADIO_CONTROL -DINTER_MCU -DSPI_MASTER -DUSE_SPI -DNAV -DRADIO_CONTROL_SETTINGS -fbw.srcs += sys_time.c main_fbw.c main.c commands.c radio_control.c pprz_transport.c downlink.c inter_mcu.c spi.c link_mcu.c +fbw.srcs += sys_time.c $(SRC_FIRMWARE)/main_fbw.c $(SRC_FIRMWARE)/main.c commands.c radio_control.c pprz_transport.c downlink.c inter_mcu.c spi.c link_mcu.c fbw.CFLAGS += -DRADIO_CONTROL -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart0 -DINTER_MCU -DMCU_SPI_LINK -DUART0_BAUD=B38400 -DSPI_SLAVE -DUSE_SPI diff --git a/sw/airborne/arch/sim/jsbsim_hw.h b/sw/airborne/arch/sim/jsbsim_hw.h index 87eef9b170..a5ffff13f0 100644 --- a/sw/airborne/arch/sim/jsbsim_hw.h +++ b/sw/airborne/arch/sim/jsbsim_hw.h @@ -42,7 +42,7 @@ #include "fw_v_ctl.h" #include "infrared.h" #include "commands.h" -#include "main_ap.h" +#include "firmwares/fixedwing/main_ap.h" #include "ap_downlink.h" #include "sim_uart.h" #include "latlong.h" diff --git a/sw/airborne/arch/sim/sim_ap.c b/sw/airborne/arch/sim/sim_ap.c index 2ec229bcac..3c5a51d4ba 100644 --- a/sw/airborne/arch/sim/sim_ap.c +++ b/sw/airborne/arch/sim/sim_ap.c @@ -20,7 +20,7 @@ #include "fw_v_ctl.h" #include "infrared.h" #include "commands.h" -#include "main_ap.h" +#include "firmwares/fixedwing/main_ap.h" #include "ap_downlink.h" #include "sim_uart.h" #include "latlong.h" diff --git a/sw/airborne/arch/sim/sim_jsbsim.c b/sw/airborne/arch/sim/sim_jsbsim.c index 3fccb0bda5..368c23f527 100644 --- a/sw/airborne/arch/sim/sim_jsbsim.c +++ b/sw/airborne/arch/sim/sim_jsbsim.c @@ -20,7 +20,7 @@ #include "fw_v_ctl.h" #include "infrared.h" #include "commands.h" -#include "main_ap.h" +#include "firmwares/fixedwing/main_ap.h" #include "ap_downlink.h" #include "sim_uart.h" #include "latlong.h" diff --git a/sw/airborne/fbw_downlink.h b/sw/airborne/fbw_downlink.h index 03d517e785..49ab1ff416 100644 --- a/sw/airborne/fbw_downlink.h +++ b/sw/airborne/fbw_downlink.h @@ -43,7 +43,7 @@ #include "actuators.h" #include "uart.h" -#include "main_fbw.h" +#include "firmwares/fixedwing/main_fbw.h" #include "subsystems/radio_control.h" #include "inter_mcu.h" diff --git a/sw/airborne/main.c b/sw/airborne/firmwares/fixedwing/main.c similarity index 92% rename from sw/airborne/main.c rename to sw/airborne/firmwares/fixedwing/main.c index c600219d96..2b9413895f 100644 --- a/sw/airborne/main.c +++ b/sw/airborne/firmwares/fixedwing/main.c @@ -1,6 +1,6 @@ /* * Paparazzi $Id$ - * + * * Copyright (C) 2005 Pascal Brisset, 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. * */ /** \file main.c @@ -28,14 +28,14 @@ #include "sys_time.h" #ifdef FBW -#include "main_fbw.h" +#include "firmwares/fixedwing/main_fbw.h" #define Fbw(f) f ## _fbw() #else #define Fbw(f) #endif #ifdef AP -#include "main_ap.h" +#include "firmwares/fixedwing/main_ap.h" #define Ap(f) f ## _ap() #else #define Ap(f) diff --git a/sw/airborne/main_ap.c b/sw/airborne/firmwares/fixedwing/main_ap.c similarity index 99% rename from sw/airborne/main_ap.c rename to sw/airborne/firmwares/fixedwing/main_ap.c index 35a5d56bf0..adb047d6da 100644 --- a/sw/airborne/main_ap.c +++ b/sw/airborne/firmwares/fixedwing/main_ap.c @@ -33,7 +33,7 @@ #include -#include "main_ap.h" +#include "firmwares/fixedwing/main_ap.h" #include "interrupt_hw.h" #include "init_hw.h" diff --git a/sw/airborne/main_ap.h b/sw/airborne/firmwares/fixedwing/main_ap.h similarity index 100% rename from sw/airborne/main_ap.h rename to sw/airborne/firmwares/fixedwing/main_ap.h diff --git a/sw/airborne/main_fbw.c b/sw/airborne/firmwares/fixedwing/main_fbw.c similarity index 98% rename from sw/airborne/main_fbw.c rename to sw/airborne/firmwares/fixedwing/main_fbw.c index f5e4c7cdb7..0e9c789b45 100644 --- a/sw/airborne/main_fbw.c +++ b/sw/airborne/firmwares/fixedwing/main_fbw.c @@ -1,6 +1,6 @@ /* * Paparazzi $Id$ - * + * * Copyright (C) 2003-2006 Pascal Brisset, Antoine Drouin * * This file is part of paparazzi. @@ -18,20 +18,20 @@ * 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. * */ /** \file main_fbw.c * \brief FBW ( FlyByWire ) process * - * This process is responsible for decoding radio control, generating actuators - * signals either from the radio control or from the commands provided by the + * This process is responsible for decoding radio control, generating actuators + * signals either from the radio control or from the commands provided by the * AP (autopilot) process. It also performs a telemetry task and a low level monitoring * ( for parameters like the supply ) */ -#include "main_fbw.h" +#include "firmwares/fixedwing/main_fbw.h" #include "airframe.h" #include "init_hw.h" diff --git a/sw/airborne/main_fbw.h b/sw/airborne/firmwares/fixedwing/main_fbw.h similarity index 97% rename from sw/airborne/main_fbw.h rename to sw/airborne/firmwares/fixedwing/main_fbw.h index a4be674b32..d21aa0e451 100644 --- a/sw/airborne/main_fbw.h +++ b/sw/airborne/firmwares/fixedwing/main_fbw.h @@ -1,6 +1,6 @@ /* * Paparazzi $Id$ - * + * * Copyright (C) 2005 Pascal Brisset, 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. * */ diff --git a/sw/airborne/inter_mcu.h b/sw/airborne/inter_mcu.h index aadfdb7ddd..e00aeb9f5f 100644 --- a/sw/airborne/inter_mcu.h +++ b/sw/airborne/inter_mcu.h @@ -42,7 +42,7 @@ #include "paparazzi.h" #include "airframe.h" #include "subsystems/radio_control.h" -#include "main_fbw.h" +#include "firmwares/fixedwing/main_fbw.h" #ifndef SINGLE_MCU #include "radio.h" diff --git a/sw/airborne/modules/MPPT/MPPT.c b/sw/airborne/modules/MPPT/MPPT.c index 8b796cd692..389f997e9f 100644 --- a/sw/airborne/modules/MPPT/MPPT.c +++ b/sw/airborne/modules/MPPT/MPPT.c @@ -25,7 +25,7 @@ #include #include "MPPT.h" -#include "main_fbw.h" +#include "firmwares/fixedwing/main_fbw.h" #include "i2c.h" diff --git a/sw/airborne/modules/ins/ins_arduimu.c b/sw/airborne/modules/ins/ins_arduimu.c index c4138c9a58..68db855b0d 100644 --- a/sw/airborne/modules/ins/ins_arduimu.c +++ b/sw/airborne/modules/ins/ins_arduimu.c @@ -7,7 +7,7 @@ Autoren@ZHAW: schmiemi #include #include "ins_arduimu.h" -#include "main_fbw.h" +#include "firmwares/fixedwing/main_fbw.h" #include "i2c.h" // test diff --git a/sw/airborne/setup_actuators.c b/sw/airborne/setup_actuators.c index 1a5d6fdfd6..df13d47f90 100644 --- a/sw/airborne/setup_actuators.c +++ b/sw/airborne/setup_actuators.c @@ -10,7 +10,7 @@ #include "datalink.h" #include "uart.h" #include "pprz_transport.h" -#include "main_fbw.h" +#include "firmwares/fixedwing/main_fbw.h" #include "downlink.h" #include "settings.h" diff --git a/sw/simulator/sim_ac_booz.c b/sw/simulator/sim_ac_booz.c index a38b677eb7..a92cd74eba 100644 --- a/sw/simulator/sim_ac_booz.c +++ b/sw/simulator/sim_ac_booz.c @@ -24,8 +24,8 @@ #include #include "sim_ac_jsbsim.h" -#include "main_ap.h" -#include "main_fbw.h" +#include "firmwares/fixedwing/main_ap.h" +#include "firmwares/fixedwing/main_fbw.h" using namespace JSBSim; diff --git a/sw/simulator/sim_ac_fw.c b/sw/simulator/sim_ac_fw.c index 0f1de1a5d3..23d75a1b60 100644 --- a/sw/simulator/sim_ac_fw.c +++ b/sw/simulator/sim_ac_fw.c @@ -24,8 +24,8 @@ #include #include "sim_ac_jsbsim.h" -#include "main_ap.h" -#include "main_fbw.h" +#include "firmwares/fixedwing/main_ap.h" +#include "firmwares/fixedwing/main_fbw.h" #include "jsbsim_hw.h" #include