paparazzi-commits
[Top][All Lists]
Advanced

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

[paparazzi-commits] [5751] made cam_roll a module as well


From: Felix Ruess
Subject: [paparazzi-commits] [5751] made cam_roll a module as well
Date: Mon, 30 Aug 2010 19:54:18 +0000

Revision: 5751
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=5751
Author:   flixr
Date:     2010-08-30 19:54:18 +0000 (Mon, 30 Aug 2010)
Log Message:
-----------
made cam_roll a module as well

Modified Paths:
--------------
    paparazzi3/trunk/conf/modules/cam_point.xml
    paparazzi3/trunk/conf/settings/cam_roll.xml
    paparazzi3/trunk/sw/airborne/nav.c

Added Paths:
-----------
    paparazzi3/trunk/conf/modules/cam_roll.xml

Removed Paths:
-------------
    paparazzi3/trunk/sw/airborne/cam.h
    paparazzi3/trunk/sw/airborne/cam_roll.c
    paparazzi3/trunk/sw/airborne/cam_roll.h

Modified: paparazzi3/trunk/conf/modules/cam_point.xml
===================================================================
--- paparazzi3/trunk/conf/modules/cam_point.xml 2010-08-30 19:26:06 UTC (rev 
5750)
+++ paparazzi3/trunk/conf/modules/cam_point.xml 2010-08-30 19:54:18 UTC (rev 
5751)
@@ -1,7 +1,6 @@
 <!DOCTYPE module SYSTEM "module.dtd">
 
 <module name="cam_point" dir="vision">
-  <!-- depend require="booz_pwm|led" -->
   <header>
     <file name="cam.h"/>
     <file name="point.h"/>

Copied: paparazzi3/trunk/conf/modules/cam_roll.xml (from rev 5750, 
paparazzi3/trunk/conf/modules/cam_point.xml)
===================================================================
--- paparazzi3/trunk/conf/modules/cam_roll.xml                          (rev 0)
+++ paparazzi3/trunk/conf/modules/cam_roll.xml  2010-08-30 19:54:18 UTC (rev 
5751)
@@ -0,0 +1,13 @@
+<!DOCTYPE module SYSTEM "module.dtd">
+
+<module name="cam_roll" dir="vision">
+  <header>
+    <file name="cam.h"/>
+  </header>
+  <init fun="cam_init()"/>
+  <periodic fun="cam_periodic()" freq="10."/>
+  <makefile>
+    <flag name="MOBILE_CAM"/>
+    <file name="cam_roll.c"/>
+  </makefile>
+</module>

Modified: paparazzi3/trunk/conf/settings/cam_roll.xml
===================================================================
--- paparazzi3/trunk/conf/settings/cam_roll.xml 2010-08-30 19:26:06 UTC (rev 
5750)
+++ paparazzi3/trunk/conf/settings/cam_roll.xml 2010-08-30 19:54:18 UTC (rev 
5751)
@@ -3,11 +3,11 @@
 <settings>
   <dl_settings>
     <dl_settings NAME="Cam">
-      <dl_setting MAX="45" MIN="-45" STEP="1" VAR="phi_c" module="cam_roll" 
handler="SetPhiDeg" shortname="phi deg" auto="true">
+      <dl_setting MAX="45" MIN="-45" STEP="1" VAR="phi_c" 
module="vision/cam_roll" handler="SetPhiDeg" shortname="phi deg" auto="true">
       </dl_setting>
-      <dl_setting MAX="1" MIN="0" STEP="1" VAR="cam_roll_mode" 
module="cam_roll" shortname="manual - stablzd">
+      <dl_setting MAX="1" MIN="0" STEP="1" VAR="cam_roll_mode" 
module="vision/cam_roll" shortname="manual - stablzd">
       </dl_setting>
-      <dl_setting MAX="1" MIN="0" STEP="1" VAR="cam_roll_switch" 
module="cam_roll" shortname="still - mobile" handler="Switch">
+      <dl_setting MAX="1" MIN="0" STEP="1" VAR="cam_roll_switch" 
module="vision/cam_roll" shortname="still - mobile" handler="Switch">
       </dl_setting>
     </dl_settings>
   </dl_settings>

Deleted: paparazzi3/trunk/sw/airborne/cam.h
===================================================================
--- paparazzi3/trunk/sw/airborne/cam.h  2010-08-30 19:26:06 UTC (rev 5750)
+++ paparazzi3/trunk/sw/airborne/cam.h  2010-08-30 19:54:18 UTC (rev 5751)
@@ -1,75 +0,0 @@
-/*
- * $Id$
- *  
- * Copyright (C) 2005-  Pascal Brisset, Antoine Drouin
- *
- * 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. 
- *
- */
-/** \file cam.h
- *  \brief Pan/Tilt camera API
- *
- */
-
-#ifndef CAM_H
-#define CAM_H
-
-#include <inttypes.h>
-#include "inter_mcu.h"
-
-#define CAM_MODE_OFF 0         /* Do nothing */
-#define CAM_MODE_ANGLES 1      /* Input: servo angles */
-#define CAM_MODE_NADIR 2       /* Input: () */
-#define CAM_MODE_XY_TARGET 3   /* Input: target_x, target_y */
-#define CAM_MODE_WP_TARGET 4   /* Input: waypoint no */
-#define CAM_MODE_AC_TARGET 5   /* Input: ac id */
-
-extern uint8_t cam_mode;
-
-extern float cam_phi_c, cam_theta_c;
-
-extern float cam_pan_c, cam_tilt_c;
-/* pan (move left and right), tilt (move up and down) */
-/** Radians, for CAM_MODE_ANGLES mode */
-
-extern float cam_target_x, cam_target_y;
-/** For CAM_MODE_XY_TARGET mode */
-
-extern uint8_t cam_target_wp;
-/** For CAM_MODE_WP_TARGET mode */
-
-extern uint8_t cam_target_ac;
-/** For CAM_MODE_AC_TARGET mode */
-
-void cam_periodic( void );
-void cam_init( void );
-
-extern int16_t cam_pan_command;
-#define cam_SetPanCommand(x) { ap_state->commands[COMMAND_CAM_PAN] = 
cam_pan_command = x;}
-extern int16_t cam_tilt_command;
-#define cam_SetTiltCommand(x) { ap_state->commands[COMMAND_CAM_TILT] = 
cam_tilt_command = x;}
-
-#ifdef TEST_CAM
-extern float test_cam_estimator_x;
-extern float test_cam_estimator_y;
-extern float test_cam_estimator_z;
-extern float test_cam_estimator_phi;
-extern float test_cam_estimator_theta;
-extern float test_cam_estimator_hspeed_dir;
-#endif // TEST_CAM
-#endif // CAM_H

Deleted: paparazzi3/trunk/sw/airborne/cam_roll.c
===================================================================
--- paparazzi3/trunk/sw/airborne/cam_roll.c     2010-08-30 19:26:06 UTC (rev 
5750)
+++ paparazzi3/trunk/sw/airborne/cam_roll.c     2010-08-30 19:54:18 UTC (rev 
5751)
@@ -1,79 +0,0 @@
-/*
- * $Id$
- *  
- * Copyright (C) 2003  Pascal Brisset, Antoine Drouin
- *
- * 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. 
- *
- */
-/** \file cam.c
- *  \brief Pan/Tilt camera library
- *
- */
-
-#include <math.h>
-#include "cam.h"
-#include "nav.h"
-#include "autopilot.h"
-#include "flight_plan.h"
-#include "estimator.h"
-#include "inter_mcu.h"
-#include "nav.h"
-
-#define MIN_PPRZ_CAM ((int16_t)(MAX_PPRZ * 0.05))
-#define DELTA_ALPHA 0.2
-
-#define MAX_CAM_ROLL M_PI/2
-
-float cam_roll_phi; /* radian */
-float phi_c; /* radian */
-float theta_c; /* have to be defined for telemetry message */
-
-float target_x, target_y, target_alt;
-
-#ifdef MOBILE_CAM
-
-#define MODE_MANUAL     0
-#define MODE_STABILIZED 1
-
-uint8_t cam_roll_mode;
-bool_t cam_roll_switch;
-
-void cam_init( void ) {
-  cam_roll_switch = 0;
-#if defined VIDEO_SWITCH_PIN && !(defined SITL)
-  IO0DIR |= _BV(VIDEO_SWITCH_PIN);
-  IO0CLR = _BV(VIDEO_SWITCH_PIN);
-#endif
-}
-
-void cam_periodic( void ) {
-  switch (cam_roll_mode) {
-  case MODE_STABILIZED:
-    phi_c = cam_roll_phi + estimator_phi;
-    break;
-  case MODE_MANUAL:
-    phi_c = cam_roll_phi;
-    break;
-  default:
-    phi_c = 0;
-  }
-  ap_state->commands[COMMAND_CAM_ROLL] = TRIM_PPRZ(phi_c * MAX_PPRZ / 
RadOfDeg(CAM_PHI_MAX_DEG));
-}
-
-#endif // MOBILE_CAM

Deleted: paparazzi3/trunk/sw/airborne/cam_roll.h
===================================================================
--- paparazzi3/trunk/sw/airborne/cam_roll.h     2010-08-30 19:26:06 UTC (rev 
5750)
+++ paparazzi3/trunk/sw/airborne/cam_roll.h     2010-08-30 19:54:18 UTC (rev 
5751)
@@ -1,17 +0,0 @@
-#ifndef CAM_ROLL_H
-#define CAM_ROLL_H
-
-extern uint8_t cam_roll_mode;
-extern float cam_roll_phi;
-extern bool_t cam_roll_switch;
-
-#define cam_roll_SetPhiDeg(_deg) { cam_roll_phi = RadOfDeg(_deg); }
-
-#ifdef SITL
-#define cam_roll_Switch(_x) { cam_roll_switch = _x; }
-#else
-#define cam_roll_Switch(_x) { cam_roll_switch = _x; if (_x) IO0SET = 
_BV(VIDEO_SWITCH_PIN); else IO0CLR = _BV(VIDEO_SWITCH_PIN); }
-#endif
-
-
-#endif /* CAM_ROLL_H */

Modified: paparazzi3/trunk/sw/airborne/nav.c
===================================================================
--- paparazzi3/trunk/sw/airborne/nav.c  2010-08-30 19:26:06 UTC (rev 5750)
+++ paparazzi3/trunk/sw/airborne/nav.c  2010-08-30 19:54:18 UTC (rev 5751)
@@ -37,7 +37,6 @@
 #include "fw_v_ctl.h"
 #include "autopilot.h"
 #include "inter_mcu.h"
-#include "cam.h"
 #include "traffic_info.h"
 #include "latlong.h"
 




reply via email to

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