Patrick José Pereira
91ea129be3
AP_Compass: Add support to AK09915
...
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-11-10 18:11:34 -03:00
Willian Galvani
4c756fd7ef
AP_Compass: update MMMC5XX3 driver to support only mmc5983
...
Registers changed
Product ID changed
Data is now Big endian
Results are now 18 bits instead of 16, but we only consume 16.
Added SPI support
Co-authored-by: Patrick Pereira <patrickelectric@gmail.com>
Co-authored-by: Jacob Walser <jwalser90@gmail.com>
2021-11-10 11:38:25 +11:00
Andrew Tridgell
613f970870
AP_Compass: added AK09918 support
...
minor update over AK09916
2021-10-06 18:16:00 +11:00
Jacob Walser
8defcb9169
AP_Compass: add memsic MMC5883 driver
2021-04-07 16:03:57 +10:00
Andrew Tridgell
a068e95a48
AP_Compass: added ExternalAHRS driver
2021-01-05 21:13:12 +11:00
Andrew Tridgell
bfa2feb8d8
AP_Compass: fixed build warnings for MSP with AP_Periph
2020-09-15 09:40:03 +10:00
yaapu
5e88a856e9
AP_Compass: support for MSP compass
2020-09-09 06:35:50 +10:00
Andrew Tridgell
a0cf4e158a
AP_Compass: revert change to RM3100 scale factor and increase scale limit
...
This reverts the change from #13895 and instead resolves the issue by
increasing the scale factor limit to 1.4
There is an open question as to why some RM3100 compasses show a
different scale factor (by about 1.25 times) to other versions of the
same sensor. As we haven't resolved this properly it seems the correct
thing to do is follow the datasheet but allow for a wider range of
scale factors to cope with the variation between sensors
2020-05-24 15:06:15 +10:00
Andrew Tridgell
dd4cf6ccdd
AP_Compass: change RM3100 device ID
...
changed scale factor means users need to recalibrate
2020-04-08 11:21:51 +10:00
Siddharth Purohit
8d227d401a
AP_Compass: modify compass driver to support consistent ordering and hotplugging
2020-02-19 13:59:53 +09:00
Andrew Tridgell
0ca45059ac
AP_Compass: make all semaphores recursive
...
the cost is very similar and this prevents an easy coding error which
can occur on less used code paths
2020-01-19 20:19:30 +11:00
thomass
8155c8b178
AP_Compass: added backend implementation for RM3100 compass
2019-02-10 08:00:49 +11:00
Lucas De Marchi
c3d87f91fc
AP_Compass: add support to IST8308
2018-10-25 20:19:30 -07:00
Andrew Tridgell
925555c995
AP_Compass: move accum fields to frontend
...
this is needed to ensure they are per-instance. Without this the SITL
backend produces zero for all but the first instance. The same would
be true for any multi-instance backend
2018-10-17 12:54:22 +11:00
Andrew Tridgell
a260792e9e
AP_Compass: use WITH_SEMAPHORE()
...
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Lucas De Marchi
329516373c
AP_Compass: add common method to accumulate and drain samples
...
Instead of repeating on each driver the same sequence of steps,
let's move them to the common parent class. This only implements
it, but no driver was ported yet.
2018-10-15 14:41:09 -07: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
Siddharth Purohit
14b701cff8
AP_Compass: move UAVCAN mag subscribers and handlers to Compass Backend
2018-08-29 22:54:59 +01: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
cbd6f4cc21
AP_Compass: fixed compass for tailsitters in SITL
2018-07-20 14:21:06 +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
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
night-ghost
b6bf90ab93
AP_Compass: mAG3110 driver
2018-02-02 21:07:40 +11: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
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
Eugene Shamaev
3e044c7b8a
AP_Compass: support for UAVCAN connected magnetometers
2017-04-10 22:38:12 +01: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
Andrew Tridgell
62805f59fa
AP_Compass: added AK09916 driver
...
yet another magnetometer!
2016-11-25 17:50:24 +11:00
Andrew Tridgell
0e4b8781b2
AP_Compass: auto-detect LIS3MDL compass
2016-11-25 17:50:23 +11:00
Andrew Tridgell
4ba00720aa
AP_Compass: make init() private
...
not called from frontend
2016-11-10 11:44:52 +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
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
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
1c631ea037
AP_Compass: cleanup use of backend semaphores
...
fixed drivers that didn't protect accumulation counters
2016-11-09 17:08:01 +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
Gustavo Jose de Sousa
ad91a810b3
AP_Compass: Backend: add method is_external()
2016-05-10 15:55:58 -03:00
Andrew Tridgell
88a1ebaf0e
AP_Compass: allow setting of exact timestamp in HIL compass
2016-05-07 18:27:19 +10:00
Lucas De Marchi
20a4a42cb3
AP_Compass: don't store raw and unfiltered fields
...
These are not used. The only place where raw fields are used are in the
compass calibrator and we don't need to store them.
Additionally remove duplicated documentation about the meaning of the
functions to avoid them getting out of sync.
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
Lucas De Marchi
1a71c169fe
AP_Compass: replace header guard with pragma once
2016-02-18 14:52:34 -02:00
Gustavo Jose de Sousa
0caaef7394
AP_Compass: mention mag field unit in existing documentation
...
We are now always using milligauss for mag field unit, so let's update
documentation accordingly.
2015-10-15 19:56:15 +09:00
Gustavo Jose de Sousa
9927cf066f
AP_Compass: remove use of milligauss_ratio
...
Now, we have all current compasses publishing their values already in
milligauss, so there's no need for that variable anymore.
2015-10-15 19:56:14 +09:00
Andrew Tridgell
c59bdc12df
AP_Compass: fix the milligauss handling
...
the previous approach assumed a 1:1 mapping between compass backends
and compass instances, which isn't true on PX4.
It also only setup milligauss offsets on a set_and_save call, which is
not the only way offsets change
this adds a milligauss_ratio per instance, which is considerably
simpler
2015-09-09 14:53:11 +10:00
Staroselskii Georgii
c207d8c6a8
AP_Compass: add milligauss counterparts to get_field() and get_offsets()
...
From now on there's a pair get_field_milligauss() and
get_offsets_milligauss() that can make the transition to the common
units across all compasses easier.
2015-09-09 10:38:16 +10:00
Jonathan Challinger
add1b8c257
AP_Compass: modify backend interface to push raw samples to frontend
2015-09-03 16:59:09 +10:00
Andrew Tridgell
a871c87cad
AP_Compass: use state array for compass variables
2015-03-13 18:46:15 +11:00