paparazzi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paparazzi-commits] [5417] adding a simple test for asctec motor control


From: antoine drouin
Subject: [paparazzi-commits] [5417] adding a simple test for asctec motor controllers
Date: Tue, 17 Aug 2010 13:41:56 +0000

Revision: 5417
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=5417
Author:   poine
Date:     2010-08-17 13:41:56 +0000 (Tue, 17 Aug 2010)
Log Message:
-----------
adding a simple test for asctec motor controllers

Modified Paths:
--------------
    paparazzi3/trunk/conf/autopilot/lisa_test_progs.makefile
    paparazzi3/trunk/sw/airborne/stm32/i2c_hw.c

Added Paths:
-----------
    paparazzi3/trunk/sw/airborne/lisa/test/test_mc_asctec_v1_simple.c

Removed Paths:
-------------
    paparazzi3/trunk/sw/airborne/lisa/test_mc4.c

Modified: paparazzi3/trunk/conf/autopilot/lisa_test_progs.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/lisa_test_progs.makefile    2010-08-17 
13:33:47 UTC (rev 5416)
+++ paparazzi3/trunk/conf/autopilot/lisa_test_progs.makefile    2010-08-17 
13:41:56 UTC (rev 5417)
@@ -303,11 +303,11 @@
 #tunnel.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B9600
 #tunnel.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B9600
 
-tunnel.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B38400
-tunnel.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B38400
+#tunnel.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B38400
+#tunnel.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B38400
 
-#tunnel.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
-#tunnel.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
+tunnel.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
+tunnel.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
 
 #tunnel.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B115200
 #tunnel.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B115200
@@ -577,21 +577,21 @@
 #
 # test motor controllers asctec with interrupts
 #
-test_mc4.ARCHDIR = $(ARCHI)
-test_mc4.TARGET = test_mc
-test_mc4.TARGETDIR = test_mc
-test_mc4.CFLAGS = -I$(SRC_LISA) -I$(ARCHI) -DPERIPHERALS_AUTO_INIT
-test_mc4.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
-test_mc4.srcs = $(SRC_LISA)/test_mc4.c           \
-                $(SRC_ARCH)/stm32_exceptions.c   \
-                $(SRC_ARCH)/stm32_vector_table.c
-test_mc4.CFLAGS += -DUSE_LED
-test_mc4.srcs += $(SRC_ARCH)/led_hw.c
-test_mc4.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1
-test_mc4.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
-test_mc4.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
-test_mc4.CFLAGS += -DUSE_I2C1
-test_mc4.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
+test_mc_asctec_v1_simple.ARCHDIR = $(ARCHI)
+test_mc_asctec_v1_simple.TARGET = test_mc_asctec_v1_simple
+test_mc_asctec_v1_simple.TARGETDIR = test_mc_asctec_v1_simple
+test_mc_asctec_v1_simple.CFLAGS = -I$(SRC_LISA) -I$(ARCHI) 
-DPERIPHERALS_AUTO_INIT
+test_mc_asctec_v1_simple.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
+test_mc_asctec_v1_simple.srcs = $(SRC_LISA)/test/test_mc_asctec_v1_simple.c  \
+                                $(SRC_ARCH)/stm32_exceptions.c               \
+                                $(SRC_ARCH)/stm32_vector_table.c
+test_mc_asctec_v1_simple.CFLAGS += -DUSE_LED
+test_mc_asctec_v1_simple.srcs += $(SRC_ARCH)/led_hw.c
+test_mc_asctec_v1_simple.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1
+test_mc_asctec_v1_simple.CFLAGS += 
-DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
+test_mc_asctec_v1_simple.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
+test_mc_asctec_v1_simple.CFLAGS += -DUSE_I2C1
+test_mc_asctec_v1_simple.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
 
 
 #

Copied: paparazzi3/trunk/sw/airborne/lisa/test/test_mc_asctec_v1_simple.c (from 
rev 5412, paparazzi3/trunk/sw/airborne/lisa/test_mc4.c)
===================================================================
--- paparazzi3/trunk/sw/airborne/lisa/test/test_mc_asctec_v1_simple.c           
                (rev 0)
+++ paparazzi3/trunk/sw/airborne/lisa/test/test_mc_asctec_v1_simple.c   
2010-08-17 13:41:56 UTC (rev 5417)
@@ -0,0 +1,75 @@
+/*
+ * $Id$
+ *  
+ * Copyright (C) 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. 
+ */
+
+/*
+ *
+ * That would be a quick asctech protocol test
+ *
+ */
+
+
+#include "init_hw.h"
+#include "sys_time.h"
+
+static inline void main_init( void );
+static inline void main_periodic_task( void );
+static inline void main_event_task( void );
+
+static uint8_t i2c_done;
+
+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();
+}
+
+
+
+static inline void main_periodic_task( void ) {
+  
+  i2c1_buf[0] = 100 + 0;
+  i2c1_buf[1] = 100 + 0;
+  i2c1_buf[2] = 100 + 0;
+  i2c1_buf[3] = 6;
+  i2c1_transmit(0x02, 4, &i2c_done);
+
+  LED_PERIODIC();
+
+}
+
+
+
+static inline void main_event_task( void ) {
+
+}

Deleted: paparazzi3/trunk/sw/airborne/lisa/test_mc4.c
===================================================================
--- paparazzi3/trunk/sw/airborne/lisa/test_mc4.c        2010-08-17 13:33:47 UTC 
(rev 5416)
+++ paparazzi3/trunk/sw/airborne/lisa/test_mc4.c        2010-08-17 13:41:56 UTC 
(rev 5417)
@@ -1,75 +0,0 @@
-/*
- * $Id$
- *  
- * Copyright (C) 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. 
- */
-
-/*
- *
- * That would be a quick asctech protocol test
- *
- */
-
-
-#include "init_hw.h"
-#include "sys_time.h"
-
-static inline void main_init( void );
-static inline void main_periodic_task( void );
-static inline void main_event_task( void );
-
-static uint8_t i2c_done;
-
-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();
-}
-
-
-
-static inline void main_periodic_task( void ) {
-  
-  i2c1_buf[0] = 100 + 0;
-  i2c1_buf[1] = 100 + 0;
-  i2c1_buf[2] = 100 + 0;
-  i2c1_buf[3] = 6;
-  i2c1_transmit(0x02, 4, &i2c_done);
-
-  LED_PERIODIC();
-
-}
-
-
-
-static inline void main_event_task( void ) {
-
-}

Modified: paparazzi3/trunk/sw/airborne/stm32/i2c_hw.c
===================================================================
--- paparazzi3/trunk/sw/airborne/stm32/i2c_hw.c 2010-08-17 13:33:47 UTC (rev 
5416)
+++ paparazzi3/trunk/sw/airborne/stm32/i2c_hw.c 2010-08-17 13:41:56 UTC (rev 
5417)
@@ -669,7 +669,7 @@
 /* disable IRQ, notifiy caller, update status */
 #define TransactionComplete() {                                \
     I2C_ITConfig(I2C2, I2C_IT_EVT|I2C_IT_BUF, DISABLE); \
-    //    DEBUG_S1_OFF();                              \
+                               \
     if (i2c2.finished) *i2c2.finished = TRUE;          \
     i2c2.status = I2CComplete;                         \
     I2c2StopHandler();                                 \




reply via email to

[Prev in Thread] Current Thread [Next in Thread]