diff --git a/conf/airframes/microjet_example.xml b/conf/airframes/microjet_example.xml index f9333b06d2..ab7f13cae4 100644 --- a/conf/airframes/microjet_example.xml +++ b/conf/airframes/microjet_example.xml @@ -195,7 +195,7 @@ - + diff --git a/conf/modules/pwm_meas.xml b/conf/modules/pwm_meas.xml new file mode 100644 index 0000000000..40ebbac8e1 --- /dev/null +++ b/conf/modules/pwm_meas.xml @@ -0,0 +1,19 @@ + + + +
+ +
+ + + + + + + +
diff --git a/conf/modules/xtend_rssi.xml b/conf/modules/xtend_rssi.xml index a58e7055f7..a7ac87a74f 100644 --- a/conf/modules/xtend_rssi.xml +++ b/conf/modules/xtend_rssi.xml @@ -7,18 +7,14 @@ 2 - INPUT CAPTURE CAP0.0 on P0.30 (TWOG ADC4, no voltage divider) --> - +
- - - -
diff --git a/sw/airborne/modules/core/pwm_meas.c b/sw/airborne/modules/core/pwm_meas.c new file mode 100644 index 0000000000..c8252cb69b --- /dev/null +++ b/sw/airborne/modules/core/pwm_meas.c @@ -0,0 +1,38 @@ +/* + * $Id$ + * + * Copyright (C) 2011 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. + * + */ + +/** \file pwm_meas.c + * + * Wrapper to access pwm_input mcu peripheral from other modules + */ + + +#include "modules/core/pwm_meas.h" +#include "mcu_periph/pwm_input.h" +#include "sys_time.h" + +void pwm_meas_init( void ) +{ + pwm_input_init(); +} diff --git a/sw/airborne/modules/core/pwm_meas.h b/sw/airborne/modules/core/pwm_meas.h new file mode 100644 index 0000000000..cd0346e31c --- /dev/null +++ b/sw/airborne/modules/core/pwm_meas.h @@ -0,0 +1,35 @@ +/* + * $Id$ + * + * Copyright (C) 2011 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. + * + */ + +/** \file pwm_meas.h + * + * Wrapper to access pwm_input mcu peripheral from other modules + */ + +#ifndef PWM_MEAS_H +#define PWM_MEAS_H + +void pwm_meas_init( void ); + +#endif diff --git a/sw/airborne/modules/datalink/xtend_rssi.c b/sw/airborne/modules/datalink/xtend_rssi.c index 256d009b96..ddf650b9c5 100644 --- a/sw/airborne/modules/datalink/xtend_rssi.c +++ b/sw/airborne/modules/datalink/xtend_rssi.c @@ -46,11 +46,6 @@ #define XTEND_RSSI_PWM_ARRAY_INDEX (XTEND_RSSI_PWM_INPUT_CHANNEL - 1) -void xtend_rssi_init( void ) -{ - //pwm_input_init(); -} - void xtend_rssi_periodic( void ) { /* get the last duty if valid then reset valid flag (this says if we got another pulse since the last one) diff --git a/sw/airborne/modules/datalink/xtend_rssi.h b/sw/airborne/modules/datalink/xtend_rssi.h index a267fb8975..0f7eb12bfc 100644 --- a/sw/airborne/modules/datalink/xtend_rssi.h +++ b/sw/airborne/modules/datalink/xtend_rssi.h @@ -32,7 +32,6 @@ #ifndef XTEND_RSSI_H #define XTEND_RSSI_H -void xtend_rssi_init( void ); void xtend_rssi_periodic( void ); #endif \ No newline at end of file