[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paparazzi-commits] [6124] advance baro state/status even in the case of
From: |
Allen Ibara |
Subject: |
[paparazzi-commits] [6124] advance baro state/status even in the case of failed transaction |
Date: |
Sat, 09 Oct 2010 03:36:37 +0000 |
Revision: 6124
http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=6124
Author: aibara
Date: 2010-10-09 03:36:37 +0000 (Sat, 09 Oct 2010)
Log Message:
-----------
advance baro state/status even in the case of failed transaction
Modified Paths:
--------------
paparazzi3/trunk/sw/airborne/boards/lisa_l/baro_board.h
Modified: paparazzi3/trunk/sw/airborne/boards/lisa_l/baro_board.h
===================================================================
--- paparazzi3/trunk/sw/airborne/boards/lisa_l/baro_board.h 2010-10-08
22:49:13 UTC (rev 6123)
+++ paparazzi3/trunk/sw/airborne/boards/lisa_l/baro_board.h 2010-10-09
03:36:37 UTC (rev 6124)
@@ -37,18 +37,22 @@
#define BaroEvent(_b_abs_handler, _b_diff_handler) { \
if (baro_board.status == LBS_READING_ABS &&
\
- baro_trans.status == I2CTransSuccess) { \
- int16_t tmp = baro_trans.buf[0]<<8 | baro_trans.buf[1]; \
- baro.absolute = tmp; \
+ baro_trans.status != I2CTransPending) { \
baro_board.status = LBS_READ_ABS;
\
- _b_abs_handler();
\
+ if (baro_trans.status == I2CTransSuccess) { \
+ int16_t tmp = baro_trans.buf[0]<<8 |
baro_trans.buf[1]; \
+ baro.absolute = tmp;
\
+ _b_abs_handler();
\
+ } \
} \
else if (baro_board.status == LBS_READING_DIFF && \
- baro_trans.status == I2CTransSuccess) { \
- int16_t tmp = baro_trans.buf[0]<<8 | baro_trans.buf[1]; \
- baro.differential = tmp; \
+ baro_trans.status != I2CTransPending) { \
baro_board.status = LBS_READ_DIFF; \
- _b_diff_handler(); \
+ if (baro_trans.status == I2CTransSuccess) { \
+ int16_t tmp = baro_trans.buf[0]<<8 | baro_trans.buf[1]; \
+ baro.differential = tmp;
\
+ _b_diff_handler(); \
+ } \
} \
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paparazzi-commits] [6124] advance baro state/status even in the case of failed transaction,
Allen Ibara <=