Commit Graph

22 Commits

Author SHA1 Message Date
Lucas De Marchi 3ba27df405 AP_Compass: BMM150: minor refactors
- Correctly sort includes and add missing AP_Math.h
  - Use anonymous struct for trim_registers in _load_trim_values,
    renaming its members so they don't start with underscore
  - Don't change _dig* values when we failed to read from sensor
  - Add some blank lines
  - Make _dig_* members be inside a _dig struct
  - Use constrain_int32 instead of if/else chain
  - s/time_us/time_usec/
  - Construct raw_field with a single constructor in _update()
  - Add missing copyright notice
  - Group methods together in declaration
2016-07-06 10:04:05 -03:00
José Roberto de Souza 6e53854122 AP_Compass: Add BMM150 backend 2016-07-06 10:03:30 -03:00
Lucas De Marchi 9ccce2c980 AP_Compass: explicitely add compasses for erlebrain2, pxf and pxfmini 2016-05-18 18:24:14 -03:00
Lucas De Marchi 8372e74c0f AP_Compass: simplify handling of sensors for Linux boards
In addition:
    - bbbmini, navio and navio2 can force HMC5843 backend to
      be external.
    - there was a typo in the backend name that's now fixed:
      AK8953 vs AK8963
2016-05-18 18:24:14 -03:00
Staroselskii Georgii 2e5cfc2849 AP_Compass: added external compass autodetection on Navio 2016-05-10 17:24:43 -03:00
Staroselskii Georgii 62f2695e83 AP_Compass: added several compasses' autodetection on Navio 2 2016-05-10 17:24:43 -03:00
Staroselskii Georgii 71736a0ecc AP_Compass: enable LSM9DS1 magnetometer for boards without default one 2016-05-10 17:24:43 -03:00
Lucas De Marchi 68ae619448 AP_Compass: detect compasses for minlure
Minlure has an onboard compass (HMC5883L) as slave of MPU-6000, but also
allows the use of an external HMC5883L compass, which should be
connected to the lure's I2C port.
2016-05-10 16:08:39 -03:00
Gustavo Jose de Sousa 670b0071f9 AP_Compass: HMC5843: add parameter force_external to constructor
And to the detection probe() method. That way we don't need to use a board
`#ifdef` inside the class code.  Additionally, we make raspilot board use it.
2016-05-10 15:52:54 -03:00
Andrew Tridgell 88a1ebaf0e AP_Compass: allow setting of exact timestamp in HIL compass 2016-05-07 18:27:19 +10:00
Andrew Tridgell 0e32c047c3 AP_Compass: allow for COMPASS_EXTERNAL=2 for forced external
this allows users with unusual compass bus connections to force the
compass to external
2016-05-01 10:54:46 +10:00
Andrew Tridgell ed999a283f AP_Compass: added get_learn_type() API
this allows caller to determine if EKF offsets should be saved
2016-04-30 16:43:14 +10:00
mirkix 3df5a02448 AP_Compass: Add HMC5843 and second AK8963 autodetection to BBBmini 2016-04-24 10:57:57 -03:00
Lucas De Marchi cf2d866d51 AP_Compass: LSM303D: used AP_HAL::Device interface
Initialization was also changed a little bit so we don't try to
initialize 25 times. We rather use the same methods as in the
AP_InertialSensor drivers.

Also move up the call to is_zero() in read_raw so we don't set
_mag_[x|y|z] in case of failure.
2016-03-23 17:50:38 -03:00
Lucas De Marchi 5164fbb81b AP_Compass: LSM303D: cleanup driver
Make it similar to other compass drivers, including method names.
2016-03-23 17:50:38 -03:00
Lucas De Marchi e6059f5197 AP_Compass: rename files to follow other libraries
AP_Compass.h is the main header to be exported and AP_Compass.cpp its
implementation. There's no need for an additional header.
2016-03-23 17:50:38 -03:00
james.goppert b66b0f6cce Fixed issues with AP_Compass
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1003 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-02 06:23:56 +00:00
jasonshort 729cf47b3c needs some help
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1001 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-02 05:54:02 +00:00
deweibel 52ed7fac8c corrections to imu and dcm libs, addition of vector member to compass class for magnetic vector
git-svn-id: https://arducopter.googlecode.com/svn/trunk@844 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-15 02:15:16 +00:00
jasonshort 11ccbb9ed7 added ground_course 0-36000 for Ardupilot
git-svn-id: https://arducopter.googlecode.com/svn/trunk@353 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-08-30 00:18:56 +00:00
jasonshort 2ca8ac7259 added ground_course in proper 0-360 degrees * 100 for Ardupilot
git-svn-id: https://arducopter.googlecode.com/svn/trunk@348 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-08-30 00:09:47 +00:00
jasonshort cf7eefd94b new Compass Lib
git-svn-id: https://arducopter.googlecode.com/svn/trunk@347 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-08-29 23:03:49 +00:00