Commit Graph

74 Commits

Author SHA1 Message Date
Mark Charlebois
36f5d47ed9 Merge remote-tracking branch 'upstream/master' into linux
Signed-off-by: Mark Charlebois <charlebm@gmail.com>

Conflicts:
	src/modules/commander/gyro_calibration.cpp
	src/modules/mavlink/mavlink_ftp.cpp
2015-05-16 15:04:38 -07:00
Andrew Tridgell
a710159263 mpu6000: sample at 200usec faster rate to avoid aliasing
this runs the mpu6000 200usec faster than requested then detects and
disccards duplicates by comparing accel values. This avoids a nasty
aliasing issue due to clock drift between the stm32 and mpu6000
2015-05-07 15:16:32 +10:00
Mark Charlebois
9758112e31 Use px4_config.h instead of nuttx/config.h
Modified code to use OS independent header file for config settings.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:55:41 -07:00
Lorenz Meier
cb8e32f833 MPU6K: Temp support 2015-03-25 22:57:18 -07:00
Jonathan Challinger
89d5ae69d3 mpu6000: add set_accel_range 2015-03-25 22:02:05 -07:00
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