clean more trailing whitespaces

This commit is contained in:
Felix Ruess
2010-10-26 11:21:07 +00:00
parent 5834b7f064
commit 2d2e083b79
10 changed files with 56 additions and 69 deletions
+1 -7
View File
@@ -43,11 +43,5 @@ void booz_gps_init(void) {
#endif
#ifdef BOOZ_GPS_TYPE_H
booz_gps_impl_init();
#endif
#endif
}
+2 -2
View File
@@ -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
*
*
*/
+7 -7
View File
@@ -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;
}
}
}
+16 -16
View File
@@ -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; \
} \
} \
}
+5 -7
View File
@@ -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 ) {
}
}
}
+4 -4
View File
@@ -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 );
+3 -5
View File
@@ -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;
}
}
+12 -13
View File
@@ -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)
}
}
}
+2 -3
View File
@@ -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 */
+4 -5
View File
@@ -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 ) {
}
}
}