From c2c29ce956e3107e2cd9d46859ceecfe9fbcc764 Mon Sep 17 00:00:00 2001 From: Eric Date: Sun, 21 Nov 2010 01:53:54 +1030 Subject: [PATCH 01/11] cserial.c updated for osx --- sw/lib/ocaml/cserial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sw/lib/ocaml/cserial.c b/sw/lib/ocaml/cserial.c index 7854ce5553..878a3b4b44 100644 --- a/sw/lib/ocaml/cserial.c +++ b/sw/lib/ocaml/cserial.c @@ -70,7 +70,7 @@ value c_init_serial(value device, value speed) cur_termios.c_lflag &= ~(ISIG|ICANON|IEXTEN|ECHO|FLUSHO|PENDIN); cur_termios.c_lflag |= NOFLSH; - if (cfsetispeed(&cur_termios, br)) failwith("setting modem serial device speed"); + if (cfsetspeed(&cur_termios, br)) failwith("setting modem serial device speed"); if (tcsetattr(fd, TCSADRAIN, &cur_termios)) failwith("setting modem serial device attr"); From c7de8dadb42c61f43a5425f2d3a07cc1d6e15e99 Mon Sep 17 00:00:00 2001 From: Paul Cox Date: Sat, 20 Nov 2010 18:59:39 +0100 Subject: [PATCH 02/11] Modifications necessary to compile after beth moved into firmwares dir. --- conf/airframes/Poine/beth.xml | 9 ++++---- conf/settings/settings_beth.xml | 2 +- conf/settings/settings_beth_twist.xml | 26 +++++++++++----------- sw/airborne/firmwares/beth/main_stm32.c | 2 +- sw/airborne/firmwares/beth/overo_gcs_com.c | 3 ++- 5 files changed, 22 insertions(+), 20 deletions(-) diff --git a/conf/airframes/Poine/beth.xml b/conf/airframes/Poine/beth.xml index 4d9585943f..1e1189a110 100644 --- a/conf/airframes/Poine/beth.xml +++ b/conf/airframes/Poine/beth.xml @@ -93,11 +93,12 @@ ARCH=stm32 FLASH_MODE = JTAG SRC_ARCH = $(ARCH) -SRC_BETH=beth +SRC_BETH=firmwares/beth SRC_BOOZ=booz SRC_BOOZ_ARCH=$(SRC_BOOZ)/arch/$(ARCH) SRC_LISA=lisa SRC_LISA_ARCH=$(SRC_LISA)/arch/$(ARCH) +SRC_FIRMWARE=subsystems main_stm32.ARCHDIR = stm32 #main_stm32.LDSCRIPT = $(SRC_ARCH)/stm32f103re_flash.ld @@ -138,11 +139,11 @@ main_stm32.srcs += math/pprz_trig_int.c main_stm32.CFLAGS += -DIMU_TYPE_H=\"imu/imu_crista.h\" -DIMU_OVERRIDE_CHANNELS main_stm32.srcs += $(SRC_FIRMWARE)/imu.c \ $(SRC_FIRMWARE)/imu/imu_crista.c \ - $(SRC_FIRMWARE)/imu/arch/$(ARCH)/imu_crista_arch.c + arch/$(ARCH)/$(SRC_FIRMWARE)/imu/imu_crista_arch.c main_stm32.CFLAGS += -DUSE_DMA1_C4_IRQ main_stm32.srcs += $(SRC_BOOZ)/booz2_commands.c -main_stm32.srcs += $(SRC_BOOZ)/actuators/actuators_asctec.c +main_stm32.srcs += firmwares/rotorcraft/actuators/actuators_asctec.c #\ # $(SRC_BOOZ_ARCH)/actuators/actuators_asctec_arch.c main_stm32.CFLAGS += -DACTUATORS_ASCTEC_DEVICE=i2c1 @@ -317,7 +318,7 @@ overo_sfb.srcs += $(SRC_BETH)/overo_sfb_controller.c # # # -include $(PAPARAZZI_SRC)/conf/autopilot/lisa_test_progs.makefile +include $(PAPARAZZI_SRC)/conf/autopilot/obsolete/lisa_test_progs.makefile diff --git a/conf/settings/settings_beth.xml b/conf/settings/settings_beth.xml index b2cfa56c1a..135a0d60d8 100644 --- a/conf/settings/settings_beth.xml +++ b/conf/settings/settings_beth.xml @@ -4,7 +4,7 @@ - + diff --git a/conf/settings/settings_beth_twist.xml b/conf/settings/settings_beth_twist.xml index 606781002c..c9d13c8588 100644 --- a/conf/settings/settings_beth_twist.xml +++ b/conf/settings/settings_beth_twist.xml @@ -4,37 +4,37 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + @@ -1931,6 +1936,11 @@ + + + + + From 047e34a898e770d3890b346eaa47912c83a29ac4 Mon Sep 17 00:00:00 2001 From: dewagter Date: Sun, 21 Nov 2010 19:53:17 +0100 Subject: [PATCH 08/11] unused --- import.sh | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100755 import.sh diff --git a/import.sh b/import.sh deleted file mode 100755 index 7ddfebbe0a..0000000000 --- a/import.sh +++ /dev/null @@ -1,45 +0,0 @@ -echo "Warning: Did you commit first?" -echo "Updating TUDelft Paparazzi Version" -svn update ./ -rm -vrf ./conf/conf.xml.*-* -echo "Cleaning and Updating ENAC Paparazzi Version" -cd ../paparazzi3/ -svn revert -R ./ -svn status | sed 's/? /rm -rf /' > rm.sh -chmod +x ./rm.sh -./rm.sh -svn update ./ -cd ../ppz2svn/ -echo "Exporting ENAC to TUDelft Paparazzi Version" -svn export ../paparazzi3/ ./ --force -echo "Adding new Files" -svn status | grep '? ' | sed 's/? /svn add/' > add.sh -chmod +x ./add.sh -./add.sh -svn remove ./add.sh --force -svn remove ./tud.txt --force -# rm -f ./add.sh -echo "Removing Deleted Files" -svn export ./ ../paparazzi3/ --force -cd ../paparazzi3/ -svn status | grep 'TUDelft' | sed 's/? /rm -rf /' > rm.sh -chmod +x ./rm.sh -./rm.sh -rm -rf ./import.sh -rm -rf ./export.sh -rm -rf ./sw/airborne/modules/onboardcam -rm -rf ./sw/airborne/modules/opticflow -rm -rf ./sw/airborne/modules/asset_kite_actuator -rm -rf ./sw/airborne/modules/asset_kite_sensors -rm -rf ./sw/airborne/modules/bmp085 -rm -rf ./sw/airborne/boards/tiny_sense.h -rm -rf ./sw/airborne/booz/aerovinci -rm -rf ./conf/simulator/jsbsim/aircraft/LISA_BOOZ_BART.xml -echo "Check this list manually: what files need to be added to ENAC server?" > ./rm.sh -svn status | sed 's/? /svn remove ..\/ppz2svn\//' >> rm.sh -chmod +x ./rm.sh -gedit ./rm.sh -#svn status | sed 's/? /rm -rf /' > ./rm.sh -cd ../ppz2svn -svn diff > tud.txt -gedit tud.txt From 0350e8ad79ccd4bf93fa67f54ea6eae7488c088b Mon Sep 17 00:00:00 2001 From: Antoine Drouin Date: Sun, 21 Nov 2010 23:15:29 +0100 Subject: [PATCH 09/11] updated description and packages list --- README | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/README b/README index 82a77efe6e..4239f4a8a6 100644 --- a/README +++ b/README @@ -1,33 +1,33 @@ # Paparazzi $Id$ -# Copyright (C) 2003-2006 Pascal Brisset Antoine Drouin +# Copyright (C) 2003-2010 The Paparazzi Team # -# This file is part of paparazzi. +# This file is part of Paparazzi. # -# paparazzi is free software; you can redistribute it and/or modify +# 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, +# 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 +# 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. + Intro ----- -Paparazzi is an attempt to develop a cheap fixed wing UAV (Unmanned Air -Vehicle). As of today we have successfully flown autonomously several small -electro powered fixed wing aircraft (Twinstar, Microjet, ...). +Paparazzi is an attempt to develop a free software Unmanned (Air) Vehicle System. + As of today the system is being used successfuly by a number of hobyists, universities and companies all over the world, on vehicle of various size ( 100g to 25Kg ) and of various nature ( fixed wing, rotorcrafts, boats and surface vehicles). Up to date informations are available from the wiki website - paparazzi.enac.fr + http://paparazzi.enac.fr and from the mailing list (http://savannah.nongnu.org/mail/?group=paparazzi) and the IRC channel (freenode, #paparazzi). @@ -62,15 +62,18 @@ For Debian or Ubuntu users, required packages are available at http://paparazzi.enac.fr/debian -Installation of the meta-package "paparazzi-dev" will install -everything needed to compile this project (if something is missing, -please ask) for simulation. "paparazzi-arm7" is required to compile -the code for the ARM based boards. + + - "paparazzi-dev" will provide everything needed to compile and run the ground segment and the simulator. If something is missing, please report it. + - "paparazzi-arm7" is required to compile the code for LPC21 based boards ( tiny, twog, booz, etc). + - "paparazzi-stm32" is needed for building code for STM32 based boards (lisa/L, lisa/M) + - "paparazzi-omap" is needed for building code for the optional Gumstix Overo module available on lisa/L + + - "paparazzi-jsbsim" is needed for using jsbsim as flight dynamic model for the simulator. Compilation and demo simulation ------------------------------- - 1) "make" in the top directory to compile all the libraries and tools. + 1) type "make" in the top directory to compile all the libraries and tools. 2) "./paparazzi" to run the Paparazzi Center From 7bfdeb7f21b57d156f847410a998969807a28944 Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 22 Nov 2010 15:26:53 +1030 Subject: [PATCH 10/11] ivy-ocaml update --- sw/lib/ocaml/ivy/civyloop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sw/lib/ocaml/ivy/civyloop.c b/sw/lib/ocaml/ivy/civyloop.c index 529e5dae1f..d774e9923c 100644 --- a/sw/lib/ocaml/ivy/civyloop.c +++ b/sw/lib/ocaml/ivy/civyloop.c @@ -25,7 +25,7 @@ value ivy_mainLoop(value unit) void timer_cb(TimerId id, void *data, unsigned long delta) { value closure = *(value*)data; - callback(closure, Val_long((int) id)); + callback(closure, Val_long(id)); } value ivy_timerRepeatafter(value nb_ticks,value delay, value closure_name) From b56e2113fa95770f9d4a7153fbf403107421be37 Mon Sep 17 00:00:00 2001 From: Antoine Drouin Date: Mon, 22 Nov 2010 16:00:10 +0100 Subject: [PATCH 11/11] fixed vor --- conf/airframes/vor.xml | 9 ++++----- conf/autopilot/conf_demo.h | 20 ------------------- sw/airborne/boards/olimex_lpc_h2148.h | 2 ++ .../firmwares/vor/lpc_vor_convertions.c | 5 ++++- sw/airborne/firmwares/vor/lpc_vor_main.c | 9 +++++---- 5 files changed, 15 insertions(+), 30 deletions(-) delete mode 100644 conf/autopilot/conf_demo.h diff --git a/conf/airframes/vor.xml b/conf/airframes/vor.xml index 99b625d096..ea7f66b737 100644 --- a/conf/airframes/vor.xml +++ b/conf/airframes/vor.xml @@ -4,13 +4,12 @@ ARCH=lpc21 -VOR=vor FLASH_MODE = IAP main.ARCHDIR = $(ARCH) -main.CFLAGS += -DBOARD_CONFIG=\"conf_demo.h\" -main.srcs = $(VOR)/lpc_vor_main.c +main.CFLAGS += -DBOARD_CONFIG=\"boards/olimex_lpc_h2148.h\" +main.srcs = firmwares/vor/lpc_vor_main.c main.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./29880.)' main.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c @@ -19,7 +18,7 @@ main.CFLAGS += -DLED main.srcs += $(SRC_ARCH)/armVIC.c -main.srcs += $(VOR)/lpc_vor_convertions.c +main.srcs += firmwares/vor/lpc_vor_convertions.c main.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B9600 main.srcs += $(SRC_ARCH)/uart_hw.c @@ -27,7 +26,7 @@ main.srcs += $(SRC_ARCH)/uart_hw.c main.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart0 main.srcs += downlink.c pprz_transport.c -main.srcs += $(VOR)/vor_int_demod_decim.c +main.srcs += firmwares/vor/vor_int_demod_decim.c diff --git a/conf/autopilot/conf_demo.h b/conf/autopilot/conf_demo.h deleted file mode 100644 index 804b8def03..0000000000 --- a/conf/autopilot/conf_demo.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef CONFIG_DEMO_H -#define CONFIG_DEMO_H - -/* Master oscillator freq. */ -#define FOSC (12000000) -/* PLL multiplier */ -#define PLL_MUL (5) -/* CPU clock freq. */ -#define CCLK (FOSC * PLL_MUL) -/* Peripheral bus speed mask 0x00->4, 0x01-> 1, 0x02 -> 2 */ -#define PBSD_BITS 0x00 -#define PBSD_VAL 4 -/* Peripheral bus clock freq. */ -#define PCLK (CCLK / PBSD_VAL) - -#define LED_1_BANK 1 -#define LED_1_PIN 24 - - -#endif /* CONFIG_DEMO_H */ diff --git a/sw/airborne/boards/olimex_lpc_h2148.h b/sw/airborne/boards/olimex_lpc_h2148.h index 1af49983a6..310ac6fe91 100644 --- a/sw/airborne/boards/olimex_lpc_h2148.h +++ b/sw/airborne/boards/olimex_lpc_h2148.h @@ -16,5 +16,7 @@ #define LED_1_BANK 1 #define LED_1_PIN 24 +#define LED_2_BANK 1 +#define LED_2_PIN 23 #endif /* CONFIG_OLIMEX_H2148_H */ diff --git a/sw/airborne/firmwares/vor/lpc_vor_convertions.c b/sw/airborne/firmwares/vor/lpc_vor_convertions.c index d21ad6a419..3359bfef42 100644 --- a/sw/airborne/firmwares/vor/lpc_vor_convertions.c +++ b/sw/airborne/firmwares/vor/lpc_vor_convertions.c @@ -55,7 +55,7 @@ void vor_adc_init( void ) { /* clear match */ T0EMR &= ~TEMR_EM1; /* set high on match 1 */ - T0EMR |= TEMR_EMC11; + T0EMR |= (3<<6);//TEMR_EMC1_1; /* first match in a while */ T0MR1 = 1024; vor_adc_overrun = FALSE; @@ -64,6 +64,9 @@ void vor_adc_init( void ) { void adcISR0 ( void ) { ISR_ENTRY(); + + LED_TOGGLE(2); + uint32_t tmp = AD0GDR; // uint32_t tmp = AD0DR3; // uint8_t channel = (uint8_t)(tmp >> 24) & 0x07; diff --git a/sw/airborne/firmwares/vor/lpc_vor_main.c b/sw/airborne/firmwares/vor/lpc_vor_main.c index 048725c5de..aa136c3c0f 100644 --- a/sw/airborne/firmwares/vor/lpc_vor_main.c +++ b/sw/airborne/firmwares/vor/lpc_vor_main.c @@ -17,23 +17,24 @@ static inline void main_report( void ); int main( void ) { main_init(); + while(1) { if (vor_adc_sample_available) { int16_t off_sample = vor_adc_sample - 512; // off_sample *= 2; - + vor_int_demod_run (off_sample); - + if (vid_qdr_available) { vid_qdr_available = FALSE; main_report(); } - + VorDacSet(vor_adc_sample); vor_adc_sample_available = FALSE; } + } - return 0; }