Commit Graph

587 Commits

Author SHA1 Message Date
Andrew Tridgell a0e4ec0f3a AP_Compass: fixed bitmask typo 2017-06-18 18:15:47 +10:00
Touch 5da2e0b3fb Update code format 2017-06-18 17:25:20 +10:00
ljwang 8fff1ec4d4 add QMC5883L driver for GPS compass module 2017-06-18 17:25:20 +10:00
ljwang e648f2e61e add QMC5883L driver for GPS compass module 2017-06-18 17:25:20 +10:00
Andrew Tridgell bcd305c821 AP_Compass: fixes for merge with master 2017-06-09 14:56:33 +10:00
Andrew Tridgell 04430457d5 AP_Compass: attempts to diagnose the twitches in MMC3416 2017-06-09 14:56:33 +10:00
Andrew Tridgell 36932a2959 AP_Compass: implement full state machine for MMC3416
this uses 100Hz readings most of the time, but does slow offset
readings every 50 samples
2017-06-09 14:56:33 +10:00
Andrew Tridgell 167988b5c4 AP_Compass: implement MMC3416 temperature compensation
this is much slower, but removes temperature offset
2017-06-09 14:56:33 +10:00
Andrew Tridgell 736fb715ec AP_Compass: MMC3416 magnetometer driver 2017-06-09 14:56:33 +10:00
Randy Mackay 1ce2a7fcee AP_Compass: resolve AK09916 driver compiler warning 2017-06-07 20:38:12 +09:00
Andrew Tridgell d946d5da6f AP_Compass: enable AK09916 inside a ICM20948
the ICM20948 has an AK09916 which can be accessed via I2C bypass
2017-06-07 17:39:45 +10:00
mirkix d9d3d97e54 AP_Compass: BeagleBone Blue add external compass HMC5843 2017-06-01 17:11:34 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas 4c45b1c7ca AP_Compass: Use SI units conventions in parameter units
Follow the rules from:
http://physics.nist.gov/cuu/Units/units.html
http://physics.nist.gov/cuu/Units/outside.html
and
http://physics.nist.gov/cuu/Units/checklist.html
one further constrain is that only printable (7bit) ASCII characters are allowed
2017-05-17 18:07:25 +10:00
murata 46cba2c970 libraries: Delete the setting value for specific editor. 2017-05-11 13:18:41 -07:00
Peter Barker b39da462ec AP_Compass: use HAL_SEMAPHORE_BLOCK_FOREVER macro 2017-05-08 10:23:03 +09:00
Andrew Tridgell 45f27ceb9c AP_Compass: rename macros to avoid conflicts
these macros were also defined in NuttX in clock.h
2017-05-06 15:21:14 +10:00
Eugene Shamaev b3d9126407 AP_Compass: removal of legacy UAVCAN support 2017-04-17 17:27:18 +10:00
Pierre Kancir d3e27d8720 AP_Compass: example fix travis warning
missing function declaration
implicit cast
some style fix
2017-04-13 19:56:16 +01:00
Eugene Shamaev 3e044c7b8a AP_Compass: support for UAVCAN connected magnetometers 2017-04-10 22:38:12 +01:00
Andrew Tridgell ee2afd3242 AP_Compass: added COMPASS_OFFS_MAX
this allows setup of airframes with hatch magnets
2017-04-04 00:49:34 +01:00
Lucas De Marchi 5787b5a5c5 AP_Compass: IST8310: rename macros
Having "BIT" in the name gives the impression we are using the macro is
the bit position; however they have the values for those actions, not
the bit position. Rename BIT to VAL to be less confusing.
2017-03-24 12:06:19 +11:00
Lucas De Marchi 4bba643abb AP_Compass: IST8310: use variable periodic callback
This is the equivalent of sleep and wait for the conversion time,
after had triggered a new sample request. However it also has the added
benefits of sharing a thread with other sensors on the same bus.

Now we don't read the status register anymore since we have a guaranteed
wait time.
2017-03-24 12:06:19 +11:00
Lucas De Marchi ce1a13aa8f AP_Compass: IST8310: use FSR to reject samples 2017-03-24 12:06:19 +11:00
Lucas De Marchi d84851d8fa AP_Compass: IST8310: improve initialization
- Make sure device is reset while initializing.
 - Give better names to register macros
 - Average X, Y and Z by 16: sensor is internally running at 200 sps
   (theoretical, ~160 pratical). The wait time is ~6msec averaging
   by 16. We do 10msec.
2017-03-24 12:06:19 +11:00
Tom Pittenger c0691afc1f AP_Compass: reject outlier data in IST8310 data by detecting >14bit data 2017-03-24 12:06:19 +11:00
Tom Pittenger 8415fde697 AP_Compass: IST8310 chip does not follow right-hand rule format, flip z 2017-03-24 12:06:19 +11:00
Lucas De Marchi b339050e45 AP_Compass: IST8310: account for errors in measurment requests
If we don't recover for errors in the request for new sample, we may get
stuck with no sample anymore. Recover from bad transfers.
2017-03-24 12:06:19 +11:00
Lucas De Marchi 156efd6fec AP_Compass: use IST8310 for aerofc 2017-03-24 12:06:19 +11:00
Andrew Tridgell 37c9e08316 AP_Compass: support AUAV21 board 2017-03-01 17:24:10 +11:00
Jacob Walser 7121910fa7 AP_Compass: Set default learn parameter to disabled for Sub 2017-02-21 11:26:14 +11:00
murata bc7b2144e7 AP_Compass: Change from magic number 0 to definition name. 2017-02-18 14:12:36 +00:00
Lucas De Marchi dd98fc75a9 AP_Compass: BMM150: fix sampling time
We configure the sensor with an ODR of 30 Hz. There's no need to keep
calling the update function at 100Hz.
2017-02-11 01:37:49 -08:00
Andrew Tridgell 64a8f00a77 AP_Compass: disable esoteric compass drivers on FMUv2 2017-01-29 16:31:06 +11:00
murata af47a8e91c AP_Compass: Unify from print or println to printf. 2017-01-27 18:20:22 +11:00
Randy Mackay 855125381d AP_Compass: relax compass cal fitness and consistency checks 2017-01-27 11:20:02 +09:00
Randy Mackay 53d1585ebf Compass: relax compass consistency checks for pixracer 2017-01-21 12:10:00 +09:00
Randy Mackay 0c4e3cd8e4 Compass: pixracer calibration fitness default relaxed 2017-01-21 10:15:11 +09:00
Andrew Tridgell 58a0a6a2fc AP_Compass: disable lis3mdl for now
pending investigation of possible hw error
2017-01-14 12:40:04 +11:00
Lucas De Marchi 5472bc4de1 Global: change Device::PeriodicCb signature
Remove bool return as it's never being used and not supported on PX4.
2017-01-14 10:03:54 +11:00
murata a2649949df AP_Compass: Changed if statements to switch statement. 2016-12-19 22:28:34 +00:00
Andrew Tridgell 790d186c6c AP_Compass: switched to unified Invensese driver for AK8963 2016-12-16 12:31:34 +11:00
Andrew Tridgell a440ac4c9d AP_Compass: use a set_and_notify for external and IDs
ensure that GCS that connects quickly gets the right value
fixes issue #5364
2016-12-09 14:36:01 -08:00
Lucas De Marchi 899fce53ff AP_Compass: IST8310: minor fixes and refactors
- Inline code that needs to take and release the lock in init()
    function, just like other drivers
  - Minor changes to coding style and renames to be similar to other
    drivers
2016-12-09 10:08:37 -08:00
Georgii Staroselskii f061572e13 AP_Compass: add IST8310 support
One needs to specify I2C address and a bus number in AP_Compass.cpp to use it.
2016-12-09 10:08:37 -08:00
Pierre Kancir 385e5badd8 Ap_Compass: LIS3MDL fix order 2016-12-06 09:31:21 -08:00
Pierre Kancir c49c851a57 Ap_Compass: AK09916 fix order 2016-12-06 09:31:21 -08:00
Andrew Tridgell a1bce2b54d AP_Compass: use get_random16() 2016-12-02 09:49:38 +11:00
Andrew Tridgell 4f1f6ec019 AP_Compass: added retries during init for i2c devices
higher in init, lower for run
2016-12-02 09:47:51 +11:00
Georgii Staroselskii 865ff753f3 AP_Compass: use LSM9DS1 as primary for Navio 2
This compass has been proved to work better on Navio boards. Users also
don't like high offsets (even though, they don't really mean much in
this context) reported by AK8963 in MPU9250 on Navio 2.
2016-11-30 12:04:53 -08:00
Alexey Bulatov 96db31635d AP_Compass: set orientation ROLL_180 for LSM9DS1 on Navio2 2016-11-30 12:04:04 -08:00