From 2d2e083b79adfd684c212b9c6449152ff2d260f5 Mon Sep 17 00:00:00 2001 From: Felix Ruess Date: Tue, 26 Oct 2010 11:21:07 +0000 Subject: [PATCH] clean more trailing whitespaces --- sw/airborne/booz/booz_gps.c | 8 +------ sw/airborne/booz/booz_gps.h | 4 ++-- sw/airborne/gps.c | 14 +++++------ sw/airborne/gps.h | 32 ++++++++++++------------- sw/airborne/modules/MPPT/MPPT.c | 12 ++++------ sw/airborne/modules/MPPT/MPPT.h | 8 +++---- sw/airborne/modules/meteo/dust_gp2y.c | 8 +++---- sw/airborne/modules/sensors/alt_srf08.c | 25 ++++++++++--------- sw/airborne/modules/sensors/alt_srf08.h | 5 ++-- sw/airborne/modules/sensors/baro_bmp.c | 9 ++++--- 10 files changed, 56 insertions(+), 69 deletions(-) diff --git a/sw/airborne/booz/booz_gps.c b/sw/airborne/booz/booz_gps.c index dba5ad4517..9aa4970e22 100644 --- a/sw/airborne/booz/booz_gps.c +++ b/sw/airborne/booz/booz_gps.c @@ -43,11 +43,5 @@ void booz_gps_init(void) { #endif #ifdef BOOZ_GPS_TYPE_H booz_gps_impl_init(); -#endif +#endif } - - - - - - diff --git a/sw/airborne/booz/booz_gps.h b/sw/airborne/booz/booz_gps.h index 52d136df53..4839ecaf3a 100644 --- a/sw/airborne/booz/booz_gps.h +++ b/sw/airborne/booz/booz_gps.h @@ -66,7 +66,7 @@ extern void booz_gps_impl_init(void); /* * This part is used by the simulator to feed simulated data - * + * */ #ifdef SITL @@ -102,7 +102,7 @@ static inline void booz_gps_feed_value() { #else /* ! SITL */ /* * This part is used by the autopilot to read data from a uart - * + * */ diff --git a/sw/airborne/gps.c b/sw/airborne/gps.c index a92f4de3fa..9997abd34f 100644 --- a/sw/airborne/gps.c +++ b/sw/airborne/gps.c @@ -1,10 +1,10 @@ /* * $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) @@ -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. * */ @@ -79,9 +79,9 @@ void gps_downlink( void ) { } void gps_send( void ) { - + DOWNLINK_SEND_GPS(DefaultChannel, &gps_mode, &gps_utm_east, &gps_utm_north, &gps_course, &gps_alt, &gps_gspeed,&gps_climb, &gps_week, &gps_itow, &gps_utm_zone, &gps_nb_ovrn); - + static uint8_t i; static uint8_t last_cnos[GPS_NB_CHANNELS]; if (i == gps_nb_channels) i = 0; @@ -95,8 +95,8 @@ void gps_send( void ) { for(j = 0; j < gps_nb_channels; j++) { uint8_t cno = gps_svinfos[j].cno; if (cno > 0 && j != i && abs(cno-last_cnos[j]) >= 2) { - DOWNLINK_SEND_SVINFO(DefaultChannel, &j, &gps_svinfos[j].svid, &gps_svinfos[j].flags, &gps_svinfos[j].qi, &cno, &gps_svinfos[j].elev, &gps_svinfos[j].azim); - last_cnos[j] = gps_svinfos[j].cno; + DOWNLINK_SEND_SVINFO(DefaultChannel, &j, &gps_svinfos[j].svid, &gps_svinfos[j].flags, &gps_svinfos[j].qi, &cno, &gps_svinfos[j].elev, &gps_svinfos[j].azim); + last_cnos[j] = gps_svinfos[j].cno; } } } diff --git a/sw/airborne/gps.h b/sw/airborne/gps.h index 5f4a8d0e66..01dfa737d5 100644 --- a/sw/airborne/gps.h +++ b/sw/airborne/gps.h @@ -1,6 +1,6 @@ /* * $Id$ - * + * * Copyright (C) 2003 Pascal Brisset, Antoine Drouin * * 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. * */ @@ -124,7 +124,7 @@ extern struct svinfo gps_svinfos[GPS_NB_CHANNELS]; #define GpsToggleLed() {} #endif -#if defined(GPS) || defined(USE_GPS_XSENS) || defined(SITL) +#if defined(GPS) || defined(USE_GPS_XSENS) || defined(SITL) # define GpsTimeoutError (cpu_time_sec - last_gps_msg_t > FAILSAFE_DELAY_WITHOUT_GPS) #else # define GpsTimeoutError 1 @@ -148,21 +148,21 @@ extern struct svinfo gps_svinfos[GPS_NB_CHANNELS]; #else #define GpsParseOrConfigure() parse_gps_msg() #endif - + #define GpsEventCheckAndHandle(_callback, _verbose) { \ - if (GpsBuffer()) { \ - ReadGpsBuffer(); \ - } \ - if (gps_msg_received) { \ - GpsParseOrConfigure(); \ - gps_msg_received = FALSE; \ - if (gps_pos_available) { \ - gps_verbose_downlink = _verbose; \ - UseGpsPos(_callback); \ - gps_pos_available = FALSE; \ - } \ - } \ + if (GpsBuffer()) { \ + ReadGpsBuffer(); \ + } \ + if (gps_msg_received) { \ + GpsParseOrConfigure(); \ + gps_msg_received = FALSE; \ + if (gps_pos_available) { \ + gps_verbose_downlink = _verbose; \ + UseGpsPos(_callback); \ + gps_pos_available = FALSE; \ + } \ + } \ } diff --git a/sw/airborne/modules/MPPT/MPPT.c b/sw/airborne/modules/MPPT/MPPT.c index 85e8eecf78..8b796cd692 100644 --- a/sw/airborne/modules/MPPT/MPPT.c +++ b/sw/airborne/modules/MPPT/MPPT.c @@ -1,10 +1,10 @@ /* * $Id$ - * + * * Copyright (C) 2009 ENAC, Pascal Brisset, Michel Gorraz * * 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) @@ -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. * */ @@ -44,7 +44,7 @@ struct i2c_transaction mppt_trans; 5: PSol (mW) 6: IConv (mA) 7: PConv (mW) - + 9: IBat + IConv */ @@ -86,7 +86,7 @@ static void MPPT_ask( void ) { DOWNLINK_SEND_MPPT(DefaultChannel, NB_DATA, MPPT_data); data_index = 0; } - + mppt_trans.buf[0] = data_index; I2CTransmit(i2c0, mppt_trans, MPPT_SLAVE_ADDR, 1); MPPT_status = MPPT_STATUS_ASKING; @@ -129,5 +129,3 @@ void MPPT_periodic( void ) { } } } - - diff --git a/sw/airborne/modules/MPPT/MPPT.h b/sw/airborne/modules/MPPT/MPPT.h index 04f4c614b3..4eec25adc2 100644 --- a/sw/airborne/modules/MPPT/MPPT.h +++ b/sw/airborne/modules/MPPT/MPPT.h @@ -1,10 +1,10 @@ /* * $Id$ - * + * * Copyright (C) 2009 ENAC, Pascal Brisset, Michel Gorraz * * 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) @@ -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. * */ @@ -44,7 +44,7 @@ extern uint8_t MPPT_mode; -void MPPT_init( void ); +void MPPT_init( void ); void MPPT_automata( void ); void MPPT_periodic( void ); diff --git a/sw/airborne/modules/meteo/dust_gp2y.c b/sw/airborne/modules/meteo/dust_gp2y.c index 283ac80865..ad1be858c2 100644 --- a/sw/airborne/modules/meteo/dust_gp2y.c +++ b/sw/airborne/modules/meteo/dust_gp2y.c @@ -1,6 +1,6 @@ /* * $Id$ - * + * * Copyright (C) 2010 Martin Mueller * * 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. * */ @@ -70,7 +70,7 @@ void dust_gp2y_event( void ) { /* "just for reference and not for guarantee" */ dust_gp2y_density_f = ((dust_gp2y_density / 1024.) * 3.3 * (51. / 33.) - 0.6) * (0.5 / 3.); - if (dust_gp2y_density_f < 0) + if (dust_gp2y_density_f < 0) dust_gp2y_density_f = 0; DOWNLINK_SEND_GP2Y_STATUS(DefaultChannel, &dust_gp2y_density, &dust_gp2y_density_f); @@ -78,5 +78,3 @@ void dust_gp2y_event( void ) { gp2y_trans.status = I2CTransDone; } } - - diff --git a/sw/airborne/modules/sensors/alt_srf08.c b/sw/airborne/modules/sensors/alt_srf08.c index e660b46457..fca3474dda 100644 --- a/sw/airborne/modules/sensors/alt_srf08.c +++ b/sw/airborne/modules/sensors/alt_srf08.c @@ -1,6 +1,6 @@ /* * $Id$ - * + * * Copyright (C) 2005 Pascal Brisset, Antoine Drouin * Copyright (C) 2002 Chris efstathiou hendrix@otenet.gr * @@ -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. * */ /** \file srf08.c @@ -32,7 +32,7 @@ #include "uart.h" #include "messages.h" #include "downlink.h" -#include "led.h" +#include "led.h" #ifndef SRF08_I2C_DEV #define SRF08_I2C_DEV i2c0 @@ -50,7 +50,7 @@ void srf08_init(void) { srf08_received = FALSE; srf08_got = FALSE; - + srf_trans.buf[0] = 0x00; srf_trans.buf[1] = 0x51; I2CTransmit(SRF08_I2C_DEV, srf_trans, SRF08_UNIT_0, 2); @@ -104,27 +104,27 @@ uint32_t srf08_read_register(uint8_t srf08_register) uint8_t cnt; union i2c_union { - uint32_t rx_word; + uint32_t rx_word; uint8_t rx_byte[2]; } i2c; srf_trans.buf[0] = srf08_register; - - /* get high byte msb first */ + + /* get high byte msb first */ if (srf08_register>=2) cnt = 2; else cnt = 1; I2CTransceive(SRF08_I2C_DEV, srf_trans, SRF08_UNIT_0, 1, cnt); - - /* get high byte msb first */ + + /* get high byte msb first */ if(srf08_register>=2) { i2c.rx_byte[1]=srf_trans.buf[1]; - } - - /* get low byte msb first */ + } + + /* get low byte msb first */ i2c.rx_byte[0]=srf_trans.buf[0]; return(i2c.rx_word); @@ -148,4 +148,3 @@ void srf08_event(void) } } } - diff --git a/sw/airborne/modules/sensors/alt_srf08.h b/sw/airborne/modules/sensors/alt_srf08.h index 5d816bfe15..d428d0a367 100644 --- a/sw/airborne/modules/sensors/alt_srf08.h +++ b/sw/airborne/modules/sensors/alt_srf08.h @@ -1,6 +1,6 @@ /* * $Id$ - * + * * Copyright (C) 2005 Pascal Brisset, Antoine Drouin * Copyright (C) 2002 Chris efstathiou hendrix@otenet.gr * @@ -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. * */ /** \file srf08.h @@ -116,4 +116,3 @@ extern void srf08_copy(void); extern void srf08_event(void); #endif /* #ifndef SRF08_H */ - diff --git a/sw/airborne/modules/sensors/baro_bmp.c b/sw/airborne/modules/sensors/baro_bmp.c index 7d2012a008..9d12b1e49b 100644 --- a/sw/airborne/modules/sensors/baro_bmp.c +++ b/sw/airborne/modules/sensors/baro_bmp.c @@ -1,6 +1,6 @@ /* * $Id: baro_bmp.c $ - * + * * Copyright (C) 2010 Martin Mueller * * 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. * */ @@ -120,7 +120,7 @@ void baro_bmp_event( void ) { uint32_t bmp_b4, bmp_b7; /* get uncompensated pressure, oss=3 */ - bmp_up = (bmp_trans.buf[0] << 11) | + bmp_up = (bmp_trans.buf[0] << 11) | (bmp_trans.buf[1] << 3) | bmp_trans.buf[2]; /* start temp measurement */ @@ -146,7 +146,7 @@ void baro_bmp_event( void ) { bmp_x3 = ((bmp_x1 + bmp_x2) +2) / (1<<2); bmp_b4 = bmp_ac4 * (uint32_t)(bmp_x3 + 32768) / (1<<15); bmp_b7 = ((uint32_t)bmp_up - bmp_b3) * (50000>>3); - if (bmp_b7 < 0x80000000) + if (bmp_b7 < 0x80000000) bmp_p = (bmp_b7 * 2) / bmp_b4; else bmp_p = (bmp_b7 * bmp_b4) * 2; @@ -161,4 +161,3 @@ void baro_bmp_event( void ) { } } } -