thomass
8155c8b178
AP_Compass: added backend implementation for RM3100 compass
6 years ago
Lucas De Marchi
c3d87f91fc
AP_Compass: add support to IST8308
6 years ago
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
6 years ago
Andrew Tridgell
a260792e9e
AP_Compass: use WITH_SEMAPHORE()
...
and removed usage of hal.util->new_semaphore()
6 years ago
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.
6 years ago
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.
7 years ago
Siddharth Purohit
14b701cff8
AP_Compass: move UAVCAN mag subscribers and handlers to Compass Backend
7 years ago
Randy Mackay
99b54935db
Compass: remove accumulate
...
this method is a noop on all backends
7 years ago
Andrew Tridgell
cbd6f4cc21
AP_Compass: fixed compass for tailsitters in SITL
7 years ago
Andrew Tridgell
2fe2c8fbda
AP_Compass: initialise compass IDs saved in SITL
...
this ensures we don't get uncalibrates compasses in SITL
7 years ago
Andrew Tridgell
823c4523b3
AP_Compass: added SITL device IDs
7 years ago
night-ghost
f26bb0cfbe
AP_Compass: added range filter to backend, added its use in some sensors (thanks khancyr for style correction)
7 years ago
night-ghost
b6bf90ab93
AP_Compass: mAG3110 driver
7 years ago
Michael du Breuil
fb77d0739e
AP_Compass: Remove unused time calls, stash the time in the read loop
8 years ago
ljwang
e648f2e61e
add QMC5883L driver for GPS compass module
8 years ago
Andrew Tridgell
736fb715ec
AP_Compass: MMC3416 magnetometer driver
8 years ago
Andrew Tridgell
d946d5da6f
AP_Compass: enable AK09916 inside a ICM20948
...
the ICM20948 has an AK09916 which can be accessed via I2C bypass
8 years ago
Eugene Shamaev
3e044c7b8a
AP_Compass: support for UAVCAN connected magnetometers
8 years ago
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.
8 years ago
Andrew Tridgell
62805f59fa
AP_Compass: added AK09916 driver
...
yet another magnetometer!
8 years ago
Andrew Tridgell
0e4b8781b2
AP_Compass: auto-detect LIS3MDL compass
8 years ago
Andrew Tridgell
4ba00720aa
AP_Compass: make init() private
...
not called from frontend
8 years ago
Andrew Tridgell
3b53caad87
AP_Compass: keep old hmc5843 ID
...
prevent re-use. thanks to Lucas
8 years ago
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.
8 years ago
Andrew Tridgell
2716ab8408
AP_Compass: added support for per-instance rotations
8 years ago
Andrew Tridgell
147b253e65
AP_Compass: make device IDs match PX4 drivers
...
match in-tree drivers to PX4Firmware drivers
8 years ago
Andrew Tridgell
1c631ea037
AP_Compass: cleanup use of backend semaphores
...
fixed drivers that didn't protect accumulation counters
8 years ago
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.
8 years ago
Gustavo Jose de Sousa
ad91a810b3
AP_Compass: Backend: add method is_external()
9 years ago
Andrew Tridgell
88a1ebaf0e
AP_Compass: allow setting of exact timestamp in HIL compass
9 years ago
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.
9 years ago
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.
9 years ago
Lucas De Marchi
1a71c169fe
AP_Compass: replace header guard with pragma once
9 years ago
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.
9 years ago
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.
9 years ago
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
10 years ago
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.
10 years ago
Jonathan Challinger
add1b8c257
AP_Compass: modify backend interface to push raw samples to frontend
10 years ago
Andrew Tridgell
a871c87cad
AP_Compass: use state array for compass variables
10 years ago
Víctor Mayoral Vilches
13f0aa5ecd
AP_Compass: Separate common code into backend
...
_copy_to_frontend function takes care of abstracting
this code from the driver. For now the function takes
care of the offset and rotation that is common.
10 years ago
Víctor Mayoral Vilches
d3b76cd8d3
AP_Compass: split compass into frontend/backend
10 years ago