aboutsummaryrefslogtreecommitdiff
path: root/gyro.c
diff options
context:
space:
mode:
Diffstat (limited to 'gyro.c')
-rw-r--r--gyro.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gyro.c b/gyro.c
index 35ec76b..f31385d 100644
--- a/gyro.c
+++ b/gyro.c
@@ -99,7 +99,7 @@ bool gyroProcess () {
reading = false;
}
} else {
- if (((PINB >> PINB1) & 0x1) && twr.status != TWST_WAIT) {
+ if (((PINB >> PINB1) & 0x1) && twr.status == TWST_OK) {
/* new data available in device buffer and bus is free */
if (!twRequest (TWM_READ, L3GD20, L3GD20_OUTZ,
(uint8_t *) &zval, sizeof (zval))) {