Commit Graph

179 Commits

Author SHA1 Message Date
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
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 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
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 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
murata a2649949df AP_Compass: Changed if statements to switch statement. 2016-12-19 22:28:34 +00: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
Andrew Tridgell 28b3de91cf AP_Compass: fixed orientation of internal i2c compass for FMUv1
thanks to Peter for noticing
2016-11-28 13:02:15 +11:00
Andrew Tridgell f62972d966 AP_Compass: fixed build on bhat
enable both compasses if found
2016-11-25 17:50:24 +11:00
Andrew Tridgell 62805f59fa AP_Compass: added AK09916 driver
yet another magnetometer!
2016-11-25 17:50:24 +11:00
Andrew Tridgell 17a117b324 AP_Compass: be a bit less verbose in startup 2016-11-25 17:50:23 +11:00
Andrew Tridgell 0e4b8781b2 AP_Compass: auto-detect LIS3MDL compass 2016-11-25 17:50:23 +11:00
Andrew Tridgell b6b2919126 AP_Compass: don't panic on too many compasses
just use the first ones found. Panicing because you have too many
isn't useful
2016-11-25 17:50:23 +11:00
Andrew Tridgell e4454c5056 AP_Compass: setup for new PX4 board IDs 2016-11-11 08:08:55 +11:00
Andrew Tridgell 0eac781559 AP_Compass: don't run the AK8963 on the external MPU9250
this saves us one mag slot for another external mag, and leaves the
primary MPU9250 undisturbed by the mag traffic on the bus
2016-11-10 13:05:22 +11:00
Andrew Tridgell 3d5c57c5dc AP_Compass: fixed orientation of PH2 in-tree compass drivers 2016-11-10 11:44:52 +11:00
Andrew Tridgell c68a6451cb AP_Compass: use in-tree drivers for PH2SLIM 2016-11-10 11:44:52 +11:00
Andrew Tridgell 3d48a72f59 AP_C0mpass: switch pixracer to always use in-tree drivers 2016-11-09 17:08:14 +11:00
Andrew Tridgell b363a65c2e AP_Compass: enable in-tree drivers for PHMINI 2016-11-09 17:08:13 +11:00
Andrew Tridgell 875fa60452 AP_Compass: fixed external I2C HMC5983 rotation on pixhawk 2016-11-09 17:08:11 +11:00
Andrew Tridgell 05769640d1 AP_Compass: support rotations on AK8963 2016-11-09 17:08:08 +11:00
Andrew Tridgell 2716ab8408 AP_Compass: added support for per-instance rotations 2016-11-09 17:08:08 +11:00
Andrew Tridgell 147b253e65 AP_Compass: make device IDs match PX4 drivers
match in-tree drivers to PX4Firmware drivers
2016-11-09 17:08:06 +11:00
Andrew Tridgell ac0ea12b42 AP_Compass: enable HMC5843 on SPI for PH2 2016-11-09 17:08:03 +11:00
Andrew Tridgell 974827aa82 AP_Compass: enabled AK8963 on PX4 2016-11-09 17:08:01 +11:00
Andrew Tridgell 2e4151d14e AP_Compass: enable lsm303d mag on FMUv2 2016-11-09 17:08:00 +11:00
Andrew Tridgell 7bd52eb112 AP_Compass: allow for in-tree drivers for PX4 2016-11-09 17:07:58 +11:00