Commit Graph

69 Commits

Author SHA1 Message Date
Andrew Tridgell 9442fc13e4 mpu6000: show temperature in "mpu6000 info" 2015-03-17 13:44:53 +11:00
Lorenz Meier 92a52ea195 MPU6000 driver: Rotate before applying offsets. 2015-03-15 17:26:11 +01:00
Lorenz Meier 2cf0aec332 MPU6K: Allow stop 2015-02-28 14:31:39 +01:00
Lorenz Meier 1eb4ec6ec9 MPU6K: Move to 0 based indices 2015-02-09 22:56:24 +01:00
Thomas Gubler 3e7faa6018 mpu6000: fix if style 2015-02-03 18:21:04 +01:00
Thomas Gubler a4961092af mpu6000: check for default sample rate
Also check if input variable is 0 and fix indentation
2015-02-03 18:13:01 +01:00
hauptmech 0b784c20c8 Save and check device id for acc and gyro calibration parameters.
Fix config utility to work with all devices of each type.
Accel, gyro and mag devices correctly set their device_id devtype.
Combo devices (mpu6000 lsm303d) now correctly return their devtype.
config util shows device id for all sensor types.
Add, save during calibration and check during preflight ID parameters for accelerometer and gyro
2015-01-31 15:53:34 +01:00
Lorenz Meier d851a630d8 Move all drivers to multi pub/sub API 2015-01-29 16:33:53 +01:00
Lorenz Meier 52f3fe1d9a Added more docs to offset as suggested by @velocoderaptor, thanks! 2015-01-26 20:23:42 +01:00
Lorenz Meier b8fade7dcf MPU6K: Improve gyro self test to allow more realistic deviations from nominal state 2015-01-26 20:04:56 +01:00
Johan Jansen 9c627255cc MPU6000: Increase gyro offset tolerance to 7 dps 2015-01-26 19:59:16 +01:00
Lorenz Meier 2bff39d562 MPU6K driver: Start performance counters for system latency, as its commonly the main sensor 2015-01-11 11:03:55 +01:00
Andrew Tridgell 82b9e08e4c mpu6000: removed unsafe printf in interrupt context
instead delay 3ms between register writes. This seems to give a quite
high probability of correctly resetting the sensor, and does still
reliably detect the sensor going bad, which is the most important
thing in this code
2015-01-01 08:51:57 +11:00
Andrew Tridgell 4a81384b2d mpu6000: make register fixup much closer to a reset()
this may help automatic reset on the faulty boards
2014-12-30 20:55:57 +01:00
Andrew Tridgell e537de20e3 mpu6000: wait for 10ms after a full reset
this prevents the mpu6000 getting in a really weird state!
2014-12-30 20:55:57 +01:00
Andrew Tridgell 333039d3db mpu6000: added "mpu6000 testerror" command
used to generate a error case for reset testing
2014-12-30 20:55:57 +01:00
Andrew Tridgell b157466608 mpu6000: monitor some more registers 2014-12-30 20:55:57 +01:00
Andrew Tridgell e5d3c80686 mpu6000: added factory self-test function
this follows the factory calibration self-test method in the datasheet
to see if the sensor still has the same calibration it had in the factory
2014-12-30 20:55:57 +01:00
Andrew Tridgell ae3a92569d mpu6000: try resetting the mpu6000 up to 5 times
this mirrors the ardupilot driver. We have seen situations where the
mpu6000 on the Pixhawk comes up in SLEEP mode, despite a reset
2014-12-30 20:55:57 +01:00
Andrew Tridgell 3e06a65516 mpu6000: monitor some key registers for correct values
this will catch both bad SPI bus comms and a sensor that has been
reset causing incorrect configuration.
2014-12-30 20:55:57 +01:00
Grant Morphett 1910b7e88b MPU6000: Add regdump command
Add mpu6000 regdump command for debugging mpu6000.
2014-12-21 14:59:47 +01:00
Andrew Tridgell c396a67746 mpu6000: added logging of good transfers
this helps tracking down a startup issue
2014-10-30 08:47:03 +11:00
Lorenz Meier 8ced6bb49b Set filter frequency for hardware and software in parallel, always do so in the same order 2014-09-30 10:05:39 +02:00
Randy Mackay 3e1eec5906 mpu6k: set hardware filter during ACCELIOCLOWPASS
also set from GYROIOCLOWPASS

Conflicts:
	mavlink/include/mavlink/v1.0
2014-09-30 10:03:15 +02:00
Lorenz Meier c5e4f33bb3 Merge sensor_startup_cleanup 2014-07-16 15:26:22 +02:00
Lorenz Meier 164b4ef4ce MPU6K: Cleaner init 2014-07-16 08:58:18 +02:00
Lorenz Meier 5b38b5e371 MPU6K: Start handler startup and stack review and adjustments 2014-07-16 07:55:53 +02:00
Lorenz Meier 32ed1eae80 mpu6000: Support for up to three accels / gyros 2014-07-15 23:14:50 +02:00
Lorenz Meier e696ed5509 Merged master 2014-07-15 22:07:03 +02:00
Andrew Tridgell 8a3a87331d mpu6000: fixed internal/external mixup in pointers
Thanks to Emile for spotting this!

Conflicts:
	mavlink/include/mavlink/v1.0
2014-07-12 16:27:39 +02:00
Lorenz Meier 875be65242 MPU6000: Fix usage function call to fit existing structure. 2014-07-08 13:52:28 +02:00
Andrew Tridgell c681d6621d mpu6000: added -R rotation option 2014-07-08 11:46:47 +02:00
Andrew Tridgell 19dbbf17e8 mpu6000: allow for two mpu6000 instances, one internal, one external
split g_dev into g_dev_int and g_dev_ext
2014-07-08 11:44:58 +02:00
Andrew Tridgell 541dc1825c mpu6000: added -X option for external bus 2014-07-08 11:44:22 +02:00
Andrew Tridgell ef79d03276 mpu6000: allow disabling of on-sensor low pass filter
used for vibration testing
2014-07-08 11:40:54 +02:00
Lorenz Meier 73d4d6faec MPU6K: Use usleep where usleep should be used instead of up_udelay() 2014-06-22 16:49:52 +02:00
Lorenz Meier 506f900513 Introduce MPU6K multi-device uORB support 2014-06-10 15:06:05 +02:00
Lorenz Meier aa312f96f8 drivers: Fix compile warnings and non-standard performance counter names 2014-05-21 14:20:48 +02:00
Julian Oes 1be3ea4f4e MPU6000: gyro topic was not initialized 2014-02-16 12:18:22 +01:00
Lorenz Meier d199710651 Fixed up init sequence of all sensors - we can publish in interrupt context, but not advertise! All advertisements now contain valid data 2014-01-14 15:40:46 +01:00
Lorenz Meier 7af62bbe9e Support for publication blocking: MPU6000, cleaned up device start 2014-01-12 11:54:38 +01:00
Andrew Tridgell bccf65cc28 mpu6000: disable interrupts during initial reset
this seems to avoid a problem where the mpu6000 doesn't startup
correctly if other devices are transferring at the same time.
2013-12-16 15:06:45 +01:00
Lorenz Meier f4ac204f46 Cranking up bus speeds for all sensors to achievable 10.4 MHz, will cut the bus lock time to half 2013-12-15 18:32:46 +01:00
Andrew Tridgell 2b491a7954 mpu6000: treat all zero data from mpu6k as bad 2013-12-10 11:39:50 +01:00
Andrew Tridgell 39b40e41c2 mpu6000: close fds before exit 2013-12-10 11:39:20 +01:00
Andrew Tridgell b55403c551 mpu6000: use register_class_devname() 2013-12-10 11:38:30 +01:00
Lorenz Meier 7becbcdbd5 Made all usual suspects default to their custom names and only register the default name if its not already taken by someone else 2013-12-07 10:34:32 +01:00
Andrew Tridgell af47a3d795 mpu6000: change bus speed based on registers being accessed
this ensures we follow the datasheet requirement of 1MHz for general
registers and up to 20MHz for sensor and int status registers
2013-11-30 20:17:55 +11:00
Andrew Tridgell 4893509344 drivers: report error_count in drivers where possible 2013-09-12 09:26:49 +02:00
px4dev cefc7ac00e Rework the ringbuffer class so that it's not templated, and refactor its clients so they aren't dancing around the linker anymore. 2013-09-12 00:53:08 +02:00