[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paparazzi-commits] [4336] fixed a couple of test programs
From: |
antoine drouin |
Subject: |
[paparazzi-commits] [4336] fixed a couple of test programs |
Date: |
Sat, 14 Nov 2009 17:46:11 +0000 |
Revision: 4336
http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=4336
Author: poine
Date: 2009-11-14 17:46:10 +0000 (Sat, 14 Nov 2009)
Log Message:
-----------
fixed a couple of test programs
Modified Paths:
--------------
paparazzi3/trunk/conf/autopilot/booz2_test_progs.makefile
paparazzi3/trunk/sw/airborne/booz/test/booz2_test_max1168.c
paparazzi3/trunk/sw/airborne/booz/test/booz2_test_modem.c
Added Paths:
-----------
paparazzi3/trunk/sw/airborne/booz/test/booz2_test_downlink.c
Modified: paparazzi3/trunk/conf/autopilot/booz2_test_progs.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/booz2_test_progs.makefile 2009-11-13
22:23:25 UTC (rev 4335)
+++ paparazzi3/trunk/conf/autopilot/booz2_test_progs.makefile 2009-11-14
17:46:10 UTC (rev 4336)
@@ -22,7 +22,29 @@
#
#
+#
+# test downlink
+#
+test_downlink.ARCHDIR = $(ARCHI)
+test_downlink.ARCH = arm7tdmi
+test_downlink.TARGET = test_downlink
+test_downlink.TARGETDIR = test_downlink
+test_downlink.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) $(BOOZ_CFLAGS)
+test_downlink.CFLAGS += -DPERIPHERALS_AUTO_INIT
+test_downlink.srcs += $(SRC_BOOZ_TEST)/booz2_test_downlink.c
+test_downlink.CFLAGS += -DUSE_LED
+test_downlink.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./10.))'
-DTIME_LED=1
+test_downlink.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
$(SRC_ARCH)/armVIC.c
+
+test_downlink.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
+test_downlink.srcs += $(SRC_ARCH)/uart_hw.c
+
+test_downlink.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport
-DDOWNLINK_DEVICE=Uart1
+test_downlink.srcs += downlink.c pprz_transport.c
+
+
+
#
# tunnel hw
#
@@ -38,10 +60,7 @@
tunnel.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
tunnel.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B38400
-#tunnel.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
tunnel.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-#tunnel.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B19200
-#tunnel.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B9600
tunnel.srcs += $(SRC_ARCH)/uart_hw.c
@@ -219,23 +238,24 @@
test_max1168.TARGETDIR = test_max1168
test_max1168.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -I$(SRC_BOOZ)
-I$(SRC_BOOZ_ARCH)
-test_max1168.srcs += $(SRC_BOOZ_TEST)/booz2_test_max1168.c
+test_max1168.CFLAGS += -DPERIPHERALS_AUTO_INIT
+test_max1168.srcs += $(SRC_BOOZ_TEST)/booz2_test_max1168.c
+test_max1168.CFLAGS += -DUSE_LED
test_max1168.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
-DTIME_LED=1
-test_max1168.CFLAGS += -DLED
-test_max1168.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
+test_max1168.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
$(SRC_ARCH)/armVIC.c
test_max1168.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-test_max1168.srcs += $(SRC_ARCH)/uart_hw.c
+test_max1168.srcs += $(SRC_ARCH)/uart_hw.c
test_max1168.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport
-DDOWNLINK_DEVICE=Uart1
-test_max1168.srcs += downlink.c pprz_transport.c
+test_max1168.srcs += downlink.c pprz_transport.c
test_max1168.CFLAGS += -DMAX1168_EOC_VIC_SLOT=8 -DSSP_VIC_SLOT=9
-test_max1168.srcs += $(SRC_BOOZ)/booz2_max1168.c
$(SRC_BOOZ_ARCH)/booz2_max1168_hw.c
+test_max1168.srcs += $(SRC_BOOZ)/peripherals/booz_max1168.c \
+ $(SRC_BOOZ_ARCH)/peripherals/booz_max1168_arch.c
-
#
# test MICROMAG
#
Added: paparazzi3/trunk/sw/airborne/booz/test/booz2_test_downlink.c
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/test/booz2_test_downlink.c
(rev 0)
+++ paparazzi3/trunk/sw/airborne/booz/test/booz2_test_downlink.c
2009-11-14 17:46:10 UTC (rev 4336)
@@ -0,0 +1,61 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
+ *
+ * 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.
+ */
+
+#include <inttypes.h>
+
+#include "init_hw.h"
+#include "sys_time.h"
+#include "interrupt_hw.h"
+
+#include "messages.h"
+#include "downlink.h"
+
+static inline void main_init( void );
+static inline void main_periodic_task( void );
+static inline void main_event_task( void );
+
+int main( void ) {
+ main_init();
+ while(1) {
+ if (sys_time_periodic())
+ main_periodic_task();
+ main_event_task();
+ }
+ return 0;
+}
+
+static inline void main_init( void ) {
+ hw_init();
+ sys_time_init();
+ int_enable();
+}
+
+static inline void main_periodic_task( void ) {
+ LED_TOGGLE(2);
+ DOWNLINK_SEND_TIME(DefaultChannel, &cpu_time_sec);
+}
+
+static inline void main_event_task( void ) {
+
+}
+
Property changes on:
paparazzi3/trunk/sw/airborne/booz/test/booz2_test_downlink.c
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: paparazzi3/trunk/sw/airborne/booz/test/booz2_test_max1168.c
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/test/booz2_test_max1168.c 2009-11-13
22:23:25 UTC (rev 4335)
+++ paparazzi3/trunk/sw/airborne/booz/test/booz2_test_max1168.c 2009-11-14
17:46:10 UTC (rev 4336)
@@ -26,15 +26,13 @@
#include "std.h"
#include "init_hw.h"
#include "sys_time.h"
-#include "led.h"
-#include "uart.h"
+#include "interrupt_hw.h"
#include "messages.h"
#include "downlink.h"
-#include "interrupt_hw.h"
#include "armVIC.h"
#include "LPC21xx.h"
-#include "booz2_max1168.h"
+#include "peripherals/booz_max1168.h"
static inline void main_init( void );
static inline void main_periodic_task( void );
@@ -60,28 +58,25 @@
static inline void main_init( void ) {
hw_init();
sys_time_init();
- led_init();
- uart1_init_tx();
-
main_init_ssp();
- booz2_max1168_init();
+ booz_max1168_init();
int_enable();
}
static inline void main_periodic_task( void ) {
LED_TOGGLE(3);
- booz2_max1168_read();
+ booz_max1168_read();
}
static inline void main_event_task( void ) {
- if (booz2_max1168_status == STA_MAX1168_DATA_AVAILABLE) {
+ if (booz_max1168_status == STA_MAX1168_DATA_AVAILABLE) {
RunOnceEvery(10, {
- DOWNLINK_SEND_IMU_GYRO_RAW(&booz2_max1168_values[0],
&booz2_max1168_values[1], &booz2_max1168_values[2]);
- DOWNLINK_SEND_IMU_ACCEL_RAW(&booz2_max1168_values[3],
&booz2_max1168_values[4], &booz2_max1168_values[6]);
- DOWNLINK_SEND_BOOT(&booz2_max1168_values[7]); });
- booz2_max1168_status = STA_MAX1168_IDLE;
+ DOWNLINK_SEND_IMU_GYRO_RAW(DefaultChannel, &booz_max1168_values[0],
&booz_max1168_values[1], &booz_max1168_values[2]);
+ DOWNLINK_SEND_IMU_ACCEL_RAW(DefaultChannel, &booz_max1168_values[3],
&booz_max1168_values[4], &booz_max1168_values[6]);
+ DOWNLINK_SEND_BOOT(DefaultChannel, &booz_max1168_values[7]); });
+ booz_max1168_status = STA_MAX1168_IDLE;
}
}
Modified: paparazzi3/trunk/sw/airborne/booz/test/booz2_test_modem.c
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/test/booz2_test_modem.c 2009-11-13
22:23:25 UTC (rev 4335)
+++ paparazzi3/trunk/sw/airborne/booz/test/booz2_test_modem.c 2009-11-14
17:46:10 UTC (rev 4336)
@@ -36,8 +36,6 @@
static inline void main_periodic_task( void );
static inline void main_event_task( void );
-uint32_t t0, t1, diff;
-
int main( void ) {
main_init();
while(1) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paparazzi-commits] [4336] fixed a couple of test programs,
antoine drouin <=