summaryrefslogtreecommitdiff
path: root/src/drivers/ao_mpu6000.c
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2014-01-22 20:55:41 -0700
committerBdale Garbee <bdale@gag.com>2014-01-22 20:55:41 -0700
commit9884ca1449167a06bd2cebc7d28353eeac592493 (patch)
tree9fde328b3a5971c67954e669c1ba27042821fd8c /src/drivers/ao_mpu6000.c
parent8e669694a60d34e2ea0f8f6b189e0bc3605d94d7 (diff)
parent0ef0c50536e5eb6ad3455b5828983307edbab828 (diff)
Merge branch 'branch-1.3' into debian
Diffstat (limited to 'src/drivers/ao_mpu6000.c')
-rw-r--r--src/drivers/ao_mpu6000.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/drivers/ao_mpu6000.c b/src/drivers/ao_mpu6000.c
index f8ce7346..c0458027 100644
--- a/src/drivers/ao_mpu6000.c
+++ b/src/drivers/ao_mpu6000.c
@@ -21,7 +21,6 @@
#if HAS_MPU6000
-static uint8_t ao_mpu6000_wake;
static uint8_t ao_mpu6000_configured;
#ifndef AO_MPU6000_I2C_INDEX
@@ -133,7 +132,7 @@ ao_mpu6000_gyro(int16_t v)
#endif
static uint8_t
-ao_mpu6000_accel_check(int16_t normal, int16_t test, char *which)
+ao_mpu6000_accel_check(int16_t normal, int16_t test)
{
int16_t diff = test - normal;
@@ -147,7 +146,7 @@ ao_mpu6000_accel_check(int16_t normal, int16_t test, char *which)
}
static uint8_t
-ao_mpu6000_gyro_check(int16_t normal, int16_t test, char *which)
+ao_mpu6000_gyro_check(int16_t normal, int16_t test)
{
int16_t diff = test - normal;
@@ -293,13 +292,13 @@ _ao_mpu6000_setup(void)
ao_delay(AO_MS_TO_TICKS(200));
_ao_mpu6000_sample(&normal_mode);
- errors += ao_mpu6000_accel_check(normal_mode.accel_x, test_mode.accel_x, "x");
- errors += ao_mpu6000_accel_check(normal_mode.accel_y, test_mode.accel_y, "y");
- errors += ao_mpu6000_accel_check(normal_mode.accel_z, test_mode.accel_z, "z");
+ errors += ao_mpu6000_accel_check(normal_mode.accel_x, test_mode.accel_x);
+ errors += ao_mpu6000_accel_check(normal_mode.accel_y, test_mode.accel_y);
+ errors += ao_mpu6000_accel_check(normal_mode.accel_z, test_mode.accel_z);
- errors += ao_mpu6000_gyro_check(normal_mode.gyro_x, test_mode.gyro_x, "x");
- errors += ao_mpu6000_gyro_check(normal_mode.gyro_y, test_mode.gyro_y, "y");
- errors += ao_mpu6000_gyro_check(normal_mode.gyro_z, test_mode.gyro_z, "z");
+ errors += ao_mpu6000_gyro_check(normal_mode.gyro_x, test_mode.gyro_x);
+ errors += ao_mpu6000_gyro_check(normal_mode.gyro_y, test_mode.gyro_y);
+ errors += ao_mpu6000_gyro_check(normal_mode.gyro_z, test_mode.gyro_z);
if (!errors)
break;
}