summaryrefslogtreecommitdiff
path: root/src/drivers/ao_mpu6000.c
Commit message (Collapse)AuthorAge
* altos: Use stdbool true/false instead of TRUE/FALSEKeith Packard2018-10-13
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Update sensor data atomicallyKeith Packard2017-06-11
| | | | | | | | | | | Read data into a temp variable, block interrupts, then update the published value. The bug is easy to see with the HMC5883 which has to byte-swap the output of the chip, and hence can occasionally get caught with the wrong byte order data. Signed-off-by: Keith Packard <keithp@keithp.com>
* Switch from GPLv2 to GPLv2+Keith Packard2016-07-12
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Clean up -Wextra warningsKeith Packard2013-12-20
| | | | | | | Unused variables, mismatching signed/unsigned and a few other misc warnings. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Clean up some minor warnings from -WallKeith Packard2013-12-20
| | | | | | Unused variables, functions and labels, missing enums in switch. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Try IMU self-test 10 times before giving upKeith Packard2013-12-18
| | | | | | | | This should keep the device from failing to boot unless the IMU is actually broken. Oh, and if self test does fail, this places the flight computer in 'Invalid' state rather than panic. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add gyro-based orientation trackingKeith Packard2013-10-25
| | | | | | | This tracks the angle-from-vertical as an additional input to the pyro channels. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Grab SPI mutex until MPU6000 I2C mode is disabledKeith Packard2013-05-15
| | | | | | | | If other drivers use the SPI bus, the MPU6000 gets confused as its sitting on the bus looking for I2C messages. Just grab the mutex before the OS is running and hold onto it until the MPU6000 has been initialized. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Initialize MPU6000 CS pin for SPI modeKeith Packard2013-05-15
| | | | | | Without this, we can't talk to the chip very well Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add TeleMega v0.3 supportKeith Packard2013-04-25
| | | | | | Includes adding SPI support to the MPU6000 driver Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Document which MPU6000 revs have broken accel valuesKeith Packard2013-02-04
| | | | | | | | | From Tridge -- MPU6000 rev C4 and C5 are broken, having accelerometer values in the wrong range. This commit just adds comments which note this; experimentation will be required to actually sort out what's going on. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Go back to recording sensor data in globalsmm-ms5611Keith Packard2012-10-08
| | | | | | | | Instead of trying to get things into the ring from a variety of functions, go back to the simpler method of storing them in globals and having the ADC code just pluck out the most recent values. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add custom panic noise for self-test failuresKeith Packard2012-08-31
| | | | | | Make it easier to tell which component is failing self test Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Trigger sample complete when all data are readyKeith Packard2012-08-26
| | | | | | | This has each sensor mark a bit in the current data record which is then sent for processing when all of the data are present. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: panic if MPU6000 self test failsKeith Packard2012-06-27
| | | | | | Don't try to fly if the board isn't working right. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Don't start ADC ring until the other sensors have a valid valueKeith Packard2012-05-27
| | | | | | Yes, this is still an ugly kludge, but it's easy. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Poll mpu6000 values every tick and stash them locally.Keith Packard2012-05-18
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Conditional byte swapping in mpu6000 driverKeith Packard2012-05-18
| | | | | | Only needed on LSB machines. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Get mpu6000 workingKeith Packard2012-05-07
| | | | | | | This initializes the device appropraitely, and provides a command to dump the current values in converted form. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: STM i2c work.Keith Packard2012-05-06
| | | | | | | Start now driven by interrupts Send now done with DMA and interrupts Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add mpu6000 and hmc5883 stubsKeith Packard2012-04-25
No real drivers here yet, just some testing stubs Signed-off-by: Keith Packard <keithp@keithp.com>