Commit Graph

706 Commits

Author SHA1 Message Date
Siddharth Purohit 14b701cff8 AP_Compass: move UAVCAN mag subscribers and handlers to Compass Backend 2018-08-29 22:54:59 +01:00
Francisco Ferreira 317e8e0296
AP_Compass: adapt to changes in AP_BoardConfig_CAN 2018-08-12 13:35:03 +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 c88926f227 Compass: remove accumulate from example sketch 2018-08-06 11:05:34 +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
Randy Mackay cb3731e08e Compass: fix compile warning in calibrator output 2018-07-30 14:57:01 +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 cbd6f4cc21 AP_Compass: fixed compass for tailsitters in SITL 2018-07-20 14:21:06 +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 15d2daabf0 AP_Compass: don't do auto-orientation if using ROTATION_CUSTOM 2018-07-18 16:07:19 +10:00
Andrew Tridgell a73492b40a AP_Compass: fixed newline in statustext 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 d15a4ad92a AP_Compass: improved error reporting, check all compasses
this uses extensions to the MAG_CAL_REPORT message to convey failures
of orientation checking.

It also checks all compasses, external or internal. It only tries to
fix the orientation if it is external
2018-07-18 16:07:19 +10:00
Andrew Tridgell a5749c1869 AP_Compass: allow diagonals and off-diagonals to be calculated on rot change
this re-runs the fit on change in orientation
2018-07-18 16:07:19 +10:00
Andrew Tridgell b4c7d1925e AP_Compass: allow for runtime changes to SIM_MAG_DIA_?
this makes for easier testing
2018-07-18 16:07:19 +10:00
Andrew Tridgell 3c2e8baee2 AP_Compass: improved orientation reporting
and fail magcal if we fail orientation detection for an external
compass
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 4acc06df87 AP_Compass: support diagonal, off-diagonal and rotation in SITL
compass
2018-07-18 16:07:19 +10:00
Andrew Tridgell 3c0ed01fd0 AP_Compass: prevent use of null dev_icm device in ICM20948 driver 2018-07-14 17:51:50 +10:00
Andrew Tridgell 71647cfc6b AP_Compass: removed HMC5843 compass probe error 2018-07-14 17:51:50 +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 7ec6522b9d AP_Compass: default to right mag offsets for SITL 2018-07-13 10:19:01 +10:00
Andrew Tridgell 2fe2c8fbda AP_Compass: initialise compass IDs saved in SITL
this ensures we don't get uncalibrates compasses in SITL
2018-07-13 10:19:01 +10:00
Andrew Tridgell 823c4523b3 AP_Compass: added SITL device IDs 2018-07-13 10:19:01 +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 051c811bfb AP_Compass: make compass_cal_requires_reboot const 2018-07-03 13:44:11 +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
Patrick José Pereira e456655932 AP_Compass: Use SITL singleton
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-06-26 00:02:01 +01:00
Andrew Tridgell b225868711 AP_Compass: detect conflict between AK09916 and ICM20948
this detects if we have both a AK09916 and an ICM20948 on the same i2c
bus. If that is found then the ICM20948 is disabled as it otherwise we
will have two devices on the same i2c address
2018-06-12 09:04:43 +10:00
Eugene Shamaev df6b7ed5ea AP_Compass_UAVCAN: update 2018-06-09 22:46:48 -07:00
Eugene Shamaev 9195ba80fc AP_Compass: helper func 2018-06-09 22:46:48 -07:00
Eugene Shamaev baa6daf270 AP_Compass: reducing indenting by linearizing the logic 2018-06-09 22:46:48 -07: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 4cffbf52d3 AP_COMPASS: fix MAG3110 driver 2018-05-07 11:45:29 +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