Commit Graph

212 Commits

Author SHA1 Message Date
Andrew Tridgell 481ae22671 AP_Compass: support new sensor config setup 2019-05-30 15:39:57 +10:00
Andrew Tridgell 532b82b3a3 AP_Compass: use DRIVER_HMC5843 to match driver name 2019-05-30 15:39:57 +10:00
Phillip Kocmoud 1f827004be AP_Compass: Enable AK09916 inside the ICM20948 2019-05-10 15:05:42 +10:00
Peter Barker bf23f1df67 AP_Compass: move responsibility for logging into library 2019-04-23 10:06:17 +10:00
Siddharth Purohit 6dc94b0e3d Compass: fix compass orientation for AK09916 on Cube 2019-04-17 06:47:14 +10:00
Peter Barker 54e3959a99 AP_Compass: move enabled parameter into compass library 2019-04-02 10:24:49 +11:00
Peter Barker f8be4efed4 AP_Compass: init never fails; return void rather than bool 2019-03-13 13:06:50 +11:00
Siddharth Purohit 6ff8f52957 AP_Compass: add support for AK09916 connected over fourth IMU over I2C 2019-03-06 20:47:10 +11:00
Siddharth Purohit cff8bf14b7 AP_Compass: add support for AK09916 via invensensev2 aux bus 2019-03-06 20:47:10 +11:00
Andrew Tridgell 7f3103073a AP_Compass: setup for fmuv6 2019-02-26 16:18:26 +11:00
thomass 8155c8b178 AP_Compass: added backend implementation for RM3100 compass 2019-02-10 08:00:49 +11:00
Andrew Tridgell 700519d805 AP_Compass: raise default max compass offsets
the larger offset doesn't present any problems for the compass
drivers, and helps on planes with magnetic hatches
2019-02-03 04:57:25 -08:00
Andrew Tridgell a21f4dc0c9 AP_Compass: update COMPASS_LEARN docs 2019-01-27 14:31:28 +11:00
Andrew Tridgell 1b95f17940 AP_Compass: removed F4Light 2019-01-21 21:57:21 +11:00
Randy Mackay 68363ff4a2 AP_Compass: devid param desc include ReadOnly 2018-12-27 10:08:11 +09:00
Phillip Kocmoud 27a2b8a350 AP_Compass: Increase default MAX compass offset
After discussing the @tridge and @rmackay9 it was suggested that raising the maximum allowable compass offset value would allow users of the LIS3MDL and possibly others with larger compass offsets to fly with the default setting. 

This has been deemed a fairly safe change that still allows for sufficient overhead to prevent saturation.
2018-10-30 09:25:51 +09:00
Lucas De Marchi 9d95579b2d AP_Compass: update TYPEMASK documentation
Add missing drivers IST8308 and MAG3110.
2018-10-25 20:19:30 -07:00
Lucas De Marchi 34fb98b1e0 AP_Compass: probe for IST8308 on external buses 2018-10-25 20:19:30 -07:00
Andrew Tridgell 5ac6309848 AP_Compass: enable in-flight compass learning system
using COMPASS_LEARN=3
2018-10-24 07:25:42 +10:00
vierfuffzig b455c7a769 AP_Compass: add rotation option for AK8963_MPU9250
allows using non-neutrally rotated AK8963 compass on MPU9250 as internal
reference: https://github.com/ArduPilot/ardupilot/pull/9459
2018-10-17 09:35:49 +11:00
Lucas De Marchi cd9b08dbae AP_Compass: rename variable for more buses
"all_external" reflects better the fact that we can have more than 2
buses (and now we are using the foreach macro).
2018-09-06 08:23:02 +10:00
Lucas De Marchi de535dc573 AP_Compass: remove unused external and name arguments
Aka "fix copy and pasta".
2018-09-06 08:23:02 +10:00
Lucas De Marchi 4039b51810 AP_Compass: stop passing frontend pointer
Let AP_Compass_Backend call AP::compass() *once* instead of passing
the frontend pointer over and over.
2018-09-06 08:23:02 +10:00
Lucas De Marchi 585b6dce0d AP_Compass: support more external compasses on aerofc
Let it probe on external bus. Aerofc has an HMC5883 on internal bus, but
we don't want it enabled as it interferes with the internal baro. Also
the rotation for the compass that comes with Aero RTF is different from
the other that got added later. That means people would need to orient a
third party IST8310-based compass differently on Aero RTF than on other
boards... that's a problem of having orientation based on the chip that
can't be solved on this commit.
2018-09-06 08:23:02 +10:00
Siddharth Purohit 14b701cff8 AP_Compass: move UAVCAN mag subscribers and handlers to Compass Backend 2018-08-29 22:54:59 +01:00
Andrew Tridgell 3ed7c060df AP_Compass: address review comments 2018-08-07 10:00:10 +10:00
Jonathan Challinger cefd998177 AP_Compass: add expected DEV_ID parameters 2018-08-07 10:00:10 +10:00
Jonathan Challinger 878e84a015 AP_Compass: correct edge case where checks pass when saved dev_id != detected dev_id 2018-08-07 10:00:10 +10:00
Randy Mackay 99b54935db Compass: remove accumulate
this method is a noop on all backends
2018-08-06 11:05:34 +10:00
Andrew Tridgell 2ded88e611 AP_Compass: allow override of QMC5883L orientation 2018-07-30 17:26:19 +10:00
Andrew Tridgell e39d070b78 AP_Compass: clear DEV_ID for undetected compasses
this prevents user confusion with the number of compasses detected
2018-07-30 13:07:55 +10:00
Andrew Tridgell b181340fd9 AP_Compass: allow override of COMPASS_AUTO_ROT 2018-07-28 18:05:12 +10:00
Andrew Tridgell 027beb0dc1 AP_Compass: rename COMPASS_ROT_AUTO to COMPASS_AUTO_ROT
request from Randy
2018-07-18 16:07:19 +10:00
Andrew Tridgell 196ba0e858 AP_Compass: make COMPASS_ROT_AUTO take 3 values
0 for disabled, 1 for check only, 2 for check and fix
2018-07-18 16:07:19 +10:00
Andrew Tridgell 8b0f40b402 AP_Compass: implement automatic compass orientation
this automatically determines the compass orientation when doing a 3D
compass calibration, if COMPASS_ROT_AUTO is enabled.
2018-07-18 16:07:19 +10:00
Andrew Tridgell ff6d639ed7 AP_Compass: separated out external compass probing
this allows any ChibiOS board to specify that it wants to probe for
all possible external compass types with a define in hwdef.dat

It also implements duplicate compass detection for all i2c drivers,
ensuring we can't get a load of a driver on the same bus/address twice
2018-07-14 17:51:50 +10:00
Andrew Tridgell f88a4b3a2f AP_Compass: fixed compass orientations on PH4 2018-07-10 18:29:14 +10:00
Andrew Tridgell 8fd69250bd AP_Compass: use I2C bus masks
this allows for external compasses on all external I2C ports, while
retaining existing device ordering
2018-07-10 15:39:47 +10:00
Peter Barker 4c2925d693 AP_Compass: remove pointless initialisations
If you are allocating one of these on the stack you're doing something
wrong.
2018-07-02 10:44:34 +10:00
Lucas De Marchi 49d08ba72a Global: remove minlure
Minlure is a port of ArduPilot to Minnow Board connected to daughter
board. Very few of those were produced and nobody is flying with it.

It served its purpose and all the the improvements to ArduPilot remain
regardless of it not being supported anymore. Now it's just adding
maintenance work with no clear benefit, so pull the plug.
2018-06-26 07:32:08 -07:00
Peter Barker 9eb53e333b AP_Compass: tidy consistency calculations
AP_Compass: normalize vectors in-place to save a few bytes (thanks MdB)
2018-06-26 18:37:55 +10:00
Andrew Tridgell 2d9df83ed5 AP_Compass: probe for ist8310 on bus 2 as well as 0 for fmuv5 2018-06-06 15:01:38 +10:00
Andrew Tridgell 99540a184c AP_Compass: enable FMUv5 compass 2018-06-06 07:15:41 +10:00
Andrew Tridgell ccdfc75dd9 AP_Compass: placeholder for FMUv5 2018-06-06 07:15:41 +10:00
Peter Barker a3a1967e05 AP_Compass: add AP::compass() singleton getter 2018-05-17 15:37:14 +10:00
Francisco Ferreira 0a3af28d17 AP_Compass: remove Qualcomm board support 2018-05-17 09:57:20 +10:00
mirkix 85fe07f1f0 AP_Compass: enable probe HMC5843 for PocketPilot 2018-05-12 07:16:50 +10:00
night-ghost a05c79f1d8 Compass: fix HAL_F4light compilation errors 2018-04-30 08:32:58 +10:00
Jacob Walser 44d0f7b2a1 AP_Compass: update ORIENT @Values 2018-04-24 13:04:37 +01:00
Jacob Walser 6699c59ad3 AP_Compass: add support for custom board orientations 2018-04-24 13:04:37 +01:00
kozinalexey 444c0bb54c AP_Compass: added ChibiOS external compass config 2018-04-14 11:09:34 +10:00
night-ghost 677f2bebc3 AP_Compass: added autodetect of all known compasses on external bus 2018-04-11 15:00:36 +10:00
night-ghost f26bb0cfbe AP_Compass: added range filter to backend, added its use in some sensors (thanks khancyr for style correction) 2018-04-11 14:46:42 +10:00
Michael du Breuil c66d15efd7 AP_Compass: Read current for compensation from the battery singleton 2018-03-27 22:12:21 +01:00
Nathan E dcf127b73d Compass: clarify compass orientation description
Resolves an error directing users to reference the flight controller (instead of the frame) for COMPASS_ORIENT.
Changed wing to side for all vehicles
2018-03-21 09:01:45 +09:00
LinJieqiang c73e7f0cf3 add IST8310 compass sensors in AP_Compass.cpp 2018-03-09 11:25:35 -08:00
Andrew Tridgell 8b3db7c09f AP_Compass: allow for HAL_COMPASS_NONE 2018-03-02 12:52:50 +11:00
Andrew Tridgell f61591c426 AP_Compass: added SP01 board type 2018-02-14 18:27:00 +11:00
Andrew Tridgell 52815cd952 AP_Compass: fixed compass orientation for mini-pix 2018-02-14 18:27:00 +11:00
ljwang 231aa16835 AP_Compass: support mini-pix 2018-02-14 18:27:00 +11:00
Andrew Tridgell 2c8e6bb834 AP_Compass: use generic defines for BMM150 2018-02-08 17:36:33 +11:00
Andrew Tridgell 57a3bc1397 AP_Compass: new compass learning system
this learns compass offsets using magnetic tables and compass
observations
2018-02-08 17:36:33 +11:00
Andrew Tridgell ca30f6aec8 AP_Compass: added per-motor compass calibration
this allows for a motor calibration vector per motor
2018-02-08 17:36:33 +11:00
Andrew Tridgell 2cc0f25ca0 AP_Compass: support PCNC1 2018-02-08 17:36:33 +11:00
Andrew Tridgell 23803df038 AP_Compass: allows boards to define orientation of HMC5843 2018-02-07 20:33:45 +11:00
LukeMike 432f6c2a4a VRBRAIN / APCompass: added compass sensor init for VR Brain boards 2018-02-05 08:26:49 +11:00
night-ghost b6bf90ab93 AP_Compass: mAG3110 driver 2018-02-02 21:07:40 +11:00
Andrew Tridgell 8e87c30a33 AP_Compass: fixed MindPX-v2 compass orientations 2018-01-15 11:46:02 +11:00
Andrew Tridgell 36a141f9f1 AP_Compass: support MindPX-v2 2018-01-15 11:46:02 +11:00
Andrew Tridgell 743714de4c AP_Compass: support ChibiOS FMUv4 2018-01-15 11:46:02 +11:00
Andrew Tridgell 5d9fa7f85b AP_Compass: support ChibiOS 2018-01-15 11:46:02 +11:00
Randy Mackay 86cbc445bd AP_Compass: ICM20948 default rotation to Pitch180Yaw90 2018-01-12 08:16:41 +09:00
Mark Whitehorn b0e2f06a7a AP_Compass: add LIS3MDL probe for Pixracer 2017-12-08 09:49:25 +11:00
HeBin 26de6de848 AP_Compass: add Robsense PhenixPro Devkit Board support 2017-11-22 10:10:21 -08:00
Georgii Staroselskii 710594eee3 AP_Compass: enable compass on Edge 2017-10-20 13:03:08 -07:00
Andrew Tridgell 5646afac1c AP_Compass: avoid double detection of the AK09916
with an ICM20948 we can double detect the compass due to the i2c pass-thru
2017-10-04 11:49:06 +11:00
Lucas De Marchi 2fc6e52431 AP_Compass: use IST8310 and HMC5883 as external mags 2017-09-27 09:25:34 -07:00
Francisco Ferreira 6e286a2e66
AP_Compass: re-enable QMC5883 compass driver by default
This reverts commit a657daf635
2017-09-27 12:24:36 +01:00
Andrew Tridgell 678bd084b7 AP_Compass: added IST8310 on FMUv3 I2C 2017-09-23 08:07:18 +10:00
Rufus Wong 9491f7da55 AP_Compass: Add break to prevent fallthrough of PIXRACER to PIXHAWK_PRO 2017-09-18 19:57:22 +10:00
Lucas De Marchi b1740e2d9c AP_Compass: remove raspilot 2017-09-12 15:06:19 -07:00
davidaroyer ad18e99bef AP_Compass: add support for Aerotenna OcPoC-Zynq hardware 2017-09-08 07:30:49 -07:00
Michael du Breuil fb77d0739e AP_Compass: Remove unused time calls, stash the time in the read loop 2017-09-07 19:53:14 +01:00
Mark Whitehorn 3642ecd9ef AP_COMPASS: fix errors in addition of alternate LIS3MDL I2C address
testing shows ROTATION_YAW_90 is correct for mRo Neo M8N GPS/compass
2017-08-10 19:46:26 +10:00
Mark Whitehorn a6e9baa8f6 AP_Compass: probe for LIS3MDL in mRo Neo-M8N GPS module 2017-08-10 19:46:26 +10:00
Randy Mackay a657daf635 Compass: disable QMC5883 compass driver by default
This driver causes occasional heading issues so disabling until these are resolved
2017-07-25 09:27:29 +09:00
Kevin Lopez Alvarez df406c4389 AP_Compass : increase max possible offset 2017-07-24 13:48:20 +10:00
Kevin Lopez Alvarez 08b531e6a8 AP_Compass: LIS3MDL correct orientation 2017-07-24 13:48:20 +10:00
Kevin Lopez Alvarez cf8c1c2665 AP_Compass: Remove comments and use correct board number 2017-07-24 13:47:44 +10:00
Kevin Lopez Alvarez 1467daee2a AP_Compass: add ppro support
disable lis3mdl for now
2017-07-24 13:47:06 +10:00
Andrew Tridgell 732dc5984a AP_Compass: added COMPASS_TYPEMASK parameter
this allows driver type to be disabled, to avoid probing them and
wasting CPU on sensors that are not being used

This also moves UAVCAN compass to be detected last, as discussed in the
dev call
2017-07-19 15:53:22 +10:00
ljwang 603e903ccd AP_Compass: QMC5883 Add internal i2c bus and fix rotation error 2017-07-12 12:56:59 +10:00
Eugene Shamaev aa1f6a7587 AP_Compass: united enumeration on startup, multiple CAN drivers, correct dev_id based on network and node ID 2017-07-03 11:44:32 +01:00
Miguel Arroyo ee328c9683 AP_Compass: move SITL Compass to standard sensor backend model 2017-06-29 09:22:08 +10:00
ljwang e648f2e61e add QMC5883L driver for GPS compass module 2017-06-18 17:25:20 +10:00
Andrew Tridgell 736fb715ec AP_Compass: MMC3416 magnetometer driver 2017-06-09 14:56:33 +10: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
Eugene Shamaev b3d9126407 AP_Compass: removal of legacy UAVCAN support 2017-04-17 17:27:18 +10:00