From 8b2e457db8c4536440ecd7dc35d06f827fc008dc Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 16 Jul 2019 11:12:49 -0700 Subject: altos: Record all failed sensors and report status at power up Use DATA bits to mark which sensors have failed, then report that in beeps at startup time to help diagnose hardware failures while still allowing the board to be used over USB. Signed-off-by: Keith Packard --- src/drivers/ao_mpu6000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/drivers/ao_mpu6000.c') diff --git a/src/drivers/ao_mpu6000.c b/src/drivers/ao_mpu6000.c index 8c85ab01..c894239e 100644 --- a/src/drivers/ao_mpu6000.c +++ b/src/drivers/ao_mpu6000.c @@ -305,7 +305,7 @@ _ao_mpu6000_setup(void) } if (st_tries == ST_TRIES) - ao_sensor_errors = 1; + AO_SENSOR_ERROR(AO_DATA_MPU6000); /* Filter to about 100Hz, which also sets the gyro rate to 1000Hz */ _ao_mpu6000_reg_write(MPU6000_CONFIG, -- cgit v1.2.3