projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos: Replace __critical usage with ao_arch_critical as needed
[fw/altos]
/
src
/
drivers
/
ao_mpu6000.c
diff --git
a/src/drivers/ao_mpu6000.c
b/src/drivers/ao_mpu6000.c
index e8c80f12428943bf365977a03dbc9695656003ac..495967057336ef8930263467cb3cbdfc15850e4f 100644
(file)
--- a/
src/drivers/ao_mpu6000.c
+++ b/
src/drivers/ao_mpu6000.c
@@
-225,7
+225,7
@@
ao_mpu6000_setup(void)
errors += ao_mpu6000_gyro_check(normal_mode.gyro_z, test_mode.gyro_z, "z");
if (errors)
errors += ao_mpu6000_gyro_check(normal_mode.gyro_z, test_mode.gyro_z, "z");
if (errors)
- ao_panic(AO_PANIC_SELF_TEST);
+ ao_panic(AO_PANIC_SELF_TEST
_MPU6000
);
/* Filter to about 100Hz, which also sets the gyro rate to 1000Hz */
ao_mpu6000_reg_write(MPU6000_CONFIG,
/* Filter to about 100Hz, which also sets the gyro rate to 1000Hz */
ao_mpu6000_reg_write(MPU6000_CONFIG,
@@
-240,13
+240,15
@@
ao_mpu6000_setup(void)
ao_mpu6000_configured = 1;
}
ao_mpu6000_configured = 1;
}
+struct ao_mpu6000_sample ao_mpu6000_current;
+
static void
ao_mpu6000(void)
{
ao_mpu6000_setup();
for (;;)
{
static void
ao_mpu6000(void)
{
ao_mpu6000_setup();
for (;;)
{
- ao_mpu6000_sample(
(struct ao_mpu6000_sample *) &ao_data_ring[ao_data_head].mpu6000
);
+ ao_mpu6000_sample(
&ao_mpu6000_current
);
ao_arch_critical(
AO_DATA_PRESENT(AO_DATA_MPU6000);
AO_DATA_WAIT();
ao_arch_critical(
AO_DATA_PRESENT(AO_DATA_MPU6000);
AO_DATA_WAIT();