diff --git a/conf/modules/booz_drop.xml b/conf/modules/booz_drop.xml new file mode 100644 index 0000000000..006cfe1e5b --- /dev/null +++ b/conf/modules/booz_drop.xml @@ -0,0 +1,15 @@ + + + + +
+ +
+ + + + + + +
+ diff --git a/sw/airborne/booz/booz2_main.c b/sw/airborne/booz/booz2_main.c index 5538baefbc..01a189a5a2 100644 --- a/sw/airborne/booz/booz2_main.c +++ b/sw/airborne/booz/booz2_main.c @@ -57,10 +57,6 @@ #include "booz2_cam.h" #endif -#ifdef USE_DROP -#include "booz_drop.h" -#endif - #if defined USE_CAM || USE_DROP #include "booz2_pwm_hw.h" #endif @@ -139,10 +135,6 @@ STATIC_INLINE void booz2_main_init( void ) { booz2_cam_init(); #endif -#ifdef USE_DROP - booz_drop_init(); -#endif - #ifdef BOOZ2_SONAR booz2_sonar_init(); #endif @@ -212,10 +204,6 @@ STATIC_INLINE void booz2_main_periodic( void ) { RunOnceEvery(50,booz2_cam_periodic()); #endif -#ifdef USE_DROP - RunOnceEvery(50,booz_drop_periodic()); -#endif - #ifdef BOOZ2_SONAR booz2_analog_periodic(); #endif diff --git a/sw/airborne/booz/booz_drop.c b/sw/airborne/booz/booz_drop.c deleted file mode 100644 index c05af78751..0000000000 --- a/sw/airborne/booz/booz_drop.c +++ /dev/null @@ -1,22 +0,0 @@ -#include "booz_drop.h" -#include "booz2_pwm_hw.h" - - -bool_t booz_drop_ball; -int16_t booz_drop_servo; - -#define DROP_SERVO_OPEN 1700 -#define DROP_SERVO_CLOSED 900 - -void booz_drop_init(void) { - booz_drop_ball = FALSE; - booz_drop_periodic(); -} - -void booz_drop_periodic(void) { - if (booz_drop_ball == TRUE) - booz_drop_servo = DROP_SERVO_OPEN; - else - booz_drop_servo = DROP_SERVO_CLOSED; - Booz2SetPwmValue(booz_drop_servo); -} diff --git a/sw/airborne/booz/booz_drop.h b/sw/airborne/booz/booz_drop.h deleted file mode 100644 index 48b6afca6e..0000000000 --- a/sw/airborne/booz/booz_drop.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef BOOZ_DROP_H -#define BOOZ_DROP_H - -#include "std.h" - -extern bool_t booz_drop_ball; - -extern void booz_drop_init(void); -extern void booz_drop_periodic(void); - -#endif /* BOOZ_DROP_H */ diff --git a/sw/airborne/modules/drop/booz_drop.c b/sw/airborne/modules/drop/booz_drop.c new file mode 100644 index 0000000000..1b640ecd04 --- /dev/null +++ b/sw/airborne/modules/drop/booz_drop.c @@ -0,0 +1,45 @@ +/* + * $Id: $ + * + * Copyright (C) 2009 Flixr + * + * 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 "booz_drop.h" +#include "booz2_pwm_hw.h" + + +bool_t booz_drop_ball; +int16_t booz_drop_servo; + +#define DROP_SERVO_OPEN 1700 +#define DROP_SERVO_CLOSED 900 + +void booz_drop_init(void) { + booz_drop_ball = FALSE; + booz_drop_periodic(); +} + +void booz_drop_periodic(void) { + if (booz_drop_ball == TRUE) + booz_drop_servo = DROP_SERVO_OPEN; + else + booz_drop_servo = DROP_SERVO_CLOSED; + Booz2SetPwmValue(booz_drop_servo); +} diff --git a/sw/airborne/modules/drop/booz_drop.h b/sw/airborne/modules/drop/booz_drop.h new file mode 100644 index 0000000000..e5282f2ac5 --- /dev/null +++ b/sw/airborne/modules/drop/booz_drop.h @@ -0,0 +1,35 @@ +/* + * $Id: $ + * + * Copyright (C) 2009 Flixr + * + * 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. + */ + + +#ifndef BOOZ_DROP_H +#define BOOZ_DROP_H + +#include "std.h" + +extern bool_t booz_drop_ball; + +extern void booz_drop_init(void); +extern void booz_drop_periodic(void); + +#endif /* BOOZ_DROP_H */