paparazzi-commits
[Top][All Lists]
Advanced

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

[paparazzi-commits] [6234] more whitespace cleanup


From: Felix Ruess
Subject: [paparazzi-commits] [6234] more whitespace cleanup
Date: Mon, 25 Oct 2010 15:21:47 +0000

Revision: 6234
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=6234
Author:   flixr
Date:     2010-10-25 15:21:46 +0000 (Mon, 25 Oct 2010)
Log Message:
-----------
more whitespace cleanup

Modified Paths:
--------------
    paparazzi3/trunk/sw/airborne/arch/lpc21/radio_control/ppm_arch.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/radio_control/ppm_arch.h
    paparazzi3/trunk/sw/airborne/arch/sim/radio_control/ppm_arch.c
    paparazzi3/trunk/sw/airborne/arch/sim/radio_control/rc_datalink.c
    paparazzi3/trunk/sw/airborne/arch/stm32/radio_control/ppm_arch.c
    paparazzi3/trunk/sw/airborne/arch/stm32/radio_control/ppm_arch.h
    
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/radio_control/booz_radio_control_ppm_arch.c
    
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/radio_control/booz_radio_control_ppm_arch.h
    
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/radio_control/booz_radio_control_spektrum_arch.c
    
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/radio_control/booz_radio_control_spektrum_arch.h
    
paparazzi3/trunk/sw/airborne/booz/arch/sim/radio_control/booz_radio_control_ppm_arch.h
    
paparazzi3/trunk/sw/airborne/booz/arch/stm32/radio_control/booz_radio_control_ppm_arch.c
    
paparazzi3/trunk/sw/airborne/booz/arch/stm32/radio_control/booz_radio_control_ppm_arch.h
    
paparazzi3/trunk/sw/airborne/booz/arch/stm32/radio_control/booz_radio_control_spektrum_arch.c
    
paparazzi3/trunk/sw/airborne/booz/arch/stm32/radio_control/booz_radio_control_spektrum_arch.h
    paparazzi3/trunk/sw/airborne/booz/booz_radio_control.c
    paparazzi3/trunk/sw/airborne/booz/booz_radio_control.h
    paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_dummy.c
    paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_dummy.h
    paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_joby.c
    paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_joby.h
    paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_ppm.h
    
paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_spektrum.c
    
paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_spektrum.h
    
paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_spektrum_dx7se.h
    
paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_spektrum_dx7se_joby.h

Modified: paparazzi3/trunk/sw/airborne/arch/lpc21/radio_control/ppm_arch.c
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/radio_control/ppm_arch.c    
2010-10-25 15:01:42 UTC (rev 6233)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/radio_control/ppm_arch.c    
2010-10-25 15:21:46 UTC (rev 6234)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- *  
+ *
  * Copyright (C) 2010 The Paparazzi Team
  *
  * This file is part of paparazzi.
@@ -18,7 +18,7 @@
  * 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. 
+ * Boston, MA 02111-1307, USA.
  */
 
 #include "radio_control.h"

Modified: paparazzi3/trunk/sw/airborne/arch/lpc21/radio_control/ppm_arch.h
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/radio_control/ppm_arch.h    
2010-10-25 15:01:42 UTC (rev 6233)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/radio_control/ppm_arch.h    
2010-10-25 15:21:46 UTC (rev 6234)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- *  
+ *
  * Copyright (C) 2010 The Paparazzi Team
  *
  * This file is part of paparazzi.
@@ -18,7 +18,7 @@
  * 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. 
+ * Boston, MA 02111-1307, USA.
  */
 
 #ifndef PPM_ARCH_H
@@ -28,7 +28,7 @@
 #include "LPC21xx.h"
 #include BOARD_CONFIG
 
-/** 
+/**
  * On tiny (and booz) the ppm counter is running at the same speed as
  * the systic counter. There is no reason for this to be true.
  * Let's add a pair of macros to make it possible for them to be different.

Modified: paparazzi3/trunk/sw/airborne/arch/sim/radio_control/ppm_arch.c
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/sim/radio_control/ppm_arch.c      
2010-10-25 15:01:42 UTC (rev 6233)
+++ paparazzi3/trunk/sw/airborne/arch/sim/radio_control/ppm_arch.c      
2010-10-25 15:21:46 UTC (rev 6234)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- *  
+ *
  * Copyright (C) 2010 The Paparazzi Team
  *
  * This file is part of paparazzi.
@@ -18,7 +18,7 @@
  * 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. 
+ * Boston, MA 02111-1307, USA.
  */
 
 #include "sys_time.h"

Modified: paparazzi3/trunk/sw/airborne/arch/sim/radio_control/rc_datalink.c
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/sim/radio_control/rc_datalink.c   
2010-10-25 15:01:42 UTC (rev 6233)
+++ paparazzi3/trunk/sw/airborne/arch/sim/radio_control/rc_datalink.c   
2010-10-25 15:21:46 UTC (rev 6234)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- *  
+ *
  * Copyright (C) 2010 The Paparazzi Team
  *
  * This file is part of paparazzi.
@@ -18,7 +18,7 @@
  * 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. 
+ * Boston, MA 02111-1307, USA.
  */
 
 #include "radio_control.h"
@@ -33,4 +33,3 @@
 value send_ppm(value unit) {
   return unit;
 }
-

Modified: paparazzi3/trunk/sw/airborne/arch/stm32/radio_control/ppm_arch.c
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/stm32/radio_control/ppm_arch.c    
2010-10-25 15:01:42 UTC (rev 6233)
+++ paparazzi3/trunk/sw/airborne/arch/stm32/radio_control/ppm_arch.c    
2010-10-25 15:21:46 UTC (rev 6234)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- *  
+ *
  * Copyright (C) 2010 The Paparazzi Team
  *
  * This file is part of paparazzi.
@@ -18,7 +18,7 @@
  * 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. 
+ * Boston, MA 02111-1307, USA.
  */
 
 #include "radio_control.h"
@@ -58,18 +58,18 @@
 
   /* GPIOA clock enable */
   RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
-  
+
   /* Time Base configuration */
   TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
-  TIM_TimeBaseStructInit(&TIM_TimeBaseStructure); 
-  TIM_TimeBaseStructure.TIM_Period        = 0xFFFF;          
-  TIM_TimeBaseStructure.TIM_Prescaler     = 0x8; 
-  TIM_TimeBaseStructure.TIM_ClockDivision = 0x0; 
-  TIM_TimeBaseStructure.TIM_CounterMode   = TIM_CounterMode_Up;  
+  TIM_TimeBaseStructInit(&TIM_TimeBaseStructure);
+  TIM_TimeBaseStructure.TIM_Period        = 0xFFFF;
+  TIM_TimeBaseStructure.TIM_Prescaler     = 0x8;
+  TIM_TimeBaseStructure.TIM_ClockDivision = 0x0;
+  TIM_TimeBaseStructure.TIM_CounterMode   = TIM_CounterMode_Up;
   TIM_TimeBaseInit(TIM2, &TIM_TimeBaseStructure);
-  
+
  /* TIM2 configuration: Input Capture mode ---------------------
-     The external signal is connected to TIM2 CH2 pin (PA.01)  
+     The external signal is connected to TIM2 CH2 pin (PA.01)
      The Rising edge is used as active edge,
   ------------------------------------------------------------ */
   TIM_ICInitTypeDef  TIM_ICInitStructure;
@@ -87,7 +87,7 @@
   NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
   NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
   NVIC_Init(&NVIC_InitStructure);
- 
+
   /* TIM2 enable counter */
   TIM_Cmd(TIM2, ENABLE);
 
@@ -102,7 +102,7 @@
 
 
 void tim2_irq_handler(void) {
-  
+
   if(TIM_GetITStatus(TIM2, TIM_IT_CC2) == SET) {
     TIM_ClearITPendingBit(TIM2, TIM_IT_CC2);
 

Modified: paparazzi3/trunk/sw/airborne/arch/stm32/radio_control/ppm_arch.h
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/stm32/radio_control/ppm_arch.h    
2010-10-25 15:01:42 UTC (rev 6233)
+++ paparazzi3/trunk/sw/airborne/arch/stm32/radio_control/ppm_arch.h    
2010-10-25 15:21:46 UTC (rev 6234)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- *  
+ *
  * Copyright (C) 2010 The Paparazzi Team
  *
  * This file is part of paparazzi.
@@ -18,7 +18,7 @@
  * 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. 
+ * Boston, MA 02111-1307, USA.
  */
 
 /** \file booz_radio_control_ppm_hw.h
@@ -26,7 +26,7 @@
  *
  */
 
-/** 
+/**
  * On tiny (and booz) the ppm counter is running at the same speed as
  * the systic counter. There is no reason for this to be true.
  * Let's add a pair of macros to make it possible for them to be different.

Modified: 
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/radio_control/booz_radio_control_ppm_arch.c
===================================================================
--- 
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/radio_control/booz_radio_control_ppm_arch.c
    2010-10-25 15:01:42 UTC (rev 6233)
+++ 
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/radio_control/booz_radio_control_ppm_arch.c
    2010-10-25 15:21:46 UTC (rev 6234)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- *  
+ *
  * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
  *
  * This file is part of paparazzi.
@@ -18,7 +18,7 @@
  * 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. 
+ * Boston, MA 02111-1307, USA.
  */
 
 #include "booz_radio_control.h"

Modified: 
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/radio_control/booz_radio_control_ppm_arch.h
===================================================================
--- 
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/radio_control/booz_radio_control_ppm_arch.h
    2010-10-25 15:01:42 UTC (rev 6233)
+++ 
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/radio_control/booz_radio_control_ppm_arch.h
    2010-10-25 15:21:46 UTC (rev 6234)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- *  
+ *
  * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
  *
  * This file is part of paparazzi.
@@ -18,7 +18,7 @@
  * 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. 
+ * Boston, MA 02111-1307, USA.
  */
 
 #ifndef BOOZ_RADIO_CONTROL_PPM_ARCH_H
@@ -28,7 +28,7 @@
 #include "LPC21xx.h"
 #include BOARD_CONFIG
 
-/** 
+/**
  * On tiny (and booz) the ppm counter is running at the same speed as
  * the systic counter. There is no reason for this to be true.
  * Let's add a pair of macros to make it possible for them to be different.
@@ -44,28 +44,28 @@
 
 #define RADIO_CONTROL_PPM_IT PPM_CRI
 #define RADIO_CONTROL_PPM_ISR() {                                      \
-                                                                       \
+                                    \
     uint32_t now = PPM_CR;                                             \
     uint32_t length = now - booz_radio_control_ppm_last_pulse_time;    \
     booz_radio_control_ppm_last_pulse_time = now;                      \
-                                                                       \
+                                        \
     if (booz_radio_control_ppm_cur_pulse == RADIO_CONTROL_NB_CHANNEL) {        
\
       if (length > SYS_TICS_OF_USEC(PPM_SYNC_MIN_LEN) &&               \
-         length < SYS_TICS_OF_USEC(PPM_SYNC_MAX_LEN)) {                \
-       booz_radio_control_ppm_cur_pulse = 0;                           \
+      length < SYS_TICS_OF_USEC(PPM_SYNC_MAX_LEN)) {           \
+    booz_radio_control_ppm_cur_pulse = 0;                              \
       }                                                                        
\
     }                                                                  \
     else {                                                             \
       if (length > SYS_TICS_OF_USEC(PPM_DATA_MIN_LEN) &&               \
-         length < SYS_TICS_OF_USEC(PPM_DATA_MAX_LEN)) {                \
-       booz_radio_control_ppm_pulses[booz_radio_control_ppm_cur_pulse] = 
length; \
-       booz_radio_control_ppm_cur_pulse++;                             \
-       if (booz_radio_control_ppm_cur_pulse == RADIO_CONTROL_NB_CHANNEL) { \
-         booz_radio_control_ppm_frame_available = TRUE;                \
-       }                                                               \
+      length < SYS_TICS_OF_USEC(PPM_DATA_MAX_LEN)) {           \
+    booz_radio_control_ppm_pulses[booz_radio_control_ppm_cur_pulse] = length; \
+    booz_radio_control_ppm_cur_pulse++;                                \
+    if (booz_radio_control_ppm_cur_pulse == RADIO_CONTROL_NB_CHANNEL) { \
+      booz_radio_control_ppm_frame_available = TRUE;           \
+    }                                                          \
       }                                                                        
\
       else                                                             \
-       booz_radio_control_ppm_cur_pulse = RADIO_CONTROL_NB_CHANNEL;    \
+    booz_radio_control_ppm_cur_pulse = RADIO_CONTROL_NB_CHANNEL;       \
     }                                                                  \
   }
 

Modified: 
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/radio_control/booz_radio_control_spektrum_arch.c
===================================================================
--- 
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/radio_control/booz_radio_control_spektrum_arch.c
       2010-10-25 15:01:42 UTC (rev 6233)
+++ 
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/radio_control/booz_radio_control_spektrum_arch.c
       2010-10-25 15:21:46 UTC (rev 6234)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- *  
+ *
  * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
  *
  * This file is part of paparazzi.
@@ -18,7 +18,7 @@
  * 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. 
+ * Boston, MA 02111-1307, USA.
  */
 
 #include "booz_radio_control.h"
@@ -33,7 +33,3 @@
   rc_spk_parser_status = RC_SPK_STA_UNINIT;
   rc_spk_parser_idx = 0;
 }
-
-
-
-

Modified: 
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/radio_control/booz_radio_control_spektrum_arch.h
===================================================================
--- 
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/radio_control/booz_radio_control_spektrum_arch.h
       2010-10-25 15:01:42 UTC (rev 6233)
+++ 
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/radio_control/booz_radio_control_spektrum_arch.h
       2010-10-25 15:21:46 UTC (rev 6234)
@@ -1,6 +1,6 @@
 /*
  * Paparazzi $Id$
- *  
+ *
  * Copyright (C) 2009-2010 The Paparazzi Team
  *
  * This file is part of paparazzi.
@@ -40,7 +40,7 @@
 extern uint8_t  rc_spk_parser_idx;
 extern uint8_t  rc_spk_parser_buf[RADIO_CONTROL_NB_CHANNEL*2];
 
-#define MAX_SPK 344 
+#define MAX_SPK 344
 
 
 extern const int16_t rc_spk_throw[RADIO_CONTROL_NB_CHANNEL];
@@ -76,24 +76,24 @@
           radio_control.frame_cpt++;                                   \
           radio_control.time_since_last_frame = 0;                     \
           radio_control.status = RADIO_CONTROL_OK;                     \
-         uint8_t i;                                                    \
-         for (i=0;i<RADIO_CONTROL_NB_CHANNEL;i++) {                    \
-           const int16_t tmp = (rc_spk_parser_buf[2*i]<<8) +           \
-                                rc_spk_parser_buf[2*i+1];              \
-           /*const int16_t chan = (tmp&0xFC00) >> 10;*/                \
-           const int16_t val  = (tmp&0x03FF) - 512;                    \
-           radio_control.values[i] = val;                              \
-           radio_control.values[i] *= rc_spk_throw[i];                 \
-           if (i==RADIO_CONTROL_THROTTLE) {                            \
-             radio_control.values[i] += MAX_PPRZ;                      \
-             radio_control.values[i] /= 2;                             \
-           }                                                           \
-         }                                                             \
-         _received_frame_handler();                                    \
+      uint8_t i;                                                       \
+      for (i=0;i<RADIO_CONTROL_NB_CHANNEL;i++) {                       \
+        const int16_t tmp = (rc_spk_parser_buf[2*i]<<8) +              \
+                             rc_spk_parser_buf[2*i+1];         \
+        /*const int16_t chan = (tmp&0xFC00) >> 10;*/           \
+        const int16_t val  = (tmp&0x03FF) - 512;                       \
+        radio_control.values[i] = val;                         \
+        radio_control.values[i] *= rc_spk_throw[i];                    \
+        if (i==RADIO_CONTROL_THROTTLE) {                               \
+          radio_control.values[i] += MAX_PPRZ;                 \
+          radio_control.values[i] /= 2;                                \
+        }                                                              \
+      }                                                                \
+      _received_frame_handler();                                       \
         }                                                               \
         break;                                                          \
       default:                                                         \
-       rc_spk_parser_status = RC_SPK_STA_UNINIT;                       \
+    rc_spk_parser_status = RC_SPK_STA_UNINIT;                  \
       }                                                                 \
     }                                                                   \
   }

Modified: 
paparazzi3/trunk/sw/airborne/booz/arch/sim/radio_control/booz_radio_control_ppm_arch.h
===================================================================
--- 
paparazzi3/trunk/sw/airborne/booz/arch/sim/radio_control/booz_radio_control_ppm_arch.h
      2010-10-25 15:01:42 UTC (rev 6233)
+++ 
paparazzi3/trunk/sw/airborne/booz/arch/sim/radio_control/booz_radio_control_ppm_arch.h
      2010-10-25 15:21:46 UTC (rev 6234)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- *  
+ *
  * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
  *
  * This file is part of paparazzi.
@@ -18,7 +18,7 @@
  * 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. 
+ * Boston, MA 02111-1307, USA.
  */
 
 #ifndef BOOZ_RADIO_CONTROL_PPM_ARCH_H

Modified: 
paparazzi3/trunk/sw/airborne/booz/arch/stm32/radio_control/booz_radio_control_ppm_arch.c
===================================================================
--- 
paparazzi3/trunk/sw/airborne/booz/arch/stm32/radio_control/booz_radio_control_ppm_arch.c
    2010-10-25 15:01:42 UTC (rev 6233)
+++ 
paparazzi3/trunk/sw/airborne/booz/arch/stm32/radio_control/booz_radio_control_ppm_arch.c
    2010-10-25 15:21:46 UTC (rev 6234)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- *  
+ *
  * Copyright (C) 2010 The Paparazzi Team
  *
  * This file is part of paparazzi.
@@ -18,7 +18,7 @@
  * 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. 
+ * Boston, MA 02111-1307, USA.
  */
 
 #include "booz_radio_control.h"
@@ -56,18 +56,18 @@
 
   /* GPIOA clock enable */
   RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
-  
+
   /* Time Base configuration */
   TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
-  TIM_TimeBaseStructInit(&TIM_TimeBaseStructure); 
-  TIM_TimeBaseStructure.TIM_Period        = 0xFFFF;          
-  TIM_TimeBaseStructure.TIM_Prescaler     = 0x8; 
-  TIM_TimeBaseStructure.TIM_ClockDivision = 0x0; 
-  TIM_TimeBaseStructure.TIM_CounterMode   = TIM_CounterMode_Up;  
+  TIM_TimeBaseStructInit(&TIM_TimeBaseStructure);
+  TIM_TimeBaseStructure.TIM_Period        = 0xFFFF;
+  TIM_TimeBaseStructure.TIM_Prescaler     = 0x8;
+  TIM_TimeBaseStructure.TIM_ClockDivision = 0x0;
+  TIM_TimeBaseStructure.TIM_CounterMode   = TIM_CounterMode_Up;
   TIM_TimeBaseInit(TIM2, &TIM_TimeBaseStructure);
-  
+
  /* TIM2 configuration: Input Capture mode ---------------------
-     The external signal is connected to TIM2 CH2 pin (PA.01)  
+     The external signal is connected to TIM2 CH2 pin (PA.01)
      The Rising edge is used as active edge,
   ------------------------------------------------------------ */
   TIM_ICInitTypeDef  TIM_ICInitStructure;
@@ -85,7 +85,7 @@
   NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
   NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
   NVIC_Init(&NVIC_InitStructure);
- 
+
   /* TIM2 enable counter */
   TIM_Cmd(TIM2, ENABLE);
 
@@ -100,33 +100,33 @@
 
 
 void tim2_irq_handler(void) {
-  
+
   if(TIM_GetITStatus(TIM2, TIM_IT_CC2) == SET) {
     TIM_ClearITPendingBit(TIM2, TIM_IT_CC2);
-    
+
     uint32_t now = TIM_GetCapture2(TIM2) + timer_rollover_cnt;
     uint32_t length = now - booz_radio_control_ppm_last_pulse_time;
-    booz_radio_control_ppm_last_pulse_time = now;                      
-    
-    if (booz_radio_control_ppm_cur_pulse == RADIO_CONTROL_NB_CHANNEL) {        
-      if (length > RC_PPM_TICS_OF_USEC(PPM_SYNC_MIN_LEN) &&            
-         length < RC_PPM_TICS_OF_USEC(PPM_SYNC_MAX_LEN)) {             
-       booz_radio_control_ppm_cur_pulse = 0;
-      }                                                                        
-    }                                                                  
-    else {                                                             
-      if (length > RC_PPM_TICS_OF_USEC(PPM_DATA_MIN_LEN) &&            
-         length < RC_PPM_TICS_OF_USEC(PPM_DATA_MAX_LEN)) {             
-       booz_radio_control_ppm_pulses[booz_radio_control_ppm_cur_pulse] = 
length;
-       booz_radio_control_ppm_cur_pulse++;                             
-       if (booz_radio_control_ppm_cur_pulse == RADIO_CONTROL_NB_CHANNEL) { 
-         booz_radio_control_ppm_frame_available = TRUE;                
-       }                                                               
-      }                                                                        
+    booz_radio_control_ppm_last_pulse_time = now;
+
+    if (booz_radio_control_ppm_cur_pulse == RADIO_CONTROL_NB_CHANNEL) {
+      if (length > RC_PPM_TICS_OF_USEC(PPM_SYNC_MIN_LEN) &&
+      length < RC_PPM_TICS_OF_USEC(PPM_SYNC_MAX_LEN)) {
+    booz_radio_control_ppm_cur_pulse = 0;
+      }
+    }
+    else {
+      if (length > RC_PPM_TICS_OF_USEC(PPM_DATA_MIN_LEN) &&
+      length < RC_PPM_TICS_OF_USEC(PPM_DATA_MAX_LEN)) {
+    booz_radio_control_ppm_pulses[booz_radio_control_ppm_cur_pulse] = length;
+    booz_radio_control_ppm_cur_pulse++;
+    if (booz_radio_control_ppm_cur_pulse == RADIO_CONTROL_NB_CHANNEL) {
+      booz_radio_control_ppm_frame_available = TRUE;
+    }
+      }
       else {
-       booz_radio_control_ppm_cur_pulse = RADIO_CONTROL_NB_CHANNEL;    
+    booz_radio_control_ppm_cur_pulse = RADIO_CONTROL_NB_CHANNEL;
       }
-    }                                                                  
+    }
   }
   else if(TIM_GetITStatus(TIM2, TIM_IT_Update) == SET) {
     timer_rollover_cnt+=(1<<16);

Modified: 
paparazzi3/trunk/sw/airborne/booz/arch/stm32/radio_control/booz_radio_control_ppm_arch.h
===================================================================
--- 
paparazzi3/trunk/sw/airborne/booz/arch/stm32/radio_control/booz_radio_control_ppm_arch.h
    2010-10-25 15:01:42 UTC (rev 6233)
+++ 
paparazzi3/trunk/sw/airborne/booz/arch/stm32/radio_control/booz_radio_control_ppm_arch.h
    2010-10-25 15:21:46 UTC (rev 6234)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- *  
+ *
  * Copyright (C) 2010 The Paparazzi Team
  *
  * This file is part of paparazzi.
@@ -18,7 +18,7 @@
  * 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. 
+ * Boston, MA 02111-1307, USA.
  */
 
 /** \file booz_radio_control_ppm_hw.h
@@ -26,7 +26,7 @@
  *
  */
 
-/** 
+/**
  * On tiny (and booz) the ppm counter is running at the same speed as
  * the systic counter. There is no reason for this to be true.
  * Let's add a pair of macros to make it possible for them to be different.

Modified: 
paparazzi3/trunk/sw/airborne/booz/arch/stm32/radio_control/booz_radio_control_spektrum_arch.c
===================================================================
--- 
paparazzi3/trunk/sw/airborne/booz/arch/stm32/radio_control/booz_radio_control_spektrum_arch.c
       2010-10-25 15:01:42 UTC (rev 6233)
+++ 
paparazzi3/trunk/sw/airborne/booz/arch/stm32/radio_control/booz_radio_control_spektrum_arch.c
       2010-10-25 15:21:46 UTC (rev 6234)
@@ -1,8 +1,8 @@
 /*
  * $Id$
- *  
+ *
  * Copyright (C) 2010 Eric Parsonage <address@hidden>
- *               
+ *
  * This file is part of paparazzi.
  *
  * paparazzi is free software; you can redistribute it and/or modify
@@ -18,7 +18,7 @@
  * 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. 
+ * Boston, MA 02111-1307, USA.
  */
 
 #include <stdint.h>
@@ -40,14 +40,14 @@
 #define MAX_DELAY   INT16_MAX
 /* the frequency of the delay timer */
 #define DELAY_TIM_FREQUENCY 1000000
-/* Number of low pulses sent to satellite receivers */ 
-#define MASTER_RECEIVER_PULSES 5 
+/* Number of low pulses sent to satellite receivers */
+#define MASTER_RECEIVER_PULSES 5
 #define SLAVE_RECEIVER_PULSES 6
 
-/* The line that is pulled low at power up to initiate the bind process */  
+/* The line that is pulled low at power up to initiate the bind process */
 #define BIND_PIN GPIO_Pin_3
 #define BIND_PIN_PORT GPIOC
-#define BIND_PIN_PERIPH RCC_APB2Periph_GPIOC 
+#define BIND_PIN_PERIPH RCC_APB2Periph_GPIOC
 
 #define TIM_FREQ_1000000 1000000
 #define TIM_TICS_FOR_100us 100
@@ -56,11 +56,11 @@
 
 /*
  * in the makefile we set RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT to be Uartx
- * but in uart_hw.c the initialisation functions are 
- * defined as uartx these macros give us the glue 
- * that allows static calls at compile time 
+ * but in uart_hw.c the initialisation functions are
+ * defined as uartx these macros give us the glue
+ * that allows static calls at compile time
  */
- 
+
 #define __PrimaryUart(dev, _x) dev##_x
 #define _PrimaryUart(dev, _x)  __PrimaryUart(dev, _x)
 #define PrimaryUart(_x) _PrimaryUart(RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT, _x)
@@ -79,13 +79,13 @@
     uint8_t SecondFrame;
     uint16_t LostFrameCnt;
     uint8_t RcAvailable;
-    int16_t values[SPEKTRUM_CHANNELS_PER_FRAME*MAX_SPEKTRUM_FRAMES];     
+    int16_t values[SPEKTRUM_CHANNELS_PER_FRAME*MAX_SPEKTRUM_FRAMES];
 };
 
 typedef struct SpektrumStateStruct SpektrumStateType;
 
 SpektrumStateType PrimarySpektrumState = {1,0,0,0,0,0,0,0,0};
-#ifdef RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT 
+#ifdef RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT
 SpektrumStateType SecondarySpektrumState = {1,0,0,0,0,0,0,0,0};
 #endif
 
@@ -98,19 +98,19 @@
  * Rudder     3
  * Gear       4
  * Flap/Aux1  5
- * Aux2       6 
+ * Aux2       6
  * Aux3       7
  * Aux4       8
  * Aux5       9
  * Aux6      10
- * Aux7      11      
+ * Aux7      11
  */
- 
+
 /* reverse some channels to suit Paparazzi conventions          */
 /* the maximum number of channels a Spektrum can transmit is 12 */
 int8_t SpektrumSigns[] = RADIO_CONTROL_SPEKTRUM_SIGNS;
 
-/* Parser state variables */ 
+/* Parser state variables */
 static uint8_t EncodingType = 0;
 static uint8_t ExpectedFrames = 0;
 /* initialise the uarts used by the parser */
@@ -123,7 +123,7 @@
 /* wait busy loop, microseconds */
 static void DelayUs( uint16_t uSecs );
 /* wait busy loop, milliseconds */
-static void DelayMs( uint16_t mSecs ); 
+static void DelayMs( uint16_t mSecs );
 /* setup timer 1 for busy wait delays */
 static void SpektrumDelayInit( void );
 
@@ -135,16 +135,16 @@
  *****************************************************************************/
 void radio_control_impl_init(void) {
   SpektrumTimerInit();
-  // DebugInit();  
-  SpektrumUartInit(); 
+  // DebugInit();
+  SpektrumUartInit();
 }
 
 /*****************************************************************************
- * The bind function means that the satellite receivers believe they are 
- * connected to a 9 channel JR-R921 24 receiver thus during the bind process 
- * they try to get the transmitter to transmit at the highest resolution that 
- * it can manage. The data is contained in 16 byte packets transmitted at 
- * 115200 baud. Depending on the transmitter either 1 or 2 frames are required 
+ * The bind function means that the satellite receivers believe they are
+ * connected to a 9 channel JR-R921 24 receiver thus during the bind process
+ * they try to get the transmitter to transmit at the highest resolution that
+ * it can manage. The data is contained in 16 byte packets transmitted at
+ * 115200 baud. Depending on the transmitter either 1 or 2 frames are required
  * to contain the data for all channels. These frames are either 11ms or 22ms
  * apart.
  *
@@ -182,19 +182,19 @@
  * 0x01 From a Spektrum DX7eu which transmits a single frame containing all
  * channel data every 22ms with 10bit resolution.
  *
- * 0x02 From a Spektrum DM9 module which transmits two frames to carry the 
+ * 0x02 From a Spektrum DM9 module which transmits two frames to carry the
  * data for all channels 11ms apart with 10bit resolution.
  *
- * 0x12 From a Spektrum DX7se which transmits two frames to carry the 
- * data for all channels 11ms apart with 11bit resolution. 
+ * 0x12 From a Spektrum DX7se which transmits two frames to carry the
+ * data for all channels 11ms apart with 11bit resolution.
  *
- * 0x12 From a JR X9503 which transmits two frames to carry the 
+ * 0x12 From a JR X9503 which transmits two frames to carry the
  * data for all channels 11ms apart with 11bit resolution.
  *
  * 0x01 From a Spektrum DX7 which transmits a single frame containing all
  * channel data every 22ms with 10bit resolution.
  *
- * 0x12 From a JR DSX12 which transmits two frames to carry the 
+ * 0x12 From a JR DSX12 which transmits two frames to carry the
  * data for all channels 11ms apart with 11bit resolution.
  *
  * 0x1 From a Spektru DX5e which transmits a single frame containing all
@@ -208,38 +208,38 @@
  * [0 0 0 R 0 0 N1 N0]
  *
  * where :
- * 
+ *
  * 0 means a '0' bit
  * R: 0 for 10 bit resolution 1 for 11 bit resolution channel data
  * N1 to N0 is the number of frames required to receive all channel
- * data. 
+ * data.
  *
  * Channels can have either 10bit or 11bit resolution. Data from a tranmitter
  * with 10 bit resolution has the form:
  *
  * [F 0 C3 C2 C1 C0 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0]
- * 
+ *
  * Data from a tranmitter with 11 bit resolution has the form
  *
  * [F C3 C2 C1 C0 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0]
  *
  * where :
- * 
+ *
  * 0 means a '0' bit
- * F: Normally 0 but set to 1 for the first channel of the 2nd frame if a 
- * second frame is transmitted. 
+ * F: Normally 0 but set to 1 for the first channel of the 2nd frame if a
+ * second frame is transmitted.
  *
- * C3 to C0 is the channel number, 4 bit, matching the numbers allocated in 
+ * C3 to C0 is the channel number, 4 bit, matching the numbers allocated in
  * the transmitter.
  *
- * D9 to D0 is the channel data (10 bit) 0xaa..0x200..0x356 for 
+ * D9 to D0 is the channel data (10 bit) 0xaa..0x200..0x356 for
  * 100% transmitter-travel
  *
  *
  * D10 to D0 is the channel data (11 bit) 0x154..0x400..0x6AC for
  * 100% transmitter-travel
  *****************************************************************************/
- 
+
  /*****************************************************************************
  *
  * Spektrum Parser captures frame data by using time between frames to sync on
@@ -358,27 +358,27 @@
 
 /*****************************************************************************
  *
- * RadioControlEventImp decodes channel data stored by uart irq handlers 
+ * RadioControlEventImp decodes channel data stored by uart irq handlers
  * and calls callback funtion
  *
  *****************************************************************************/
 
-void RadioControlEventImp(void (*frame_handler)(void)) {                       
                                 
+void RadioControlEventImp(void (*frame_handler)(void)) {
   uint8_t ChannelCnt;
   uint8_t ChannelNum;
   uint16_t ChannelData;
   uint8_t MaxChannelNum = 0;
-   
-#ifdef RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT 
-  /* If we have two receivers and at least one of them has new data */   
+
+#ifdef RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT
+  /* If we have two receivers and at least one of them has new data */
   uint8_t BestReceiver;
-  if ((PrimarySpektrumState.RcAvailable) || 
+  if ((PrimarySpektrumState.RcAvailable) ||
       (SecondarySpektrumState.RcAvailable)) {
     /* if both receivers have new data select the one  */
     /* that has had the least number of frames lost    */
-    if ((PrimarySpektrumState.RcAvailable) && 
+    if ((PrimarySpektrumState.RcAvailable) &&
         (SecondarySpektrumState.RcAvailable)) {
-      BestReceiver  = (PrimarySpektrumState.LostFrameCnt 
+      BestReceiver  = (PrimarySpektrumState.LostFrameCnt
                        <= SecondarySpektrumState.LostFrameCnt) ? 0 : 1;
     } else {
       /* if only one of the receivers have new data use it */
@@ -386,59 +386,59 @@
     }
     /* clear the data ready flags */
     PrimarySpektrumState.RcAvailable = 0;
-    SecondarySpektrumState.RcAvailable = 0;  
+    SecondarySpektrumState.RcAvailable = 0;
 
-#else 
-  /* if we have one receiver and it has new data */  
+#else
+  /* if we have one receiver and it has new data */
   if(PrimarySpektrumState.RcAvailable) {
     PrimarySpektrumState.RcAvailable = 0;
-#endif       
+#endif
     ChannelCnt = 0;
     /* for every piece of channel data we have received */
     for(int i = 0; (i < SPEKTRUM_CHANNELS_PER_FRAME * ExpectedFrames); i++) {
-#ifndef RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT 
+#ifndef RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT
       ChannelData = PrimarySpektrumState.values[i];
-#else                     
+#else
       ChannelData = (!BestReceiver) ? PrimarySpektrumState.values[i] :
                                  SecondarySpektrumState.values[i];
-#endif             
+#endif
       /* find out the channel number and its value by  */
       /* using the EncodingType which is only received */
-      /* from the main receiver                        */  
+      /* from the main receiver                        */
       switch(EncodingType) {
         case(0) : /* 10 bit */
-          ChannelNum = (ChannelData >> 10) & 0x0f; 
+          ChannelNum = (ChannelData >> 10) & 0x0f;
           /* don't bother decoding unused channels */
           if (ChannelNum < RADIO_CONTROL_NB_CHANNEL) {
-           SpektrumBuf[ChannelNum] = ChannelData & 0x3ff;       
-           SpektrumBuf[ChannelNum] -= 0x200; 
+           SpektrumBuf[ChannelNum] = ChannelData & 0x3ff;
+           SpektrumBuf[ChannelNum] -= 0x200;
            SpektrumBuf[ChannelNum] *= MAX_PPRZ/0x156;
            ChannelCnt++;
-          }           
+          }
           break;
-        
+
         case(1) : /* 11 bit */
           ChannelNum = (ChannelData >> 11) & 0x0f;
           /* don't bother decoding unused channels */
           if (ChannelNum < RADIO_CONTROL_NB_CHANNEL) {
             SpektrumBuf[ChannelNum] = ChannelData & 0x7ff;
-            SpektrumBuf[ChannelNum] -= 0x400;               
-            SpektrumBuf[ChannelNum] *= MAX_PPRZ/0x2AC;        
-            ChannelCnt++;                 
-          } 
+            SpektrumBuf[ChannelNum] -= 0x400;
+            SpektrumBuf[ChannelNum] *= MAX_PPRZ/0x2AC;
+            ChannelCnt++;
+          }
           break;
-             
+
         default : ChannelNum = 0x0F; break;  /* never going to get here */
       }
       /* store the value of the highest valid channel */
       if ((ChannelNum != 0x0F) && (ChannelNum > MaxChannelNum))
-        MaxChannelNum = ChannelNum; 
-        
+        MaxChannelNum = ChannelNum;
+
     }
-    
-    /* if we have a valid frame the pass it to the frame handler */ 
+
+    /* if we have a valid frame the pass it to the frame handler */
     if (ChannelCnt >= (MaxChannelNum + 1)) {
-      radio_control.frame_cpt++;                                       
+      radio_control.frame_cpt++;
       radio_control.time_since_last_frame = 0;
       radio_control.status = RADIO_CONTROL_OK;
       for (int i = 0; i < (MaxChannelNum + 1); i++) {
@@ -449,47 +449,47 @@
         }
         radio_control.values[i] *= SpektrumSigns[i];
       }
-      (*frame_handler)();  
-    }   
+      (*frame_handler)();
+    }
   }
 }
 
- 
+
 /*****************************************************************************
  *
  * Initialise TIM6 to fire an interrupt every 100 microseconds to provide
  * timebase for SpektrumParser
  *
- 
*****************************************************************************/ 
+ *****************************************************************************/
 void SpektrumTimerInit( void ) {
 
   /* enable TIM6 clock */
   RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM6, ENABLE);
-  
+
   /* TIM6 configuration */
   TIM_TimeBaseInitTypeDef  TIM_TimeBaseStructure;
   TIM_TimeBaseStructInit(&TIM_TimeBaseStructure);
   /* 100 microseconds ie 0.1 millisecond */
-  TIM_TimeBaseStructure.TIM_Period = TIM_TICS_FOR_100us-1; 
+  TIM_TimeBaseStructure.TIM_Period = TIM_TICS_FOR_100us-1;
   TIM_TimeBaseStructure.TIM_Prescaler = ((AHB_CLK / TIM_FREQ_1000000) - 1);
-  TIM_TimeBaseStructure.TIM_ClockDivision = TIM_CKD_DIV1;   
-  TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Down; 
+  TIM_TimeBaseStructure.TIM_ClockDivision = TIM_CKD_DIV1;
+  TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Down;
   TIM_TimeBaseInit(TIM6, &TIM_TimeBaseStructure);
-  
+
   /* Enable TIM6 interrupts */
   NVIC_InitTypeDef NVIC_InitStructure;
-  
+
   /* Enable and configure TIM6 IRQ channel */
   NVIC_InitStructure.NVIC_IRQChannel = TIM6_IRQn;
   NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 2;
   NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
   NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
   NVIC_Init(&NVIC_InitStructure);
-  
+
   /* Enable TIM6 Update interrupt */
   TIM_ITConfig(TIM6, TIM_IT_Update, ENABLE);
-  TIM_ClearFlag(TIM6, TIM_FLAG_Update); 
-  
+  TIM_ClearFlag(TIM6, TIM_FLAG_Update);
+
   /* TIM6 enable counter */
   TIM_Cmd(TIM6, ENABLE);
 }
@@ -500,20 +500,20 @@
  *
  *****************************************************************************/
 void tim6_irq_handler( void ) {
-  
+
   TIM_ClearITPendingBit(TIM6, TIM_IT_Update);
-  
-  if (PrimarySpektrumState.SpektrumTimer) 
-    --PrimarySpektrumState.SpektrumTimer; 
-#ifdef RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT    
-  if (SecondarySpektrumState.SpektrumTimer) 
+
+  if (PrimarySpektrumState.SpektrumTimer)
+    --PrimarySpektrumState.SpektrumTimer;
+#ifdef RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT
+  if (SecondarySpektrumState.SpektrumTimer)
     --SecondarySpektrumState.SpektrumTimer;
-#endif      
+#endif
 }
 
 /*****************************************************************************
  *
- * Initialise the uarts for the spektrum satellite receivers 
+ * Initialise the uarts for the spektrum satellite receivers
  *
  *****************************************************************************/
 void SpektrumUartInit(void) {
@@ -521,7 +521,7 @@
   PrimaryUart(_remap);
   PrimaryUart(_clk)(PrimaryUart(_UartPeriph), ENABLE);;
   //RCC_APB1PeriphClockCmd(PrimaryUart(_UartPeriph), ENABLE);
- 
+
   /* Enable USART interrupts */
   NVIC_InitTypeDef nvic;
   nvic.NVIC_IRQChannel = PrimaryUart(_IRQn);
@@ -533,7 +533,7 @@
   GPIO_InitTypeDef GPIO_InitStructure;
   GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
   /* Primary UART Rx pin as floating input */
-  GPIO_InitStructure.GPIO_Pin   = PrimaryUart(_RxPin); 
+  GPIO_InitStructure.GPIO_Pin   = PrimaryUart(_RxPin);
   GPIO_InitStructure.GPIO_Mode  = GPIO_Mode_IN_FLOATING;
   GPIO_Init(PrimaryUart(_RxPort), &GPIO_InitStructure);
   /* Configure Primary UART */
@@ -549,9 +549,9 @@
   USART_ITConfig(PrimaryUart(_reg), USART_IT_RXNE, ENABLE);
   /* Enable the Primary UART */
   USART_Cmd(PrimaryUart(_reg), ENABLE);
-  
-  
-#ifdef RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT  
+
+
+#ifdef RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT
    /* init RCC */
   SecondaryUart(_remap);
   SecondaryUart(_clk)(SecondaryUart(_UartPeriph), ENABLE);
@@ -565,10 +565,10 @@
   /* Init GPIOS */;
   GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
   /* Secondary UART Rx pin as floating input */
-  GPIO_InitStructure.GPIO_Pin   = SecondaryUart(_RxPin); 
+  GPIO_InitStructure.GPIO_Pin   = SecondaryUart(_RxPin);
   GPIO_InitStructure.GPIO_Mode  = GPIO_Mode_IN_FLOATING;
   GPIO_Init(SecondaryUart(_RxPort), &GPIO_InitStructure);
-  /* Configure secondary UART */ 
+  /* Configure secondary UART */
   usart.USART_BaudRate            = B115200;
   usart.USART_WordLength          = USART_WordLength_8b;
   usart.USART_StopBits            = USART_StopBits_1;
@@ -580,44 +580,44 @@
   USART_ITConfig(SecondaryUart(_reg), USART_IT_RXNE, ENABLE);
   /* Enable the Primary UART */
   USART_Cmd(SecondaryUart(_reg), ENABLE);
-#endif  
-  
+#endif
+
 }
 
 /*****************************************************************************
  *
- * The primary receiver UART interrupt request handler which passes the 
+ * The primary receiver UART interrupt request handler which passes the
  * received character to Spektrum Parser.
  *
  *****************************************************************************/
 void PrimaryUart(_irq_handler)(void) {
-  
+
   if(USART_GetITStatus(PrimaryUart(_reg), USART_IT_TXE) != RESET) {
       USART_ITConfig(PrimaryUart(_reg), USART_IT_TXE, DISABLE);
   }
-  
+
   if(USART_GetITStatus(PrimaryUart(_reg), USART_IT_RXNE) != RESET) {
     uint8_t b =  USART_ReceiveData(PrimaryUart(_reg));
-    SpektrumParser(b, PrimarySpektrumState, 0);      
+    SpektrumParser(b, PrimarySpektrumState, 0);
   }
 }
 
 /*****************************************************************************
  *
- * The secondary receiver UART interrupt request handler which passes the 
+ * The secondary receiver UART interrupt request handler which passes the
  * received character to Spektrum Parser.
  *
  *****************************************************************************/
 #ifdef RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT
 void SecondaryUart(_irq_handler)(void) {
-  
+
   if(USART_GetITStatus(SecondaryUart(_reg), USART_IT_TXE) != RESET) {
       USART_ITConfig(SecondaryUart(_reg), USART_IT_TXE, DISABLE);
   }
-  
+
   if(USART_GetITStatus(SecondaryUart(_reg), USART_IT_RXNE) != RESET) {
     uint8_t b =  USART_ReceiveData(SecondaryUart(_reg));
-    SpektrumParser(b, SecondarySpektrumState, 1);       
+    SpektrumParser(b, SecondarySpektrumState, 1);
   }
 }
 #endif
@@ -633,39 +633,39 @@
   GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5;
   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
   GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
-  GPIO_Init(GPIOC, &GPIO_InitStructure);  
-  GPIO_WriteBit(GPIOC, GPIO_Pin_5 , Bit_RESET );       
+  GPIO_Init(GPIOC, &GPIO_InitStructure);
+  GPIO_WriteBit(GPIOC, GPIO_Pin_5 , Bit_RESET );
 }
 
 /*****************************************************************************
  *
- * The following functions provide functionality to allow binding of 
+ * The following functions provide functionality to allow binding of
  * spektrum satellite receivers. The pulse train sent to them means
  * that Lisa is emulating a 9 channel JR-R921 24.
  *
  *****************************************************************************/
 /*****************************************************************************
  *
- * radio_control_spektrum_try_bind(void) must called on powerup as spektrum 
- * satellites can only bind immediately after power up also it must be called 
- * before the call to SpektrumUartInit as we leave them with their Rx pins set 
+ * radio_control_spektrum_try_bind(void) must called on powerup as spektrum
+ * satellites can only bind immediately after power up also it must be called
+ * before the call to SpektrumUartInit as we leave them with their Rx pins set
  * as outputs.
  *
- 
*****************************************************************************/  
  
+ *****************************************************************************/
 void radio_control_spektrum_try_bind(void) {
-  
+
   /* init RCC */
   RCC_APB2PeriphClockCmd(BIND_PIN_PERIPH , ENABLE);
-  
+
   /* Init GPIO for the bind pin */
   GPIO_InitTypeDef GPIO_InitStructure;
   GPIO_InitStructure.GPIO_Pin = BIND_PIN;
   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
   GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
   GPIO_Init(BIND_PIN_PORT, &GPIO_InitStructure);
-  /* exit if the BIND_PIN is high, it needs to 
+  /* exit if the BIND_PIN is high, it needs to
      be pulled low at startup to initiate bind */
-  if (GPIO_ReadInputDataBit(BIND_PIN_PORT, BIND_PIN)) 
+  if (GPIO_ReadInputDataBit(BIND_PIN_PORT, BIND_PIN))
     return;
 
   /* bind initiated, initialise the delay timer */
@@ -692,20 +692,20 @@
   GPIO_WriteBit(SecondaryUart(_RxPort), SecondaryUart(_RxPin) , Bit_SET );
 #endif
 
-  /* We have no idea how long the window for allowing binding after  
-     power up is .This works for the moment but will need revisiting */        
+  /* We have no idea how long the window for allowing binding after
+     power up is .This works for the moment but will need revisiting */
   DelayMs(61);
 
-  for (int i = 0; i < MASTER_RECEIVER_PULSES ; i++) 
+  for (int i = 0; i < MASTER_RECEIVER_PULSES ; i++)
   {
     GPIO_WriteBit(PrimaryUart(_RxPort), PrimaryUart(_RxPin), Bit_RESET );
     DelayUs(118);
     GPIO_WriteBit(PrimaryUart(_RxPort), PrimaryUart(_RxPin), Bit_SET );
     DelayUs(122);
   }
-  
+
 #ifdef RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT
-  for (int i = 0; i < SLAVE_RECEIVER_PULSES; i++) 
+  for (int i = 0; i < SLAVE_RECEIVER_PULSES; i++)
   {
     GPIO_WriteBit(SecondaryUart(_RxPort), SecondaryUart(_RxPin), Bit_RESET );
     DelayUs(120);
@@ -720,20 +720,20 @@
  * Functions to implement busy wait loops with micro second granularity
  *
  *****************************************************************************/
- 
-/* set TIM6 to run at DELAY_TIM_FREQUENCY */ 
+
+/* set TIM6 to run at DELAY_TIM_FREQUENCY */
 static void SpektrumDelayInit( void ) {
   /* Enable timer clock */
   RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM6, ENABLE);
   /* Time base configuration */
   TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
-  TIM_TimeBaseStructInit(&TIM_TimeBaseStructure); 
+  TIM_TimeBaseStructInit(&TIM_TimeBaseStructure);
   TIM_TimeBaseStructure.TIM_Prescaler = (AHB_CLK / DELAY_TIM_FREQUENCY) - 1;
-  TIM_TimeBaseStructure.TIM_Period = UINT16_MAX; 
+  TIM_TimeBaseStructure.TIM_Period = UINT16_MAX;
   TIM_TimeBaseStructure.TIM_ClockDivision = 0;
   TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;
   TIM_TimeBaseInit(TIM6, &TIM_TimeBaseStructure);
-  
+
  /* Enable counter */
   TIM_Cmd(TIM6, ENABLE);
 }

Modified: 
paparazzi3/trunk/sw/airborne/booz/arch/stm32/radio_control/booz_radio_control_spektrum_arch.h
===================================================================
--- 
paparazzi3/trunk/sw/airborne/booz/arch/stm32/radio_control/booz_radio_control_spektrum_arch.h
       2010-10-25 15:01:42 UTC (rev 6233)
+++ 
paparazzi3/trunk/sw/airborne/booz/arch/stm32/radio_control/booz_radio_control_spektrum_arch.h
       2010-10-25 15:21:46 UTC (rev 6234)
@@ -1,6 +1,6 @@
 /*
- * Paparazzi $Id$  
- *  
+ * Paparazzi $Id$
+ *
  * Copyright (C) 2010 Eric Parsonage <address@hidden>
  *
  * This file is part of paparazzi.
@@ -26,15 +26,15 @@
 #define BOOZ_RADIO_CONTROL_SPEKTRUM_ARCH_H
 
 
-/* 
+/*
  * All Spektrum and JR 2.4 GHz transmitters
  * have the same channel assignments.
- */ 
- 
+ */
 
-#ifndef RADIO_CONTROL_NB_CHANNEL 
+
+#ifndef RADIO_CONTROL_NB_CHANNEL
 #define RADIO_CONTROL_NB_CHANNEL 12
-#endif 
+#endif
 
 
 #define RADIO_CONTROL_THROTTLE   0
@@ -53,14 +53,14 @@
 
 /* reverse some channels to suit Paparazzi conventions          */
 /* the maximum number of channels a Spektrum can transmit is 12 */
-#ifndef RADIO_CONTROL_SPEKTRUM_SIGNS 
+#ifndef RADIO_CONTROL_SPEKTRUM_SIGNS
 #define RADIO_CONTROL_SPEKTRUM_SIGNS {1,1,-1,1,1,-1,1,1,1,1,1,1}
 #endif
 
-/* really for a 9 channel transmitter 
+/* really for a 9 channel transmitter
    we would swap the order of these */
 #ifndef RADIO_CONTROL_MODE
-#define RADIO_CONTROL_MODE       RADIO_CONTROL_GEAR 
+#define RADIO_CONTROL_MODE       RADIO_CONTROL_GEAR
 #endif
 
 extern void RadioControlEventImp(void (*_received_frame_handler)(void));

Modified: paparazzi3/trunk/sw/airborne/booz/booz_radio_control.c
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/booz_radio_control.c      2010-10-25 
15:01:42 UTC (rev 6233)
+++ paparazzi3/trunk/sw/airborne/booz/booz_radio_control.c      2010-10-25 
15:21:46 UTC (rev 6234)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- *  
+ *
  * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
  *
  * This file is part of paparazzi.
@@ -18,7 +18,7 @@
  * 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. 
+ * Boston, MA 02111-1307, USA.
  */
 
 #include "booz_radio_control.h"
@@ -41,17 +41,17 @@
 
 
 void radio_control_periodic(void) {
- 
+
   /* compute frame rate */
   RunOnceEvery(60, {
       radio_control.frame_rate = radio_control.frame_cpt;
       radio_control.frame_cpt = 0;
     });
-  
+
   /* check for timeouts */
   if (radio_control.time_since_last_frame >= RADIO_CONTROL_REALLY_LOST_TIME) {
     radio_control.status = RADIO_CONTROL_REALLY_LOST;
-  } 
+  }
   else {
     if (radio_control.time_since_last_frame >= RADIO_CONTROL_LOST_TIME) {
       radio_control.status = RADIO_CONTROL_LOST;

Modified: paparazzi3/trunk/sw/airborne/booz/booz_radio_control.h
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/booz_radio_control.h      2010-10-25 
15:01:42 UTC (rev 6233)
+++ paparazzi3/trunk/sw/airborne/booz/booz_radio_control.h      2010-10-25 
15:21:46 UTC (rev 6234)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- *  
+ *
  * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
  *
  * This file is part of paparazzi.
@@ -18,7 +18,7 @@
  * 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. 
+ * Boston, MA 02111-1307, USA.
  */
 
 #ifndef BOOZ_RADIO_CONTROL_H
@@ -59,4 +59,3 @@
 
 
 #endif /* BOOZ_RADIO_CONTROL_H */
-

Modified: 
paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_dummy.c
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_dummy.c  
2010-10-25 15:01:42 UTC (rev 6233)
+++ paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_dummy.c  
2010-10-25 15:21:46 UTC (rev 6234)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- *  
+ *
  * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
  *
  * This file is part of paparazzi.
@@ -18,7 +18,7 @@
  * 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. 
+ * Boston, MA 02111-1307, USA.
  */
 
 #include "booz_radio_control.h"

Modified: 
paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_dummy.h
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_dummy.h  
2010-10-25 15:01:42 UTC (rev 6233)
+++ paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_dummy.h  
2010-10-25 15:21:46 UTC (rev 6234)
@@ -1,7 +1,7 @@
 /*
  * Paparazzi $Id$
- *  
- * Copyright (C) 2009 Pascal Brisset <address@hidden>, 
+ *
+ * Copyright (C) 2009 Pascal Brisset <address@hidden>,
  *                    Antoine Drouin <address@hidden>
  *
  * This file is part of paparazzi.
@@ -19,7 +19,7 @@
  * 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. 
+ * Boston, MA 02111-1307, USA.
  */
 
 #ifndef BOOZ_RADIO_CONTROL_NULL_H

Modified: 
paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_joby.c
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_joby.c   
2010-10-25 15:01:42 UTC (rev 6233)
+++ paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_joby.c   
2010-10-25 15:21:46 UTC (rev 6234)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- *  
+ *
  * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
  *
  * This file is part of paparazzi.
@@ -18,7 +18,7 @@
  * 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. 
+ * Boston, MA 02111-1307, USA.
  */
 
 #include "stdio.h"
@@ -48,7 +48,7 @@
       radio_control.status = RADIO_CONTROL_OK;
       radio_control.time_since_last_frame = 0;
       if (callback != NULL)
-       callback();
+    callback();
     }
   }
 }

Modified: 
paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_joby.h
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_joby.h   
2010-10-25 15:01:42 UTC (rev 6233)
+++ paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_joby.h   
2010-10-25 15:21:46 UTC (rev 6234)
@@ -1,7 +1,7 @@
 /*
  * Paparazzi $Id$
- *  
- * Copyright (C) 2009 Pascal Brisset <address@hidden>, 
+ *
+ * Copyright (C) 2009 Pascal Brisset <address@hidden>,
  *                    Antoine Drouin <address@hidden>
  *
  * This file is part of paparazzi.
@@ -19,7 +19,7 @@
  * 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. 
+ * Boston, MA 02111-1307, USA.
  */
 
 #ifndef BOOZ_RADIO_CONTROL_JOBY_H

Modified: 
paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_ppm.h
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_ppm.h    
2010-10-25 15:01:42 UTC (rev 6233)
+++ paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_ppm.h    
2010-10-25 15:21:46 UTC (rev 6234)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- *  
+ *
  * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
  *
  * This file is part of paparazzi.
@@ -18,25 +18,25 @@
  * 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. 
+ * Boston, MA 02111-1307, USA.
  */
 
 #ifndef BOOZ_RADIO_CONTROL_PPM_H
 #define BOOZ_RADIO_CONTROL_PPM_H
 
-/** 
- * Architecture dependant code 
+/**
+ * Architecture dependant code
  */
 #include "radio_control/booz_radio_control_ppm_arch.h"
 /* must be implemented by arch dependant code */
 extern void booz_radio_control_ppm_arch_init ( void );
 
 /**
- * Generated code holding the description of a given 
- * transmitter  
+ * Generated code holding the description of a given
+ * transmitter
  */
-#include "conf_radio_control_ppm.h" 
-                                     
+#include "conf_radio_control_ppm.h"
+
 /**
  *  ppm pulse type : futaba is falling edge clocked whereas JR is rising edge
  */

Modified: 
paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_spektrum.c
===================================================================
--- 
paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_spektrum.c   
    2010-10-25 15:01:42 UTC (rev 6233)
+++ 
paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_spektrum.c   
    2010-10-25 15:21:46 UTC (rev 6234)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- *  
+ *
  * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
  *
  * This file is part of paparazzi.
@@ -18,14 +18,14 @@
  * 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. 
+ * Boston, MA 02111-1307, USA.
  */
 
 #include "booz_radio_control_spektrum.h"
 
-/* Currently the functionality has been pushed into the arch directories 
+/* Currently the functionality has been pushed into the arch directories
  * both arch directories contain essentially the original parser.
  * The next step is to implement a new parser for lisa. Once this is complete
  * hardware dependent functions will be written for booz then the lisa parser
- * will end up in here 
+ * will end up in here
  */

Modified: 
paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_spektrum.h
===================================================================
--- 
paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_spektrum.h   
    2010-10-25 15:01:42 UTC (rev 6233)
+++ 
paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_spektrum.h   
    2010-10-25 15:21:46 UTC (rev 6234)
@@ -1,6 +1,6 @@
 /*
  * Paparazzi $Id$
- *  
+ *
  * Copyright (C) 2009-2010 The Paparazzi Team
  *
  * This file is part of paparazzi.

Modified: 
paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_spektrum_dx7se.h
===================================================================
--- 
paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_spektrum_dx7se.h
 2010-10-25 15:01:42 UTC (rev 6233)
+++ 
paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_spektrum_dx7se.h
 2010-10-25 15:21:46 UTC (rev 6234)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- *  
+ *
  * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
  *
  * This file is part of paparazzi.
@@ -18,7 +18,7 @@
  * 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. 
+ * Boston, MA 02111-1307, USA.
  */
 
 #ifndef BOOZ_RADIO_CONTROL_SPEKTRUM_DX7SE_H

Modified: 
paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_spektrum_dx7se_joby.h
===================================================================
--- 
paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_spektrum_dx7se_joby.h
    2010-10-25 15:01:42 UTC (rev 6233)
+++ 
paparazzi3/trunk/sw/airborne/booz/radio_control/booz_radio_control_spektrum_dx7se_joby.h
    2010-10-25 15:21:46 UTC (rev 6234)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- *  
+ *
  * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
  *
  * This file is part of paparazzi.
@@ -18,7 +18,7 @@
  * 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. 
+ * Boston, MA 02111-1307, USA.
  */
 
 #ifndef BOOZ_RADIO_CONTROL_SPEKTRUM_DX7SE_H




reply via email to

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