paparazzi-commits
[Top][All Lists]
Advanced

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

[paparazzi-commits] [5667] added a skeleton for vi_overo_link


From: antoine drouin
Subject: [paparazzi-commits] [5667] added a skeleton for vi_overo_link
Date: Tue, 24 Aug 2010 23:06:39 +0000

Revision: 5667
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=5667
Author:   poine
Date:     2010-08-24 23:06:39 +0000 (Tue, 24 Aug 2010)
Log Message:
-----------
added a skeleton for vi_overo_link

Modified Paths:
--------------
    paparazzi3/trunk/conf/airframes/Poine/booz2_a7.xml
    paparazzi3/trunk/sw/airborne/modules/vehicle_interface/vi.h
    paparazzi3/trunk/sw/airborne/modules/vehicle_interface/vi_datalink.c
    paparazzi3/trunk/sw/airborne/modules/vehicle_interface/vi_datalink.h

Added Paths:
-----------
    paparazzi3/trunk/conf/modules/vehicle_interface_overo_link.xml
    paparazzi3/trunk/sw/airborne/modules/vehicle_interface/vi_overo_link.c
    paparazzi3/trunk/sw/airborne/modules/vehicle_interface/vi_overo_link.h

Modified: paparazzi3/trunk/conf/airframes/Poine/booz2_a7.xml
===================================================================
--- paparazzi3/trunk/conf/airframes/Poine/booz2_a7.xml  2010-08-24 22:45:58 UTC 
(rev 5666)
+++ paparazzi3/trunk/conf/airframes/Poine/booz2_a7.xml  2010-08-24 23:06:39 UTC 
(rev 5667)
@@ -177,7 +177,7 @@
 
 <!-- -->
  <modules main_freq="512">
-   <load name="vehicle_interface_datalink.xml"/>
+   <load name="vehicle_interface_overo_link.xml"/>
  </modules>
 <!-- -->
  

Added: paparazzi3/trunk/conf/modules/vehicle_interface_overo_link.xml
===================================================================
--- paparazzi3/trunk/conf/modules/vehicle_interface_overo_link.xml              
                (rev 0)
+++ paparazzi3/trunk/conf/modules/vehicle_interface_overo_link.xml      
2010-08-24 23:06:39 UTC (rev 5667)
@@ -0,0 +1,16 @@
+<!DOCTYPE module SYSTEM "module.dtd">
+
+<module name="vi_overo_link" dir="vehicle_interface">
+  <header>
+    <file name="vi_overo_link.h"/>
+  </header>
+  <init fun="vi_init()"/>
+  <periodic fun="vi_periodic()" freq="25"/>
+  <makefile>
+    <file name="vi.c"/>
+    <file name="vi_overo_link.c"/>
+  <!--  <file name="lisa/lisa_overo_link.c"/> -->
+  </makefile>
+</module>
+
+

Modified: paparazzi3/trunk/sw/airborne/modules/vehicle_interface/vi.h
===================================================================
--- paparazzi3/trunk/sw/airborne/modules/vehicle_interface/vi.h 2010-08-24 
22:45:58 UTC (rev 5666)
+++ paparazzi3/trunk/sw/airborne/modules/vehicle_interface/vi.h 2010-08-24 
23:06:39 UTC (rev 5667)
@@ -1,7 +1,7 @@
 /*
  * $Id:  $
  *
- * Copyright (C) 2008-2010 The Paparazzi Team
+ * Copyright (C) 2010 The Paparazzi Team
  *
  * This file is part of paparazzi.
  *
@@ -97,7 +97,7 @@
 extern void vi_impl_set_enabled(bool_t enabled);
 
 
-#define vi_SetEnabled(_val) {          \
+#define vi_SetEnabled(_val) {                  \
     vi.enabled = _val;                         \
     vi_set_enabled(_val);                      \
   }

Modified: paparazzi3/trunk/sw/airborne/modules/vehicle_interface/vi_datalink.c
===================================================================
--- paparazzi3/trunk/sw/airborne/modules/vehicle_interface/vi_datalink.c        
2010-08-24 22:45:58 UTC (rev 5666)
+++ paparazzi3/trunk/sw/airborne/modules/vehicle_interface/vi_datalink.c        
2010-08-24 23:06:39 UTC (rev 5667)
@@ -1,7 +1,7 @@
 /*
- * $Id: $
+ * $Id$
  *  
- * Copyright (C) 2008-2010 The Paparazzi Team
+ * Copyright (C) 2010 The Paparazzi Team
  *
  * This file is part of paparazzi.
  *
@@ -21,7 +21,7 @@
  * Boston, MA 02111-1307, USA. 
  */
 
-#include "vehicle_interface/vi_datalink.h"
+#include "modules/vehicle_interface/vi_datalink.h"
 
 void vi_impl_init(void) {
 }

Modified: paparazzi3/trunk/sw/airborne/modules/vehicle_interface/vi_datalink.h
===================================================================
--- paparazzi3/trunk/sw/airborne/modules/vehicle_interface/vi_datalink.h        
2010-08-24 22:45:58 UTC (rev 5666)
+++ paparazzi3/trunk/sw/airborne/modules/vehicle_interface/vi_datalink.h        
2010-08-24 23:06:39 UTC (rev 5667)
@@ -1,6 +1,8 @@
 /*
- * $Id: booz_fms_datalink.h 5216 2010-08-04 17:13:43Z gautier $
+ * $Id$
  *
+ * Copyright (C) 2010 The Paparazzi Team
+ *
  * This is the implementation of the "external interface" to the autopilot.
  * using datalink messages. 
  *
@@ -23,7 +25,7 @@
 #define VEHICLE_INTERFACE_DATALINK_H
 
 #include "std.h"
-#include "vehicle_interface/vi.h"
+#include "modules/vehicle_interface/vi.h"
 #include "math/pprz_algebra_int.h"
 
 #ifndef VI_MAX_H_SPEED
@@ -41,59 +43,63 @@
 extern void vi_update_wp(uint8_t wp_id);
 
 #ifdef VI_PHI_THETA_MAX
-#define VI_LIMIT_ATTITUDE(_att) { \
-  BoundAbs(_att.phi,   VI_PHI_THETA_MAX); \
-  BoundAbs(_att.theta, VI_PHI_THETA_MAX); \
-}
+#define VI_LIMIT_ATTITUDE(_att) {              \
+    BoundAbs(_att.phi,   VI_PHI_THETA_MAX);    \
+    BoundAbs(_att.theta, VI_PHI_THETA_MAX);    \
+  }
 #else
 #define VI_LIMIT_ATTITUDE(_x) {}
 #endif
 
-#define VI_PARSE_DATALINK(_dl_buffer) {                                \
-    vi.last_msg = 0;                                           \
-    vi.input.h_mode = DL_BOOZ2_FMS_COMMAND_h_mode(_dl_buffer); \
-    vi.input.v_mode = DL_BOOZ2_FMS_COMMAND_v_mode(_dl_buffer); \
-    switch (vi.input.h_mode) {                                 \
+#define VI_PARSE_DATALINK(_dl_buffer) {                                        
\
+    vi.last_msg = 0;                                                   \
+    vi.input.h_mode = DL_BOOZ2_FMS_COMMAND_h_mode(_dl_buffer);         \
+    vi.input.v_mode = DL_BOOZ2_FMS_COMMAND_v_mode(_dl_buffer);         \
+    switch (vi.input.h_mode) {                                         \
     case BOOZ2_GUIDANCE_H_MODE_KILL:                                   \
     case BOOZ2_GUIDANCE_H_MODE_RATE :                                  \
       break;                                                           \
     case BOOZ2_GUIDANCE_H_MODE_ATTITUDE :                              \
       {                                                                        
\
-             vi.input.h_sp.attitude.phi   = 
DL_BOOZ2_FMS_COMMAND_h_sp_1(_dl_buffer);                   \
-             vi.input.h_sp.attitude.theta = 
DL_BOOZ2_FMS_COMMAND_h_sp_2(_dl_buffer);                   \
-             vi.input.h_sp.attitude.psi   = 
DL_BOOZ2_FMS_COMMAND_h_sp_3(_dl_buffer);                   \
-        ANGLE_REF_NORMALIZE(vi.input.h_sp.attitude.psi); \
-        VI_LIMIT_ATTITUDE(vi.input.h_sp.attitude); \
+       vi.input.h_sp.attitude.phi   = DL_BOOZ2_FMS_COMMAND_h_sp_1(_dl_buffer); 
\
+             vi.input.h_sp.attitude.theta = 
DL_BOOZ2_FMS_COMMAND_h_sp_2(_dl_buffer); \
+             vi.input.h_sp.attitude.psi   = 
DL_BOOZ2_FMS_COMMAND_h_sp_3(_dl_buffer); \
+             ANGLE_REF_NORMALIZE(vi.input.h_sp.attitude.psi);          \
+        VI_LIMIT_ATTITUDE(vi.input.h_sp.attitude);                     \
       }                                                                        
\
-      break;  \
+      break;                                                           \
     case BOOZ2_GUIDANCE_H_MODE_HOVER :                                 \
       {                                                                        
\
-             vi.input.h_sp.pos.x   = DL_BOOZ2_FMS_COMMAND_h_sp_1(_dl_buffer);  
                \
-             vi.input.h_sp.pos.y   = DL_BOOZ2_FMS_COMMAND_h_sp_2(_dl_buffer);  
                \
+       vi.input.h_sp.pos.x   = DL_BOOZ2_FMS_COMMAND_h_sp_1(_dl_buffer); \
+             vi.input.h_sp.pos.y   = DL_BOOZ2_FMS_COMMAND_h_sp_2(_dl_buffer); \
       }                                                                        
\
-      break;  \
+      break;                                                           \
     case BOOZ2_GUIDANCE_H_MODE_NAV :                                   \
-      { \
+      {                                                                        
\
         vi.input.h_sp.speed.x = DL_BOOZ2_FMS_COMMAND_h_sp_1(_dl_buffer); \
         vi.input.h_sp.speed.y = DL_BOOZ2_FMS_COMMAND_h_sp_2(_dl_buffer); \
         vi.input.h_sp.speed.z = DL_BOOZ2_FMS_COMMAND_h_sp_3(_dl_buffer); \
-      } \
+      }                                                                        
\
       break;                                                           \
+    default:                                                           \
+      break;                                                           \
     }                                                                  \
-    switch (vi.input.v_mode) {                                 \
+    switch (vi.input.v_mode) {                                         \
     case BOOZ2_GUIDANCE_V_MODE_KILL:                                   \
     case BOOZ2_GUIDANCE_V_MODE_RC_DIRECT:                              \
     case BOOZ2_GUIDANCE_V_MODE_RC_CLIMB:                               \
       break;                                                           \
     case BOOZ2_GUIDANCE_V_MODE_CLIMB :                                 \
-      vi.input.v_sp.climb = DL_BOOZ2_FMS_COMMAND_v_sp(_dl_buffer); \
+      vi.input.v_sp.climb = DL_BOOZ2_FMS_COMMAND_v_sp(_dl_buffer);     \
       break;                                                           \
     case BOOZ2_GUIDANCE_V_MODE_HOVER :                                 \
-      vi.input.v_sp.height = DL_BOOZ2_FMS_COMMAND_v_sp(_dl_buffer); \
+      vi.input.v_sp.height = DL_BOOZ2_FMS_COMMAND_v_sp(_dl_buffer);    \
       break;                                                           \
     case BOOZ2_GUIDANCE_V_MODE_NAV :                                   \
-      vi.input.v_sp.climb = DL_BOOZ2_FMS_COMMAND_v_sp(_dl_buffer); \
+      vi.input.v_sp.climb = DL_BOOZ2_FMS_COMMAND_v_sp(_dl_buffer);     \
       break;                                                           \
+    default:                                                           \
+      break;                                                           \
     }                                                                  \
   }
 

Added: paparazzi3/trunk/sw/airborne/modules/vehicle_interface/vi_overo_link.c
===================================================================
--- paparazzi3/trunk/sw/airborne/modules/vehicle_interface/vi_overo_link.c      
                        (rev 0)
+++ paparazzi3/trunk/sw/airborne/modules/vehicle_interface/vi_overo_link.c      
2010-08-24 23:06:39 UTC (rev 5667)
@@ -0,0 +1,37 @@
+/*
+ * $Id$
+ *  
+ * Copyright (C) 2010 The Paparazzi Team
+ *
+ * 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 "modules/vehicle_interface/vi_overo_link.h"
+
+void vi_impl_init(void) {
+
+}
+
+void vi_impl_periodic(void) {
+
+}
+
+void vi_impl_set_enabled(bool_t enabled __attribute__ ((unused))) {
+
+}
+

Added: paparazzi3/trunk/sw/airborne/modules/vehicle_interface/vi_overo_link.h
===================================================================
--- paparazzi3/trunk/sw/airborne/modules/vehicle_interface/vi_overo_link.h      
                        (rev 0)
+++ paparazzi3/trunk/sw/airborne/modules/vehicle_interface/vi_overo_link.h      
2010-08-24 23:06:39 UTC (rev 5667)
@@ -0,0 +1,35 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2010 The Paparazzi Team
+ *
+ * This is the implementation of the "external interface" to the autopilot.
+ * using datalink messages. 
+ *
+ * This program 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 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef VEHICLE_INTERFACE_OVERO_LINK_H
+#define VEHICLE_INTERFACE_OVERO_LINK_H
+
+#include "std.h"
+#include "modules/vehicle_interface/vi.h"
+#include "math/pprz_algebra_int.h"
+
+
+
+
+
+#endif /* VEHICLE_INTERFACE_OVERO_LINK_H */




reply via email to

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