kozinalexey
444c0bb54c
AP_Compass: added ChibiOS external compass config
2018-04-14 11:09:34 +10:00
Andrew Tridgell
eccc4f375b
AP_Compass: fixed build warning
2018-04-12 11:50:44 +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
Peter Barker
face8151b7
AP_Compass: include required header
2018-04-09 11:34:35 +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
487b615faa
AP_Compass: allow for override of MAG_BOARD_ORIENTATION
2018-03-02 12:52:50 +11:00
Peter Barker
46dbb248f9
AP_Compass: correct compiler warnings
...
In file included from ../../libraries/AP_Compass/AP_Compass.h:14:
../../libraries/AP_Compass/Compass_PerMotor.h:57:13: warning: private
field 'channel' is not used [-Wunused-private-field]
uint8_t channel;
AP_Compass: fix compiler warning
../../libraries/AP_Compass/AP_Compass_MAG3110.h:52:11: warning: private
field 'compass_len' is not used [-Wunused-private-field]
float compass_len;
^
2018-03-02 09:26:37 +09: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
Randy Mackay
3bec25da85
AP_Compass: resolve compiler warnings
2018-02-10 08:54:34 +09: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
0d8cdd2728
AP_Compass: fixed warning
2018-02-07 20:33:45 +11:00
Andrew Tridgell
23803df038
AP_Compass: allows boards to define orientation of HMC5843
2018-02-07 20:33:45 +11:00
Siddharth Purohit
f0f4239d4a
AP_Compass: skip using posix headers for non posix systems
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
Andrew Tridgell
2067e25523
AP_Compass: make length filter in MAG3110 optional
...
compile time for now, later can may become parameter
2018-02-02 21:07:40 +11:00
night-ghost
b6bf90ab93
AP_Compass: mAG3110 driver
2018-02-02 21:07:40 +11:00
Andrew Tridgell
20d75f52c2
AP_Compass: use calloc in preferance to malloc
2018-01-17 11:22:05 +11:00
Andrew Tridgell
b741c6c29e
AP_Compass: fixed build error on ChibiOS
2018-01-15 11:46:02 +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
Andrew Tridgell
f326377a5c
AP_Compass: removed create() method for objects
...
See discussion here:
https://github.com/ArduPilot/ardupilot/issues/7331
we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach
Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11: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
Lucas De Marchi
69b6d95cb2
global: use static method to construct AP_Board_Config{,_CAN}
2017-09-26 03:01:21 +01:00
Lucas De Marchi
c1a957fbf3
global: use static method to construct Compass
2017-09-26 03:01:21 +01:00
Lucas De Marchi
320260a151
AP_Compass: add static create method
2017-09-26 03:01:21 +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
Lucas De Marchi
d5f57fdd93
AP_Compass: AK8963: remove fallback to timer thread
...
Now that the bus thread from the AuxiliaryBus is implemented we can
remove the fallback.
2017-09-11 09:52:41 -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
Francisco Ferreira
6cf8791eb5
AP_Compass: correct comment in LIS3MDL driver
...
Commit 17f2393c1b
decreased timer frequency but didn't change comment to match
2017-08-04 19:56:26 +01:00
Lucas De Marchi
6bab28397a
AP_Compass: remove user of timesliced logic
2017-08-02 08:00:53 -07:00
ljwang
5a7ec7d429
Delete write registers at start,using another way to repair
2017-08-02 16:15:14 +10:00
ljwang
648871a388
Fixed the QMC5883 identification,add check ID
2017-08-02 16:15:14 +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
17f2393c1b
AP_Compass: Decrease LIS3MDL ODR and timer
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
Peter Barker
6b53b5b5f3
AP_Compass: make handle_mag_cal_command return type stricter
2017-07-17 14:17:19 +01: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
Andrew Tridgell
f3d995a716
AP_Compass: improved robustness of BMM150 detection code
...
cope with bus errors on startup
2017-06-21 16:25:37 +10:00
Andrew Tridgell
68460144df
AP_Compass: added retries on init in BMM150
2017-06-21 16:25:37 +10:00
Andrew Tridgell
9b093c4a33
AP_Compass: fixed a numerical issue in BMM150 driver
...
we were getting the following:
ret=-32768 z=5 rhall=6267 z1=23743 z2=712 z3=-1035 z4=0 xyz1=6264 dividend=163840 dividend2=-1073577207 divisor=5253
the signed/unsigned casts for rhall and xyz1 did not produce the
desired result
2017-06-21 16:25:37 +10:00
Andrew Tridgell
0623db98d6
AP_Compass: cope with bus errors in BMM150
...
if we have bus errors the BMM150 can get confused, giving rubbish
output. This uses the checked register code to reset, and a full soft
reset after 250ms of no samples.
2017-06-21 16:25:37 +10:00
Andrew Tridgell
fa3d40af8a
AP_Compass: fixed shift typo
...
this doesn't affect LE MCUs like STM32
2017-06-21 16:25:37 +10:00
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
Alexey Bulatov
163fa07ac0
AP_Compass: make orientation of LSM9DS1 compass configurable
2016-11-30 12:02:07 -08:00
Randy Mackay
5009e83b6d
AP_Compass: fix build warning for HMC5843
2016-11-30 18:00:12 +09: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
7d57f00ca0
AP_Compass: removed debug line
...
this is now common when using in-tree drivers
2016-11-25 18:23:53 +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
1f403b02ef
AP_Compass: switch to continuous 155Hz mode for LIS3MDL
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
40ef68f104
AP_Compass: added a LIS3MDL compass driver
2016-11-25 17:50:23 +11:00
Lucas De Marchi
c6b0a71c47
AP_Compass: Calibrator: use inplace initializer on array
2016-11-18 20:03:30 -02:00
Siddharth Bharat Purohit
b36ee10e7c
AP_Compass: fix wrong memset in compass calibrator
2016-11-18 20:03:30 -02: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
4ba00720aa
AP_Compass: make init() private
...
not called from frontend
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
4602b4d679
AP_Compass: improve init and calibration of hmc5843
2016-11-09 17:08:15 +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
bd8867be38
AP_Compass: cope with NULL dev pointer in driver probe functions
2016-11-09 17:08:11 +11:00
Andrew Tridgell
3b53caad87
AP_Compass: keep old hmc5843 ID
...
prevent re-use. thanks to Lucas
2016-11-09 17:08:10 +11:00
Andrew Tridgell
02c2ba1331
AP_Compass: fixed dup semaphore bug
...
thanks to Lucas for spotting this!
2016-11-09 17:08:10 +11:00
Andrew Tridgell
f31a017ace
AP_Compass: changes to HMC5843 driver
...
this makes the HMC5843 use single-shot mode, which makes it more
robust to bus resets. It also adds WHOAMI checking and enables
automatic temperature compensation.
Unfortunately this makes existing calibration values incompatible, so
a re-cal is required. The device ID has been changed to reflect the
driver change.
2016-11-09 17:08:10 +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
fac895b0e6
AP_Compass: setup read flag for SPI transfers
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
de7913e8e9
AP_Compass: implement device IDs for compass drivers
2016-11-09 17:08:04 +11:00
Andrew Tridgell
ac0ea12b42
AP_Compass: enable HMC5843 on SPI for PH2
2016-11-09 17:08:03 +11:00
Andrew Tridgell
1c631ea037
AP_Compass: cleanup use of backend semaphores
...
fixed drivers that didn't protect accumulation counters
2016-11-09 17:08:01 +11:00
Andrew Tridgell
9afd51350e
AP_Compass: use thread per bus in more drivers
...
and removed use of timer suspend
2016-11-09 17:08:01 +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
36190ba545
AP_Compass: use thread per bus for lsm303d mag
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
Andrew Tridgell
96adfccae3
AP_Compass: switch hmc5983 driver to use periodic callback on the bus
...
this does not yet work with the mpu6000 auxiliary bus
2016-11-09 17:07:55 +11:00
murata
c808ee2f49
Global: To nullptr from NULL.
...
RC_Channel: To nullptr from NULL.
AC_Fence: To nullptr from NULL.
AC_Avoidance: To nullptr from NULL.
AC_PrecLand: To nullptr from NULL.
DataFlash: To nullptr from NULL.
SITL: To nullptr from NULL.
GCS_MAVLink: To nullptr from NULL.
DataFlash: To nullptr from NULL.
AP_Compass: To nullptr from NULL.
Global: To nullptr from NULL.
Global: To nullptr from NULL.
2016-11-02 16:04:47 -02:00
Peter Barker
e4001e67e2
AP_Compass: add missing parameter metadata
2016-10-27 09:15:03 -07:00
Michael du Breuil
deec4ec6af
Compass: Rework compass calibrator
...
Summary of significant changes:
-Autsave doesn't depend on STREAM_EXTRA3
-Don't risk only saving one compass on copter if CAL_ALWAYS_REBOOT is set
-Only calibrate compasses that are both health and marked for use (there was a inconsistency in handling the mask)
-Fix incorrect failure reporting on DO_ACCEPT_MAG_CAL with a mask of 0 if a channel was specifically not started
-Fix not starting the buzzer if the delay is set to 0 seconds
-Always send MAG_CAL_REPORT until its acknowledged
-Correct the field in MAG_CAL_REPORT for autosave to indicate if the compass had actually been saved, rather then being scheduled to be saved
-Remmove unused public interfaces
2016-10-27 14:04:33 +11:00
Mathieu OTHACEHE
152edf7189
Global: remove mode line from headers
...
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Peter Barker
216a6493c9
AP_Compass: AP_Compass_LSM9DS1: remove unused variable
2016-10-24 08:57:56 -02:00
Lucas De Marchi
ae53920e5b
build: don't build examples with old build system
...
We currently check examples are buildable with waf which doesn't need
the libraries to be specified in a make.inc file. Having the makefiles
there is misleading since people try to build and realize the build is
broken.
2016-10-11 13:03:08 +11:00
Andy Little
0d113b265c
Examples: fix examples for px4
...
The change to use AP_BoardConfig messed up the examples. Here are some
updated but there are plenty more to do.
2016-10-04 12:50:47 -03:00
Andrew Tridgell
36ea946cf5
AP_Compass: use board defined compass ofs max in calibrator
2016-09-23 10:53:00 +10:00
Jonathan Challinger
17fb7dc88f
AP_Compass: initialize offset before beginning sphere fit
2016-09-23 10:52:51 +10:00
Jonathan Challinger
419f1bc00e
AP_Compass: change fixed point format for more range
2016-09-23 10:52:46 +10:00
Jonathan Challinger
0652d71a72
AP_Compass: correct wrapping behavior in conversion to fixed point
2016-09-23 10:52:44 +10:00
Andrew Tridgell
f82827ce79
AP_Compass: removed disco special compass offsets
...
not needed any more with newer hardware
2016-09-14 19:06:06 +10:00
Randy Mackay
ba5db0c5d8
Compass: add CAL_FIT parameter description values
...
No functional change
2016-09-14 09:57:52 +09:00
José Roberto de Souza
13287f61e3
AP_Compass: Make COMPASS_AERO probe BMM150
2016-09-03 01:03:17 -03:00
Gustavo Jose de Sousa
b259356703
AP_Compass: BMM150: convert it to use Device periodic callback
2016-09-03 01:03:07 -03:00
Lucas De Marchi
667fca60f5
AP_Compass: BMM150: reduce lock region
...
Use a semaphore to update the accumulated values instead of using the
timer semaphore.
2016-09-03 01:03:07 -03:00
Matt
9eca21c26a
AP_Compass: Removed duplicate code
2016-08-29 10:38:41 -03:00
Lucas De Marchi
4595a2b7d8
AP_Compass: Remove i2c lockup count
...
This was returned only for a single bus and on all supported platforms
this is hardcoded to 0.
2016-07-28 18:03:09 -03:00
Lucas De Marchi
c6edae7e8e
Revert "Global: workaround toolchain problem on windows"
...
This reverts commit 4e2b30b413
.
The toolchain for windows is now updated, we can remove this workaround.
2016-07-25 17:56:12 -03:00
Andrew Tridgell
018d8f732a
AP_Compass: work around poor magnetic setup on Disco
...
bring compass offsets into line with what the calibrator can handle
2016-07-20 13:38:17 +10:00
Lucas De Marchi
4e2b30b413
Global: workaround toolchain problem on windows
...
The minimum version for gcc was supposed to be 4.9 for any platform.
However our build instructions are outdated. Remove the problematic
parts that use the sparse-endian.h header while we don't fix the setup
for windows.
2016-07-19 09:30:39 +09:00
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
Lucas De Marchi
1ddbafabdd
AP_Compass: add name field to internal compass drivers
2016-05-18 18:24:14 -03:00
Andrew Tridgell
f7ac6c8d86
AP_Compass: make internal compasses use a higher cal threshold
...
they tend to be a lot noisier
2016-05-18 16:32:32 +10:00
Gustavo Jose de Sousa
0c31354539
AP_Compass: implement completion mask
...
Fill the completion mask and send that through MAVLink while calibrating the
compass.
2016-05-16 19:08:36 -03:00
dgrat
f8540f1a80
AP_Compass: Do not use is_zero() for non-float types
2016-05-16 19:08:35 -03:00
Ricardo de Almeida Gonzaga
2e58653983
AP_Compass: Fix typos
2016-05-13 19:20:05 -03:00
Staroselskii Georgii
a2ae662b3e
AP_Compass: add an extra rotation for internal LSM9DS1 on Navio2
...
In order not to force users to set rotation themselves, we need this
hack to make an extra rotation needed for a second compass.
2016-05-10 17:24:43 -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
Staroselskii Georgii
b677f975e7
AP_Compass: added LSM9DS1 magnetometer support
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
91246ad8af
AP_Compass: HMC5843: apply HMC5883L "arrow" rotation only if external
...
That rotation is done because of the "arrow" pointing the sensor direction in
3DR GPS+Compass kit (which isn't natural to the sensor orientation, by the
way). Thus, do that rotation only for external HMC5883L compasses.
2016-05-10 16:05:29 -03:00
Gustavo Jose de Sousa
35cddc7af0
AP_Compass: HMC5843: move hardcoded rotation to before call to rotate_field()
...
That rotation is set for AP_COMPASS_TYPE_HMC5883L, because it's usually
the compass from 3DR GPS+Compass kit, which has an arrow pointing the
"correct" direction. That rotation should be done before rotate_field()
as it represents the "standard" position for the kit.
This patch also makes published values consistent with respect to rotation.
Before this, raw fields used in calibration were published with a
rotation different from the filtered field when _product_id is
AP_COMPASS_TYPE_HMC5883L.
2016-05-10 15:56:38 -03:00
Gustavo Jose de Sousa
ad91a810b3
AP_Compass: Backend: add method is_external()
2016-05-10 15:55:58 -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