[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paparazzi-commits] [6262] cleanup trailing whitespaces
From: |
Felix Ruess |
Subject: |
[paparazzi-commits] [6262] cleanup trailing whitespaces |
Date: |
Tue, 26 Oct 2010 11:20:53 +0000 |
Revision: 6262
http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=6262
Author: flixr
Date: 2010-10-26 11:20:52 +0000 (Tue, 26 Oct 2010)
Log Message:
-----------
cleanup trailing whitespaces
Modified Paths:
--------------
paparazzi3/trunk/sw/airborne/arch/lpc21/i2c_hw.c
paparazzi3/trunk/sw/airborne/arch/stm32/i2c_hw.c
paparazzi3/trunk/sw/airborne/i2c.h
paparazzi3/trunk/sw/airborne/modules/gps_i2c/gps_i2c.c
paparazzi3/trunk/sw/airborne/modules/gps_i2c/gps_i2c.h
paparazzi3/trunk/sw/airborne/modules/meteo/humid_dpicco.c
paparazzi3/trunk/sw/airborne/modules/meteo/ir_mlx.c
paparazzi3/trunk/sw/airborne/modules/meteo/temp_lm75.c
paparazzi3/trunk/sw/airborne/modules/meteo/temp_tmp102.c
paparazzi3/trunk/sw/airborne/modules/meteo/wind_gfi.c
paparazzi3/trunk/sw/airborne/modules/sensors/airspeed_ets.c
paparazzi3/trunk/sw/airborne/modules/sensors/baro_scp_i2c.c
paparazzi3/trunk/sw/airborne/modules/sensors/pressure_board_navarro.c
Modified: paparazzi3/trunk/sw/airborne/arch/lpc21/i2c_hw.c
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/i2c_hw.c 2010-10-26 10:29:09 UTC
(rev 6261)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/i2c_hw.c 2010-10-26 11:20:52 UTC
(rev 6262)
@@ -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.
*
*/
@@ -64,7 +64,7 @@
static inline void I2cSendStop(struct i2c_periph* p, struct i2c_transaction*
t) {
((i2cRegs_t *)(p->reg_addr))->conset = _BV(STO);
- I2cFinished(p,t);
+ I2cFinished(p,t);
}
static inline void I2cFail(struct i2c_periph* p, struct i2c_transaction* t) {
@@ -102,8 +102,8 @@
case I2CTransRx :
SetBit(trans->slave_addr,0);
break;
- case I2CTransTx:
- case I2CTransTxRx:
+ case I2CTransTx:
+ case I2CTransTxRx:
ClearBit(trans->slave_addr,0);
break;
}
@@ -167,7 +167,7 @@
#ifdef USE_I2C0
-/* default clock speed 37.5KHz with our 15MHz PCLK
+/* default clock speed 37.5KHz with our 15MHz PCLK
I2C0_CLOCK = PCLK / (I2C0_SCLL + I2C0_SCLH) */
#ifndef I2C0_SCLL
#define I2C0_SCLL 200
@@ -208,11 +208,11 @@
void i2c0_ISR(void) {
ISR_ENTRY();
-
+
uint32_t state = I2C0STAT;
I2cAutomaton(state,&i2c0);
I2cClearIT(i2c0.reg_addr);
-
+
VICVectAddr = 0x00000000; // clear this interrupt from the VIC
ISR_EXIT(); // recover registers and return
}
@@ -231,9 +231,9 @@
/* enable I2C */
I2C0CONSET = _BV(I2EN);
/* set bitrate */
- I2C0SCLL = I2C0_SCLL_D;
- I2C0SCLH = I2C0_SCLH_D;
-
+ I2C0SCLL = I2C0_SCLL_D;
+ I2C0SCLH = I2C0_SCLH_D;
+
// initialize the interrupt vector
VICIntSelect &= ~VIC_BIT(VIC_I2C0); // I2C0 selected as IRQ
VICIntEnable = VIC_BIT(VIC_I2C0); // I2C0 interrupt enabled
@@ -247,7 +247,7 @@
#ifdef USE_I2C1
-/* default clock speed 37.5KHz with our 15MHz PCLK
+/* default clock speed 37.5KHz with our 15MHz PCLK
I2C1_CLOCK = PCLK / (I2C1_SCLL + I2C1_SCLH) */
#ifndef I2C1_SCLL
#define I2C1_SCLL 200
@@ -283,11 +283,11 @@
void i2c1_ISR(void) {
ISR_ENTRY();
-
+
uint32_t state = I2C1STAT;
I2cAutomaton(state,&i2c1);
I2cClearIT(i2c1.reg_addr);
-
+
VICVectAddr = 0x00000000; // clear this interrupt from the VIC
ISR_EXIT(); // recover registers and return
}
@@ -305,9 +305,9 @@
/* enable I2C */
I2C1CONSET = _BV(I2EN);
/* set bitrate */
- I2C1SCLL = I2C1_SCLL_D;
- I2C1SCLH = I2C1_SCLH_D;
-
+ I2C1SCLL = I2C1_SCLL_D;
+ I2C1SCLH = I2C1_SCLH_D;
+
// initialize the interrupt vector
VICIntSelect &= ~VIC_BIT(VIC_I2C1); // I2C1 selected as IRQ
VICIntEnable = VIC_BIT(VIC_I2C1); // I2C1 interrupt enabled
@@ -340,6 +340,3 @@
return TRUE;
}
-
-
-
Modified: paparazzi3/trunk/sw/airborne/arch/stm32/i2c_hw.c
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/stm32/i2c_hw.c 2010-10-26 10:29:09 UTC
(rev 6261)
+++ paparazzi3/trunk/sw/airborne/arch/stm32/i2c_hw.c 2010-10-26 11:20:52 UTC
(rev 6262)
@@ -68,12 +68,12 @@
/* zeros error counter */
ZEROS_ERR_COUNTER(i2c1_errors);
-
+
I2C_DeInit(I2C1);
-
+
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_0);
NVIC_InitTypeDef NVIC_InitStructure;
-
+
/* Configure and enable I2C1 event interrupt
-------------------------------*/
NVIC_InitStructure.NVIC_IRQChannel = I2C1_EV_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
@@ -103,12 +103,12 @@
GPIO_Init(GPIOB, &GPIO_InitStructure);
/* I2C configuration
----------------------------------------------------------*/
-
+
/* I2C Peripheral Enable */
I2C_Cmd(I2C1, ENABLE);
/* Apply I2C configuration after enabling it */
I2C1_APPLY_CONFIG();
-
+
/* Enable I2C1 error interrupts */
I2C_ITConfig(I2C1, I2C_IT_ERR, ENABLE);
@@ -121,7 +121,7 @@
struct i2c_transaction* trans = i2c1.trans[i2c1.trans_extract_idx];
switch (event) {
/* EV5 */
- case I2C_EVENT_MASTER_MODE_SELECT:
+ case I2C_EVENT_MASTER_MODE_SELECT:
if (trans->type == I2CTransTx || trans->type == I2CTransTxRx) {
/* Master Transmitter : Send slave Address for write */
I2C_Send7bitAddress(I2C1, (trans->slave_addr&0xFE),
I2C_Direction_Transmitter);
@@ -131,10 +131,10 @@
I2C_Send7bitAddress(I2C1, (trans->slave_addr&0xFE),
I2C_Direction_Receiver);
}
break;
-
+
/* Master Transmitter --------------------------------------------------*/
/* Test on I2C1 EV6 and first EV8 and clear them */
- case I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED:
+ case I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED:
/* enable empty dr if we have more than one byte to send */
// if (i2c1_len_w > 1)
I2C_ITConfig(I2C1, I2C_IT_BUF, ENABLE);
@@ -142,9 +142,9 @@
I2C_SendData(I2C1, trans->buf[0]);
i2c1.idx_buf = 1;
break;
-
+
/* Test on I2C1 EV8 and clear it */
- case I2C_EVENT_MASTER_BYTE_TRANSMITTING: /* Without BTF, EV8 */
+ case I2C_EVENT_MASTER_BYTE_TRANSMITTING: /* Without BTF, EV8 */
// DEBUG_S5_TOGGLE();
if(i2c1.idx_buf < trans->len_w) {
I2C_SendData(I2C1, trans->buf[i2c1.idx_buf]);
@@ -188,7 +188,7 @@
void i2c1_er_irq_handler(void) {
-
+
if (I2C_GetITStatus(I2C1, I2C_IT_AF)) { /* Acknowledge failure */
i2c1_errors.ack_fail_cnt++;
I2C_ClearITPendingBit(I2C1, I2C_IT_AF);
@@ -218,9 +218,9 @@
i2c1_errors.smbus_alert_cnt++;
I2C_ClearITPendingBit(I2C1, I2C_IT_SMBALERT);
}
-
+
I2C1_ABORT_AND_RESET();
-
+
}
#endif /* USE_I2C1 */
@@ -234,10 +234,10 @@
// dec hex
// 196609 30001 BUSY MSL | SB
// 458882 70082 TRA BUSY MSL | TXE ADDR
-// 458884 70084 TRA BUSY MSL | TXE BTF
-// 196609 30001 BUSY MSL | SB
+// 458884 70084 TRA BUSY MSL | TXE BTF
+// 196609 30001 BUSY MSL | SB
// 196610 30002 BUSY MSL | ADDR
-//
+//
struct i2c_errors i2c2_errors;
@@ -245,7 +245,7 @@
#include "my_debug_servo.h"
#define I2C2_APPLY_CONFIG() { \
- \
+ \
I2C_InitTypeDef I2C_InitStructure= { \
.I2C_Mode = I2C_Mode_I2C,
\
.I2C_DutyCycle = I2C_DutyCycle_2,
\
@@ -255,23 +255,23 @@
.I2C_ClockSpeed = 300000 \
}; \
I2C_Init(I2C2, &I2C_InitStructure);
\
- \
+ \
}
void i2c2_hw_init(void) {
-
+
i2c2.reg_addr = I2C2;
/* zeros error counter */
ZEROS_ERR_COUNTER(i2c2_errors);
-
+
/* reset periphearl to default state ( sometimes not achieved on reset :( )
*/
I2C_DeInit(I2C2);
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_0);
NVIC_InitTypeDef NVIC_InitStructure;
-
+
/* Configure and enable I2C2 event interrupt
--------------------------------*/
NVIC_InitStructure.NVIC_IRQChannel = I2C2_EV_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
@@ -374,14 +374,14 @@
else {
I2C_Send7bitAddress(I2C2, trans->slave_addr, I2C_Direction_Transmitter);
i2c2.status = I2CAddrWrSent;
- }
- }
+ }
+ }
else
SPURIOUS_INTERRUPT(I2CStartRequested, event);
}
/*
- * Addr WR sent
+ * Addr WR sent
*
*/
static inline void on_status_addr_wr_sent(struct i2c_transaction* trans,
uint32_t event) {
@@ -396,48 +396,48 @@
else {
i2c2.idx_buf = 1;
if (trans->type == I2CTransTx) {
- I2C_GenerateSTOP(I2C2, ENABLE);
- i2c2.status = I2CStopRequested;
+ I2C_GenerateSTOP(I2C2, ENABLE);
+ i2c2.status = I2CStopRequested;
}
else {
- I2C_GenerateSTART(I2C2, ENABLE);
- i2c2.status = I2CRestartRequested;
+ I2C_GenerateSTART(I2C2, ENABLE);
+ i2c2.status = I2CRestartRequested;
}
}
}
else
- SPURIOUS_INTERRUPT(I2CAddrWrSent, event);
+ SPURIOUS_INTERRUPT(I2CAddrWrSent, event);
}
/*
- * Sending Byte
+ * Sending Byte
*
*/
static inline void on_status_sending_byte(struct i2c_transaction* trans,
uint32_t event) {
if (event & I2C_FLAG_TXE) {
- if (i2c2.idx_buf < trans->len_w) {
+ if (i2c2.idx_buf < trans->len_w) {
I2C_SendData(I2C2, trans->buf[i2c2.idx_buf]);
i2c2.idx_buf++;
}
- else {
+ else {
I2C_ITConfig(I2C2, I2C_IT_BUF, DISABLE);
if (trans->type == I2CTransTx) {
- I2C_GenerateSTOP(I2C2, ENABLE);
- i2c2.status = I2CStopRequested;
+ I2C_GenerateSTOP(I2C2, ENABLE);
+ i2c2.status = I2CStopRequested;
}
else {
- I2C_GenerateSTART(I2C2, ENABLE);
- i2c2.status = I2CRestartRequested;
+ I2C_GenerateSTART(I2C2, ENABLE);
+ i2c2.status = I2CRestartRequested;
}
}
}
else
- SPURIOUS_INTERRUPT(I2CSendingByte, event);
+ SPURIOUS_INTERRUPT(I2CSendingByte, event);
}
#if 0
/*
- * Sending last byte
+ * Sending last byte
*
*/
static inline void on_status_sending_last_byte(struct i2c_transaction* trans,
uint32_t event) {
@@ -454,20 +454,20 @@
// I2C_ITConfig(I2C2, I2C_IT_BUF, DISABLE);
}
else
- SPURIOUS_INTERRUPT(I2CSendingLastByte, event);
+ SPURIOUS_INTERRUPT(I2CSendingLastByte, event);
}
#endif
/*
- * Stop Requested
+ * Stop Requested
*
*/
static inline void on_status_stop_requested(struct i2c_transaction* trans,
uint32_t event) {
/* bummer.... */
- if (event & I2C_FLAG_RXNE) {
+ if (event & I2C_FLAG_RXNE) {
uint8_t read_byte = I2C_ReceiveData(I2C2);
- if (i2c2.idx_buf < trans->len_r) {
+ if (i2c2.idx_buf < trans->len_r) {
trans->buf[i2c2.idx_buf] = read_byte;
}
}
@@ -477,14 +477,14 @@
}
/*
- * Addr RD sent
+ * Addr RD sent
*
*/
static inline void on_status_addr_rd_sent(struct i2c_transaction* trans,
uint32_t event) {
if ((event & I2C_FLAG_ADDR) && !(event & I2C_FLAG_TRA)) {
- i2c2.idx_buf = 0;
+ i2c2.idx_buf = 0;
if(trans->len_r == 1) { // If
we're going to read only one byte
- I2C_AcknowledgeConfig(I2C2, DISABLE); // make sure
it's gonna be nacked
+ I2C_AcknowledgeConfig(I2C2, DISABLE); // make sure
it's gonna be nacked
I2C_GenerateSTOP(I2C2, ENABLE); // and
followed by a stop
i2c2.status = I2CReadingLastByte; // and
remember we did
}
@@ -495,33 +495,33 @@
}
}
else
- SPURIOUS_INTERRUPT(I2CAddrRdSent, event);
+ SPURIOUS_INTERRUPT(I2CAddrRdSent, event);
}
/*
- * Reading byte
+ * Reading byte
*
*/
static inline void on_status_reading_byte(struct i2c_transaction* trans,
uint32_t event) {
- if (event & I2C_FLAG_RXNE) {
+ if (event & I2C_FLAG_RXNE) {
uint8_t read_byte = I2C_ReceiveData(I2C2);
- if (i2c2.idx_buf < trans->len_r) {
+ if (i2c2.idx_buf < trans->len_r) {
trans->buf[i2c2.idx_buf] = read_byte;
i2c2.idx_buf++;
if (i2c2.idx_buf >= trans->len_r-1) { // We're
reading our last byte
- I2C_AcknowledgeConfig(I2C2, DISABLE); // give them a
nack once it's done
- I2C_GenerateSTOP(I2C2, ENABLE); // and follow
with a stop
- i2c2.status = I2CStopRequested; // remember we
already trigered the stop
+ I2C_AcknowledgeConfig(I2C2, DISABLE); // give them a nack
once it's done
+ I2C_GenerateSTOP(I2C2, ENABLE); // and follow with
a stop
+ i2c2.status = I2CStopRequested; // remember we
already trigered the stop
}
} // else { something very wrong has happened }
}
else
- SPURIOUS_INTERRUPT(I2CReadingByte, event);
+ SPURIOUS_INTERRUPT(I2CReadingByte, event);
}
/*
- * Reading last byte
+ * Reading last byte
*
*/
static inline void on_status_reading_last_byte(struct i2c_transaction* trans,
uint32_t event) {
@@ -529,19 +529,19 @@
uint8_t read_byte = I2C_ReceiveData(I2C2);
trans->buf[i2c2.idx_buf] = read_byte;
I2C_GenerateSTOP(I2C2, ENABLE);
- i2c2.status = I2CStopRequested;
+ i2c2.status = I2CStopRequested;
}
- else if (event & I2C_FLAG_RXNE) { // should really be BTF ?
+ else if (event & I2C_FLAG_RXNE) { // should really be BTF ?
uint8_t read_byte = I2C_ReceiveData(I2C2);
trans->buf[i2c2.idx_buf] = read_byte;
- i2c2.status = I2CStopRequested;
+ i2c2.status = I2CStopRequested;
}
else
- SPURIOUS_INTERRUPT(I2CReadingLastByte, event);
+ SPURIOUS_INTERRUPT(I2CReadingLastByte, event);
}
/*
- * Restart requested
+ * Restart requested
*
*/
static inline void on_status_restart_requested(struct i2c_transaction* trans,
uint32_t event) {
@@ -552,7 +552,7 @@
i2c2.status = I2CAddrRdSent;
// DEBUG_S2_OFF();
}
-
+
if (event & I2C_FLAG_BTF) {
// DEBUG_S5_ON();
// DEBUG_S5_OFF();
@@ -573,7 +573,7 @@
// i2c2.status = I2CReadingByte;
// }
// else
- // SPURIOUS_INTERRUPT(I2CRestartRequested, event);
+ // SPURIOUS_INTERRUPT(I2CRestartRequested, event);
// DEBUG_S6_OFF();
}
@@ -673,9 +673,9 @@
i2c2_errors.smbus_alert_cnt++;
I2C_ClearITPendingBit(I2C2, I2C_IT_SMBALERT);
}
-
+
I2C2_ABORT_AND_RESET();
-
+
// DEBUG_S5_OFF();
}
@@ -693,13 +693,13 @@
return FALSE; // queue full
t->status = I2CTransPending;
-
+
__disable_irq();
/* put transacation in queue */
p->trans[p->trans_insert_idx] = t;
p->trans_insert_idx = temp;
-
+
/* if peripheral is idle, start the transaction */
if (p->status == I2CIdle)
start_transaction(p);
Modified: paparazzi3/trunk/sw/airborne/i2c.h
===================================================================
--- paparazzi3/trunk/sw/airborne/i2c.h 2010-10-26 10:29:09 UTC (rev 6261)
+++ paparazzi3/trunk/sw/airborne/i2c.h 2010-10-26 11:20:52 UTC (rev 6262)
@@ -5,30 +5,30 @@
#include "i2c_hw.h"
-enum I2CTransactionType {
- I2CTransTx,
- I2CTransRx,
- I2CTransTxRx
+enum I2CTransactionType {
+ I2CTransTx,
+ I2CTransRx,
+ I2CTransTxRx
};
-enum I2CTransactionStatus {
- I2CTransPending,
- I2CTransRunning,
- I2CTransSuccess,
+enum I2CTransactionStatus {
+ I2CTransPending,
+ I2CTransRunning,
+ I2CTransSuccess,
I2CTransFailed,
I2CTransDone
};
-enum I2CStatus {
- I2CIdle,
+enum I2CStatus {
+ I2CIdle,
I2CStartRequested,
- I2CAddrWrSent,
- I2CAddrRdSent,
- I2CSendingByte,
+ I2CAddrWrSent,
+ I2CAddrRdSent,
+ I2CSendingByte,
/* I2CSendingLastByte, */
I2CReadingByte,
I2CReadingLastByte,
- I2CStopRequested,
+ I2CStopRequested,
I2CRestartRequested,
I2CComplete,
I2CFailed
@@ -80,8 +80,8 @@
#include <string.h>
-#define I2C_ZERO_EVENTS(_err) { \
- _err.irq_cnt = 0; \
+#define I2C_ZERO_EVENTS(_err) { \
+ _err.irq_cnt = 0; \
memset((void*)_err.event_chain, 0, sizeof(_err.event_chain)); \
memset((void*)_err.status_chain, 0, sizeof(_err.status_chain)); \
}
@@ -105,7 +105,7 @@
extern struct i2c_periph i2c0;
extern void i2c0_init(void);
-#endif /* USE_I2C0 */
+#endif /* USE_I2C0 */
@@ -129,12 +129,12 @@
extern bool_t i2c_submit(struct i2c_periph* p, struct i2c_transaction* t);
#define I2CReceive(_p, _t, _s_addr, _len) { \
- _t.type = I2CTransRx; \
- _t.slave_addr = _s_addr; \
- _t.len_r = _len; \
- _t.len_w = 0; \
- _t.stop_after_transmit = TRUE; \
- i2c_submit(&(_p),&(_t)); \
+ _t.type = I2CTransRx; \
+ _t.slave_addr = _s_addr; \
+ _t.len_r = _len; \
+ _t.len_w = 0; \
+ _t.stop_after_transmit = TRUE; \
+ i2c_submit(&(_p),&(_t)); \
}
#define I2CTransmit(_p, _t, _s_addr, _len) { \
@@ -156,12 +156,12 @@
}
#define I2CTransceive(_p, _t, _s_addr, _len_w, _len_r) { \
- _t.type = I2CTransTxRx; \
- _t.slave_addr = _s_addr; \
- _t.len_r = _len_r; \
- _t.len_w = _len_w; \
- _t.stop_after_transmit = TRUE; \
- i2c_submit(&(_p),&(_t)); \
+ _t.type = I2CTransTxRx; \
+ _t.slave_addr = _s_addr; \
+ _t.len_r = _len_r; \
+ _t.len_w = _len_w; \
+ _t.stop_after_transmit = TRUE; \
+ i2c_submit(&(_p),&(_t)); \
}
Modified: paparazzi3/trunk/sw/airborne/modules/gps_i2c/gps_i2c.c
===================================================================
--- paparazzi3/trunk/sw/airborne/modules/gps_i2c/gps_i2c.c 2010-10-26
10:29:09 UTC (rev 6261)
+++ paparazzi3/trunk/sw/airborne/modules/gps_i2c/gps_i2c.c 2010-10-26
11:20:52 UTC (rev 6262)
@@ -2,7 +2,7 @@
* Copyright (C) 2009 ENAC, Pascal Brisset, Michel Gorraz,Gautier Hattenberger
*
* 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)
@@ -16,7 +16,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.
*
*/
@@ -82,7 +82,7 @@
uint8_t data_size = Min(gps_i2c_tx_insert_idx-gps_i2c_tx_extract_idx,
I2C0_BUF_LEN);
uint8_t i;
for(i = 0; i < data_size; i++, gps_i2c_tx_extract_idx++)
- i2c0_buf[i] = gps_i2c_tx_buf[gps_i2c_tx_extract_idx];
+ i2c0_buf[i] = gps_i2c_tx_buf[gps_i2c_tx_extract_idx];
/* Start i2c transmit */
i2c0_transmit(GPS_I2C_SLAVE_ADDR, data_size, &gps_i2c_done);
@@ -90,8 +90,8 @@
/* Reset flag if finished */
if (gps_i2c_tx_extract_idx >= gps_i2c_tx_insert_idx) {
- gps_i2c_data_ready_to_transmit = FALSE;
- gps_i2c_tx_insert_idx = 0;
+ gps_i2c_data_ready_to_transmit = FALSE;
+ gps_i2c_tx_insert_idx = 0;
}
}
break;
@@ -101,7 +101,7 @@
gps_i2c_done = FALSE;
gps_i2c_status = GPS_I2C_STATUS_READING_NB_AVAIL_BYTES;
break;
-
+
case GPS_I2C_STATUS_READING_NB_AVAIL_BYTES:
gps_i2c_nb_avail_bytes = (i2c0_buf[0]<<8) | i2c0_buf[1];
@@ -116,7 +116,7 @@
case GPS_I2C_STATUS_ASKING_DATA:
data_buf_len = Min(gps_i2c_nb_avail_bytes, I2C0_BUF_LEN);
gps_i2c_nb_avail_bytes -= data_buf_len;
-
+
i2c0_receive(GPS_I2C_SLAVE_ADDR, data_buf_len, &gps_i2c_done);
gps_i2c_done = FALSE;
gps_i2c_status = GPS_I2C_STATUS_READING_DATA;
Modified: paparazzi3/trunk/sw/airborne/modules/gps_i2c/gps_i2c.h
===================================================================
--- paparazzi3/trunk/sw/airborne/modules/gps_i2c/gps_i2c.h 2010-10-26
10:29:09 UTC (rev 6261)
+++ paparazzi3/trunk/sw/airborne/modules/gps_i2c/gps_i2c.h 2010-10-26
11:20:52 UTC (rev 6262)
@@ -2,7 +2,7 @@
* Copyright (C) 2009 ENAC, Pascal Brisset, Michel Gorraz,Gautier Hattenberger
*
* 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)
@@ -16,7 +16,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.
*
*/
Modified: paparazzi3/trunk/sw/airborne/modules/meteo/humid_dpicco.c
===================================================================
--- paparazzi3/trunk/sw/airborne/modules/meteo/humid_dpicco.c 2010-10-26
10:29:09 UTC (rev 6261)
+++ paparazzi3/trunk/sw/airborne/modules/meteo/humid_dpicco.c 2010-10-26
11:20:52 UTC (rev 6262)
@@ -1,4 +1,3 @@
-
/** \file dpicco.c
* \brief DigiPicco I2C sensor interface
*
@@ -46,10 +45,9 @@
dpicco_val[1] = (dpicco_trans.buf[2]<<8) | dpicco_trans.buf[3];
dpicco_humid = (dpicco_val[0] * DPICCO_HUMID_RANGE) / DPICCO_HUMID_MAX;
- dpicco_temp = ((dpicco_val[1] * DPICCO_TEMP_RANGE) / DPICCO_TEMP_MAX) +
DPICCO_TEMP_OFFS;
+ dpicco_temp = ((dpicco_val[1] * DPICCO_TEMP_RANGE) / DPICCO_TEMP_MAX) +
DPICCO_TEMP_OFFS;
DOWNLINK_SEND_DPICCO_STATUS(DefaultChannel, &dpicco_val[0],
&dpicco_val[1], &dpicco_humid, &dpicco_temp);
dpicco_trans.status = I2CTransDone;
}
}
-
Modified: paparazzi3/trunk/sw/airborne/modules/meteo/ir_mlx.c
===================================================================
--- paparazzi3/trunk/sw/airborne/modules/meteo/ir_mlx.c 2010-10-26 10:29:09 UTC
(rev 6261)
+++ paparazzi3/trunk/sw/airborne/modules/meteo/ir_mlx.c 2010-10-26 11:20:52 UTC
(rev 6262)
@@ -1,6 +1,6 @@
/*
* $Id: ir_mlx.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.
*
*/
@@ -100,4 +100,3 @@
}
}
}
-
Modified: paparazzi3/trunk/sw/airborne/modules/meteo/temp_lm75.c
===================================================================
--- paparazzi3/trunk/sw/airborne/modules/meteo/temp_lm75.c 2010-10-26
10:29:09 UTC (rev 6261)
+++ paparazzi3/trunk/sw/airborne/modules/meteo/temp_lm75.c 2010-10-26
11:20:52 UTC (rev 6262)
@@ -1,6 +1,6 @@
/*
* $Id: temp_lm75.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.
*
*/
@@ -77,4 +77,3 @@
lm75_trans.status = I2CTransDone;
}
}
-
Modified: paparazzi3/trunk/sw/airborne/modules/meteo/temp_tmp102.c
===================================================================
--- paparazzi3/trunk/sw/airborne/modules/meteo/temp_tmp102.c 2010-10-26
10:29:09 UTC (rev 6261)
+++ paparazzi3/trunk/sw/airborne/modules/meteo/temp_tmp102.c 2010-10-26
11:20:52 UTC (rev 6262)
@@ -1,6 +1,6 @@
/*
* $Id: temp_tmp102.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.
*
*/
@@ -45,7 +45,7 @@
#define TMP_I2C_DEV i2c0
#endif
-/*
+/*
address depends on to what pin A0 is connected to
A0: GND Vcc SDA SCL
Addr: 0x90 0x92 0x94 0x96
@@ -95,4 +95,3 @@
tmp_trans.status = I2CTransDone;
}
}
-
Modified: paparazzi3/trunk/sw/airborne/modules/meteo/wind_gfi.c
===================================================================
--- paparazzi3/trunk/sw/airborne/modules/meteo/wind_gfi.c 2010-10-26
10:29:09 UTC (rev 6261)
+++ paparazzi3/trunk/sw/airborne/modules/meteo/wind_gfi.c 2010-10-26
11:20:52 UTC (rev 6262)
@@ -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.
*
*/
@@ -112,4 +112,3 @@
}
}
}
-
Modified: paparazzi3/trunk/sw/airborne/modules/sensors/airspeed_ets.c
===================================================================
--- paparazzi3/trunk/sw/airborne/modules/sensors/airspeed_ets.c 2010-10-26
10:29:09 UTC (rev 6261)
+++ paparazzi3/trunk/sw/airborne/modules/sensors/airspeed_ets.c 2010-10-26
11:20:52 UTC (rev 6262)
@@ -98,7 +98,7 @@
extern float sim_air_speed;
EstimatorSetAirspeed(sim_air_speed);
#endif //SITL
-}
+}
void airspeed_ets_read_event( void ) {
int n;
@@ -112,8 +112,8 @@
else
airspeed_ets_valid = TRUE;
- // Continue only if a new airspeed value was received
- if (airspeed_ets_valid) {
+ // Continue only if a new airspeed value was received
+ if (airspeed_ets_valid) {
// Calculate offset average if not done already
if (!airspeed_ets_offset_init) {
--airspeed_ets_cnt;
@@ -131,7 +131,7 @@
// Check if averaging needs to continue
else if (airspeed_ets_cnt <= AIRSPEED_ETS_OFFSET_NBSAMPLES_AVRG)
airspeed_ets_offset_tmp += airspeed_ets_raw;
- }
+ }
// Convert raw to m/s
if (airspeed_ets_offset_init && airspeed_ets_raw > airspeed_ets_offset)
airspeed_tmp = AIRSPEED_ETS_SCALE * sqrtf(
(float)(airspeed_ets_raw-airspeed_ets_offset) ) - AIRSPEED_ETS_OFFSET;
@@ -157,7 +157,3 @@
airspeed_ets_i2c_trans.status = I2CTransDone;
}
-
-
-
-
Modified: paparazzi3/trunk/sw/airborne/modules/sensors/baro_scp_i2c.c
===================================================================
--- paparazzi3/trunk/sw/airborne/modules/sensors/baro_scp_i2c.c 2010-10-26
10:29:09 UTC (rev 6261)
+++ paparazzi3/trunk/sw/airborne/modules/sensors/baro_scp_i2c.c 2010-10-26
11:20:52 UTC (rev 6262)
@@ -1,4 +1,3 @@
-
/** \file baro_scp_i2c.c
* \brief VTI SCP1000 I2C sensor interface
*
@@ -99,4 +98,3 @@
else baro_scp_status = BARO_SCP_IDLE;
}
}
-
Modified: paparazzi3/trunk/sw/airborne/modules/sensors/pressure_board_navarro.c
===================================================================
--- paparazzi3/trunk/sw/airborne/modules/sensors/pressure_board_navarro.c
2010-10-26 10:29:09 UTC (rev 6261)
+++ paparazzi3/trunk/sw/airborne/modules/sensors/pressure_board_navarro.c
2010-10-26 11:20:52 UTC (rev 6262)
@@ -83,7 +83,7 @@
return;
}
- // Initiate next read
+ // Initiate next read
pbn_trans.buf[0] = 0;
I2CTransceive(PBN_I2C_DEVICE, pbn_trans, PBN_I2C_ADDR, 1, 4);
@@ -102,7 +102,7 @@
data_valid = FALSE;
}
else {
- data_valid = TRUE;
+ data_valid = TRUE;
if (offset_cnt > 0) {
// IIR filter to compute an initial offset
@@ -126,4 +126,3 @@
}
}
-
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paparazzi-commits] [6262] cleanup trailing whitespaces,
Felix Ruess <=