paparazzi-commits
[Top][All Lists]
Advanced

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

[paparazzi-commits] [5090] more fixes for new SPI link


From: antoine drouin
Subject: [paparazzi-commits] [5090] more fixes for new SPI link
Date: Wed, 21 Jul 2010 09:08:01 +0000

Revision: 5090
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=5090
Author:   poine
Date:     2010-07-21 09:08:01 +0000 (Wed, 21 Jul 2010)
Log Message:
-----------
more fixes for new SPI link

Modified Paths:
--------------
    paparazzi3/trunk/conf/airframes/Poine/beth.xml
    paparazzi3/trunk/sw/airborne/beth/main_overo.c

Modified: paparazzi3/trunk/conf/airframes/Poine/beth.xml
===================================================================
--- paparazzi3/trunk/conf/airframes/Poine/beth.xml      2010-07-21 07:55:50 UTC 
(rev 5089)
+++ paparazzi3/trunk/conf/airframes/Poine/beth.xml      2010-07-21 09:08:01 UTC 
(rev 5090)
@@ -178,6 +178,7 @@
 main_overo.CFLAGS = -I. -I$(SRC_FMS)
 main_overo.srcs  = $(SRC_BETH)/main_overo.c
 main_overo.srcs += $(SRC_FMS)/fms_spi_link.c
+main_overo.CFLAGS += -DOVERO_LINK_MSG_UP=AutopilotMessageBethUp 
-DOVERO_LINK_MSG_DOWN=AutopilotMessageBethDown
 
 
 #

Modified: paparazzi3/trunk/sw/airborne/beth/main_overo.c
===================================================================
--- paparazzi3/trunk/sw/airborne/beth/main_overo.c      2010-07-21 07:55:50 UTC 
(rev 5089)
+++ paparazzi3/trunk/sw/airborne/beth/main_overo.c      2010-07-21 09:08:01 UTC 
(rev 5090)
@@ -33,13 +33,12 @@
 #include "fms_autopilot_msg.h"
 
 
-static union AutopilotMessageBeth my_buffers[2];
-static struct AutopilotMessageBethUp*   msg_in  = &my_buffers[0].up;
-static struct AutopilotMessageBethDown* msg_out = &my_buffers[1].down;
+//static union AutopilotMessageBeth my_buffers[2];
+static struct AutopilotMessageBethUp   msg_in;
+static struct AutopilotMessageBethDown msg_out;
 static void send_message(void);
 
 int main(int argc, char *argv[]) {
-  
   if (spi_link_init()) {
     TRACE(TRACE_ERROR, "%s", "failed to open SPI link \n");
     return -1;
@@ -58,14 +57,16 @@
 static void send_message() {
   static uint32_t foo = 0;
 
-  spi_link_send(msg_out, sizeof(union AutopilotMessageBeth), msg_in);
+  spi_link_send(&msg_out, sizeof(struct AutopilotMessageBethUp), &msg_in);
   //  if (!foo%100) {
+#if 0
   if (0) {
   printf("%d -> %d %d %d %d %d %d %d %d %d\n", foo, 
         msg_in->bench_sensor.x, msg_in->bench_sensor.y, msg_in->bench_sensor.z,
         msg_in->gyro.x, msg_in->gyro.y, msg_in->gyro.z,
         msg_in->accel.x, msg_in->accel.y, msg_in->accel.z);
   }
+#endif
   foo++;
 }
 




reply via email to

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