Commit Graph

481 Commits

Author SHA1 Message Date
Gustavo Jose de Sousa 88a1a928e9 AP_Compass: remove get_{field,offsets}_milligauss() functions
Those functions are not being used anymore.
2015-10-15 19:56:09 +09:00
Gustavo Jose de Sousa 99a55f9379 AP_Compass: use compass get_{field,offsets}() functions
Both functions are equivalent, so we're going to simply use
get_{field,offsets}() instead of get_{field,offsets}_milligauss().
2015-10-15 19:56:02 +09:00
Gustavo Jose de Sousa 4375606eeb AP_Compass: make get_field() and get_offsets() return milligauss
This is part of a transition to make AP_Compass always use a single unit for
magnetic field values, namely milligauss.
2015-10-15 19:55:59 +09:00
Randy Mackay 825abdbedc Compass: example sketch displays in milligauss 2015-10-07 21:35:24 +09:00
mirkix ddb8e67954 AP_Compass: Add support for more then one AK8963 2015-10-06 10:38:21 +11:00
José Roberto de Souza 1a2b5ff677 AP_Compass: AK8963: Remove unused AP_HAL::Semaphore attributes 2015-10-01 10:42:51 -03:00
José Roberto de Souza a9d34ac3bd AP_Compass: AK8963: Rename some SPI/I2C method parameters
On read/write operations the argument is the register that will be read or
write not the address, SPI don't even have the concept of device address.
2015-10-01 10:42:40 -03:00
mirkix eee9522ca5 AP_Compass: Add MPU9250 multiple instance support 2015-09-24 13:11:38 +10:00
raspilot 1b5e6849d9 AP_Compass: fix milligauss code in LSM303D driver 2015-09-16 16:52:17 +09:00
Randy Mackay fff5ec09eb AP_Compass: fix consistent check for less than three compasses
Also use vector functions where available
Use get_field_milligause instead of just get_field
2015-09-16 15:11:01 +09:00
Jonathan Challinger 87bbf1a487 AP_Compass: add consistent() function 2015-09-16 15:10:27 +09:00
Julien BERAUD 5602e4055b AP_Compass_AK8963: Fix Rotation on the Bebop 2015-09-15 14:45:17 +09:00
Andrew Tridgell fa9ff5b604 AP_Compass: added parameter for compass calibration fitness threshold 2015-09-14 17:01:14 +10:00
Lucas De Marchi 309e75f9ac AP_Compass: LSM303D: use c++11 initializer to avoid Wreorder 2015-09-14 14:22:15 +10:00
Lucas De Marchi 3a017c8702 AP_Compass: LSM303D: rename members to follow convention
Make the members have similar names as HMC5843 driver and prepend
underscore on private fields.
2015-09-14 14:22:15 +10:00
raspilot 19b4f5559a AP_Compass: added LSM303D driver 2015-09-14 14:22:15 +10: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
Andrew Tridgell 3699932417 AP_Compass: fixed SITL compass 2015-09-09 14:53:11 +10:00
Staroselskii Georgii bd7c313bee AP_Compass: fixed Compass::get_raw_field()
It seems as if it were a copy-paste error. A statis analyzer would
definetely be angry.
2015-09-09 10:38:17 +10:00
Staroselskii Georgii e93ff44a97 AP_Compass: make a transition to milligauss in Compass library 2015-09-09 10:38:16 +10:00
Staroselskii Georgii 693613aa0f AP_Compass: convert AK8963 measurements to uT
AK8963 is configured in 16-bit ADC mode which implies sensitivity of 0.15 uT/LSb. Knowing this fact we can convert the measurements to the proper units. The change will make users recalibrate their compasses.
2015-09-09 10:38:16 +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
Andrew Tridgell 6991a1b9e9 AP_Compass: ensure we have payload space to send MAG_CAL messages 2015-09-07 08:58:11 +10:00
Andrew Tridgell 2baa0ac2f2 AP_Compass: disable COMPASS_LEARN when mag calibration used 2015-09-07 08:07:17 +10:00
Andrew Tridgell 079161ef3a AP_Compass: fixed raw_field init in AK8963 driver
thanks to Peter for spotting this
2015-09-03 21:27:22 +10:00
Andrew Tridgell e4b2fc711d AP_Compass: added message for compass cal when armed 2015-09-03 16:59:22 +10:00
Andrew Tridgell f4cdf57d8f AP_Compass: added handling of compass calibration mavlink messages 2015-09-03 16:59:14 +10:00
Siddharth Bharat Purohit 75829f5533 AP_Compass: remove extra compass field correction 2015-09-03 16:59:14 +10:00
Siddharth Bharat Purohit 3abdf85796 AP_Compass_Calibrator: remove unrequired variables 2015-09-03 16:59:14 +10:00
Siddharth Bharat Purohit c126017035 AP_Compass: reduce to if healthy check from if-else 2015-09-03 16:59:14 +10:00
Siddharth Bharat Purohit 2fb002798c generate.sh 2015-09-03 16:59:14 +10:00
Siddharth Bharat Purohit 63973bff31 AP_Compass_AK8963: move variable declarations before goto 2015-09-03 16:59:14 +10:00
Siddharth Bharat Purohit 6a603eb594 Compass_cal: implement the concept of auto and mandatory user reboot after cal 2015-09-03 16:59:13 +10:00
Gustavo Jose de Sousa 46774136a6 AP_Compass: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-09-03 16:59:13 +10:00
Siddharth Bharat Purohit cdd8bae6ac AP_Compass: publish raw and unfiltered field for HMC5843 compass 2015-09-03 16:59:13 +10:00
Siddharth Bharat Purohit 8cdc9748b3 AP_Compass: publish raw and unfiltered field for AK8963 compass 2015-09-03 16:59:13 +10:00
Siddharth Bharat Purohit f085e274c7 AP_Compass: add explaination for sample acceptance based on angular distance 2015-09-03 16:59:13 +10:00
Jonathan Challinger f108383c11 AP_Compass: initialize CompassCalibrator _sample_buffer to NULL 2015-09-03 16:59:13 +10:00
Jonathan Challinger 358736a592 AP_Compass: correct calibrator sample acceptance math 2015-09-03 16:59:13 +10:00
Jonathan Challinger bff9b9065e AP_Compass: CompassCalibrator comment update 2015-09-03 16:59:13 +10:00
Siddharth Bharat Purohit 137bd25220 AP_Compass: add info about compass calibrator procedure 2015-09-03 16:59:12 +10:00
Siddharth Bharat Purohit f5fbc2fac1 AP_Compass: use AP_Math inverse library 2015-09-03 16:59:12 +10:00
Jonathan Challinger 0edf1df28e AP_Compass: loosen calibration acceptance tolerance 2015-09-03 16:59:12 +10:00
Jonathan Challinger 987f55387e AP_Compass: style cleanup 2015-09-03 16:59:12 +10:00
Jonathan Challinger 5ef713f3db AP_Compass: set AP_Notify::compass_cal_failed 2015-09-03 16:59:12 +10:00
Jonathan Challinger 5a12991d29 CompassCalibrator: remove dependence on AP_Notify 2015-09-03 16:59:12 +10:00
Jonathan Challinger de600ca3da AP_Compass: configured() only checks compasses with _USE set 2015-09-03 16:59:12 +10:00
Jonathan Challinger 72c8d0f530 AP_Compass: add samples to calibrator when published 2015-09-03 16:59:11 +10:00
Jonathan Challinger cc36401b7c AP_Compass: add calibration interface 2015-09-03 16:59:11 +10:00
Jonathan Challinger 05d3616e0d AP_Compass: fix sitl build 2015-09-03 16:59:11 +10:00
Jonathan Challinger 7cb9fa8898 AP_Compass: Correct parameter checks in compass cal 2015-09-03 16:59:11 +10:00
Jonathan Challinger 6d45660568 AP_Compass: refactor run_fit_chunk logic 2015-09-03 16:59:11 +10:00
Jonathan Challinger f2acf2cb88 AP_Compass: more parameter checks in compass calibrator 2015-09-03 16:59:11 +10:00
Jonathan Challinger 929ddb5685 AP_Compass: fix a math error in the compass calibrator 2015-09-03 16:59:10 +10:00
Jonathan Challinger 328cf82c3d CompassCalibrator: update AP_Notify on failure 2015-09-03 16:59:10 +10:00
Jonathan Challinger bfdbb55528 AP_Compass: make compasscalibrator running() public 2015-09-03 16:59:10 +10:00
Jonathan Challinger d31d385490 AP_Compass: changes and fixes to LMA-based compass calibrate 2015-09-03 16:59:10 +10:00
bugobliterator c66bfc95e1 Compass: Add Levenberg-Marquadt for ellipsoid fit 2015-09-03 16:59:10 +10:00
bugobliterator 7711dde2ad Compass: implement 9 parameter ellipsoid fit 2015-09-03 16:59:10 +10:00
bugobliterator 35555c7b21 Compass: Add math for 9 parameter fitting 2015-09-03 16:59:10 +10:00
bugobliterator 7295537e8a Compass: decrease sphere coverage to 1/3rd
for faster sample collection
2015-09-03 16:59:10 +10:00
bugobliterator a2bd4e8997 Compass: Add less complex equations to calculate jacobians 2015-09-03 16:59:10 +10:00
bugobliterator 2ca0e80dc5 Compass: Add conditions to check sanity of results 2015-09-03 16:59:10 +10:00
bugobliterator 54bc28c96d Compass: Add Levenberg-Marquadt optimiser for sphere_fit
increase iterations to get good results from LM
better check for convergence, comparison with initial fitness is a better way to determine if convergence occurs, if fitness has not improved compared to initial fitness it means optimiser has failed.
2015-09-03 16:59:10 +10:00
Jonathan Challinger c0a662c819 AP_Compass: CompassCalibrator initial commit 2015-09-03 16:59:10 +10:00
Jonathan Challinger f20ef69777 Compass: add soft-iron corrections 2015-09-03 16:59:09 +10:00
Jonathan Challinger 5fe6db0dc9 AP_Compass_PX4: use new compass backend interface 2015-09-03 16:59:09 +10:00
Jonathan Challinger ade39abc7f AP_Compass_HMC5843: use new compass backend interface 2015-09-03 16:59:09 +10:00
Jonathan Challinger 8800d03fce AP_Compass_HIL: use new compass backend interface 2015-09-03 16:59:09 +10:00
Jonathan Challinger cd5cf45ba8 AP_Compass_AK8963: use new compass backend interface 2015-09-03 16:59:09 +10:00
Jonathan Challinger add1b8c257 AP_Compass: modify backend interface to push raw samples to frontend 2015-09-03 16:59:09 +10:00
Jonathan Challinger b990eaed68 AP_Compass: add interface for raw and unfiltered field 2015-09-03 16:59:09 +10:00
Lucas De Marchi a66a201bf5 AP_Compass: HMC5843: Add support for MPU6000 auxiliary bus
Allow HMC5843 to be on MPU6000's auxiliary bus.
2015-08-28 12:39:09 +10:00
Lucas De Marchi 628e446e3e AP_Compass: HMC5843: use a struct for raw value
Like is done in AK8963, declare a raw_value struct.
2015-08-28 12:39:09 +10:00
Lucas De Marchi 9ecd1daf81 AP_Compass: HMC5843: remove useless delay
There's no need to add a delay after suspending timer in the
initialization. Also initialize _bus_sem earlier, like is done in
AK8963.
2015-08-28 12:39:09 +10:00
Lucas De Marchi c66c9c41f2 AP_Compass: HMC5843: be agnostic to I2C bus
Like was done to inertial AK8963 and inertial sensor move the decision
regarding the I2C bus to the caller. We don't allow changing the address
because apparently HMC5843 doesn't support different addresses.

Changing only the bus could be more easily done but this prepares the
ground for using HMC5843 on an AuxiliarBus.

The need for a more generic abstraction is evidenced by this commit: a
"SerialBus" in AP_HAL would be a nice addition rather than letting each
driver to provide its own. However the methods are a little bit
different from what we have in AK8963. It's safer to do the simple
conversion now and later on to add the abstraction changing everybody to
use it.
2015-08-28 12:39:09 +10:00
Staroselskii Georgii 3eb6be64c9 AP_Compass: ignore first two readings in a clearer way
This way we don't mix two different conditionals: settling and data validation.
2015-08-28 12:39:09 +10:00
Staroselskii Georgii 633330db14 AP_Compass: rename calibration array in HMC
I think naming the variable "scaling" makes more sense.
2015-08-28 12:39:09 +10:00
Staroselskii Georgii d8bddcbf3a AP_Compass: fix indentation in HMC's driver 2015-08-28 12:39:09 +10:00
Staroselskii Georgii 79ffddc6db AP_Compass: add a macro for checking calibration values in HMC 2015-08-28 12:39:08 +10:00
Lucas De Marchi f61386ae43 AP_Compass: HMC5843: release the lock before read
read() calls accumulate() which takes the lock by itself so we must
release it like we were doing before 669ae26 ("AP_Compass: encapsulated
calibration in HMC").
2015-08-28 12:39:08 +10:00
Staroselskii Georgii a9e8c1c464 AP_Compass: encapsulated calibration in HMC 2015-08-28 12:39:08 +10:00
Staroselskii Georgii 0fbc295d97 AP_Compass: encapsulated version detection in HMC driver 2015-08-28 12:39:08 +10:00
Lucas De Marchi 868d0bf3c3 AP_Compass: AK8963: refactor constructors
Declare a common constructor that others can call.
2015-08-28 12:39:08 +10:00
Lucas De Marchi a5df93bf10 AP_Compass: AK8963: be agnostic to I2C bus/address
This decision is better made by the caller rather than polluting the
driver with board-specific details.
2015-08-28 12:39:08 +10:00
Lucas De Marchi d92c2ac9f5 AP_Compass: pass backend instead of pointer to function
Just like was done for inertial sensor, different detect() functions
might need different arguments and passing a pointer to function here is
cumbersome. For example, it forces to have a method like "detect_i2c2"
rather than allowing hal.i2c2 to be passed as parameter.
2015-08-28 12:39:08 +10:00
Lucas De Marchi 7e997564bf AP_Compass: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:51 +10:00
Andrew Tridgell 69a86a78a6 AP_Compass: removed AVR1280 specific ifdef 2015-08-11 16:47:41 +10:00
Gustavo Jose de Sousa 58f300e78e AP_Compass: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:28:42 +10:00
Randy Mackay 66469d7529 Compass_HMC5843: remove unnecessary i2c semaphore give 2015-08-07 15:50:36 +09:00
Julien BERAUD 39b42a4e6e AP_Compass_AK8963: suspend timer while reading
Protection in case a timer falls while reading data, because it could end up
with corrupted data
2015-08-03 22:50:08 +09:00
Julien BERAUD 0aa2fe7a0b AP_Compass_AK8963: fix sem handling
In case of error or zeroed data, the i2c semaphore wasn't given.
It happened at first startup on Bebop and caused a failure:
"PANIC: failed to take _bus->sem 100 times in a row..."
2015-08-03 20:57:46 +09:00
Lucas De Marchi 8240e5ae65 AP_Compass: AK8963: reduce bytes read
We are not using INFO and ST1 registers, so there's no need to read
extra 2 bytes for each transaction.
2015-07-23 17:44:36 +10:00
Lucas De Marchi 2b9c46e1ff AP_Compass: AK8963: don't oversample AK8963
Reduce the frequency with which MPU9250 reads AK8963 to reduce the
chance of errors.
2015-07-23 17:44:36 +10:00
Lucas De Marchi 6c2ceea165 AP_Compass: AK8963: remove author and connection comment
Authorship and how sensor is connected get outdated (as it already is).
Our code is on git so let it track who wrote each line.
2015-07-23 17:44:36 +10:00
Staroselskii Georgii 8ab33c46ce AP_Compass: revisited AK8963 code
Reduced duplication a bit and revisited the update method which is now
split into several logical hunks.
2015-07-23 17:44:36 +10:00
Lucas De Marchi fffedae3e0 AP_Compass: AK8963: reduce stack usage and zero out buffers
Since we are not using MPU9250's fifo to get samples from AK8963 we will
always read only 1 sample (+ control registers).
2015-07-23 17:44:35 +10:00
Lucas De Marchi 37734886a5 AP_Compass: AK8963: remove repeated comments
No need to repeat the same comments on 3 different places. Instead add a
single comment to explain how start_measurements() and read_raw() are
related.
2015-07-23 17:44:35 +10:00
Lucas De Marchi 27d95b67a8 AP_Compass: AK8963: remove state machine
Don't use a state machine in AK8963: the start_measurements() method
should be called only once.  Even if there's a magnetic sensor overflow
the only thing we should do is to discard the new data.

This also moves the _collect_samples() method to be inside _update()
since it's the only place it should be called from, the one running on
the timer thread.
2015-07-23 17:44:35 +10:00
Lucas De Marchi e232543fca AP_Compass: AK8963: change initialization and rename methods
We need to check the AK8963's id before anything else Here we are
reordering the calls to _calibrate() and _check_id(). After that we
don't need to read and write again the AK8963_CNTL1 register.

While at it do some renames as well:
	- _configure() -> _setup_mode(): since now there's a
 	  _bus->configure() it became confusing what actually it's
	  doing.
	- make error messages say what we were actually trying to do but
	  couldn't. Also remove PSTR since this is linux-only.
	- start_conversion() -> start_measurements():  We are instructing the
          bus to start to get the samples, not to tell the chip to start an
          analog->digital conversion like in other sensors.
2015-07-23 17:44:35 +10:00
Lucas De Marchi ae5d9baddb AP_Compass: AK8963: remove defines not used anymore
The MPUREG_PWR_MGMT_1 defines were used when we cared about the MPU9250
initialization code. Now all initialization is done by the MPU9250 class
itself, so remove these defines.

Also remove AK8983_SELFTEST_MAGNETIC_FIELD_ON that is never used and let
the defines always with 2 bytes to improve readability.
2015-07-23 17:44:34 +10:00
Lucas De Marchi cae895bfdf AP_Compass: AK8963: group members together
Besides being semantically related, this removes the hole due to
alignment. The size is the same since the hole is actually turned into
padding.
2015-07-23 17:44:34 +10:00
Lucas De Marchi 28d3d775a4 AP_Compass: AK8963: remove resolution member
We only use the highest one and there's no intention to support the
14bits one. Just use the define rather than saving it as a member.
2015-07-23 17:44:34 +10:00
Lucas De Marchi 86b3312112 AP_Compass: AK8963: factor out common code of read_raw()
Similar code was added in the read_raw() implementation for each bus.
Add a new POD struct read_raw to contain the registers from the AK8963
and use it instead as argument.
2015-07-23 17:44:33 +10:00
dgrat d941174978 AP_Compass: AK8963: enhance the readability
Reduce the deepness of indentation and fix coding style.
2015-07-23 17:44:33 +10:00
Lucas De Marchi fd5d25b1d5 AP_Compass: use ARRAY_SIZE macro 2015-07-21 14:25:17 +09:00
Randy Mackay cedc9a8670 Compass: add last_update_usec per instance 2015-07-17 10:02:41 +09:00
Julien BERAUD 51c3c499e2 AP_Compass: support AK8963 on I2C 2015-07-10 16:46:30 +10:00
Julien BERAUD 0b41da0dea AP_Compass: rework to make the bus generic for AK8963
Supporting only MPU9250, prepare to implement another bus, i.e i2c on the
bebop
2015-07-10 16:46:29 +10:00
Julien BERAUD 0cd584c293 AP_Compass: fix rotation for bebop AK8963
Set the correct rotation for bebop
2015-07-10 16:46:29 +10:00
Julien BERAUD 7dd0b5fae6 AP_Compass: removed _spi_sem and _spi 2015-07-10 16:46:29 +10:00
Andrew Tridgell c83d5b1f08 AP_Compass: only build AK8963 driver on Linux
must match MPU9250 build
2015-07-09 11:57:27 +10:00
Randy Mackay d192b3ccea Compass: set device id for ak8963 and hmc5843 2015-07-06 21:04:46 +09:00
dgrat f56f584233 Compass: Improved field rounding in learning
Signed-off-by: Daniel Frenzel <dgdanielf@gmail.com>
2015-07-06 11:31:58 +10:00
Lucas De Marchi 1deb837e70 AP_Compass: Use common function in MPU9250 for initialization 2015-07-06 10:48:07 +10:00
Staroselskii Georgii 26c8007c96 AP_Compass: updated backend detect method
Uses reimplemented AK8963 driver. There's also no need trying to detect this
compass twice. Actually, it might even be bad, because the current code can
allocate an AK8963 object twice.
2015-07-06 10:48:06 +10:00
Staroselskii Georgii 7a417d1151 AP_Compass: AK8963 rework
Got rid of extra abstraction layer. There is no need for that now.
2015-07-06 10:48:06 +10:00
Randy Mackay 43b1694c76 Compass: add third compass to PRIMARY param description 2015-07-02 14:19:30 +09:00
Andrew Tridgell 5b0394eb05 AP_Compass: start MPU9250 driver at low speed
this raises the chances of successful init of the MPU9250
2015-07-02 08:48:06 +10:00
Andrew Tridgell d6a1bd98e6 AP_Compass: convert example from .pde to .cpp 2015-06-01 16:58:11 +10:00
Andrew Tridgell edc21cfa38 AP_Compass: make having no compass backends non-fatal
thanks to Daniel for spotting this
2015-05-26 14:23:40 +10:00
Lucas De Marchi 95627cf412 AP_Compass: use functor macros
Functor is not yet being used but let's make is macro fallback to the
previous Delegate implementation for easy of transition between the two.
2015-05-26 13:46:52 +10:00
Andrew Tridgell 2475ee9630 AP_Compass: setup HIL/SITL for two compasses 2015-05-16 07:06:04 +10:00
Andrew Tridgell 91b4ba3588 AP_Compass: allow for more than one compass in HIL/SITL 2015-05-15 14:25:44 +10:00
Randy Mackay ade4f81c77 Compass: fix example sketch 2015-05-15 11:53:28 +09:00
Andrew Tridgell 015fce5183 AP_Compass: revert AP_Math class change 2015-05-05 13:27:06 +10:00
Tom Pittenger d09ef4783d AP_Compass: compiler warnings: reorder constructors 2015-05-05 13:26:52 +10:00
Tom Pittenger ad11a57f57 AP_Compass: compiler warnings: apply is_zero(float) or is_equal(float) 2015-05-05 13:26:51 +10:00
Andrew Tridgell be3d6c924e AP_Compass: rename enum values to avoid header conflicts for 'ERROR' 2015-05-05 09:45:53 +10:00
Tom Pittenger 16e71ec1ce Compass: fix compile warning re member init order 2015-04-24 14:15:00 +09:00
Tom Pittenger bf1d128d70 Compass: fix compile warnings re float constants
Also fix example sketch
2015-04-24 12:29:07 +09:00
Andrew Tridgell dcb25632fb AP_Compass: removed old setHIL compass offset 2015-04-21 08:30:05 +10:00
Andrew Tridgell d7000c4105 AP_Compass: fixed compass timestamps in Replay 2015-04-20 15:12:51 +10:00
Lucas De Marchi 996739df12 AP_Compass: Do not panic if compass is not found
Copter uses 2 compasses for linux configuration, but one of them may not
be available. Do not panic if a AK8963 isn't found.
2015-04-14 09:29:12 +10:00
Andrew Tridgell c8b0970e61 AP_Compass: show compass count in example 2015-03-14 20:00:29 +11:00
Andrew Tridgell f4455d063e AP_Compass: fixed example 2015-03-14 17:07:39 +11:00
Andrew Tridgell 1962706a33 AP_Compass: fixed last_update, using last_update_usec()
this broke use of compass in the EKF
2015-03-14 12:31:23 +11:00
Andrew Tridgell 86fc90f54c AP_Compass: removed spurious rotation in PX4 backend
and cleanup rotation macros
2015-03-14 08:52:37 +11:00
Andrew Tridgell d7bac39539 AP_Compass: removed two unused functions 2015-03-14 08:52:37 +11:00
Andrew Tridgell fec2025469 AP_Compass: added set_hil_mode() 2015-03-13 22:52:55 +11:00
Andrew Tridgell 8f6982860f AP_Compass: fixed devid for 2nd compass 2015-03-13 20:46:32 +11:00
Andrew Tridgell 7b51c907f5 AP_Compass: zero some more variables in constructor and init 2015-03-13 19:22:11 +11:00
Andrew Tridgell 4bc92b6373 AP_Compass: removed _product_id var 2015-03-13 18:59:52 +11:00
Andrew Tridgell 0efd3bacea AP_Compass: make new backend match old PX4 behaviour
when a compass is internal only apply board orientation, not user
specified rotation
2015-03-13 18:46:15 +11:00
Andrew Tridgell a871c87cad AP_Compass: use state array for compass variables 2015-03-13 18:46:15 +11:00
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.
2015-03-13 18:46:15 +11:00
Víctor Mayoral Vilches d3b76cd8d3 AP_Compass: split compass into frontend/backend 2015-03-13 18:46:15 +11:00
Andrew Tridgell 99ed508903 AP_Compass: change for new PX4 paths 2015-02-14 12:25:43 +11:00
Grant Morphett 52c5db8440 AP_Compass: Changes to fix the warnings in rover sitl build.
We are starting the process of resolving all the warnings in the
ardupilot builds of all vehicles and platforms.
2015-02-11 18:16:45 +11:00
Emile Castelnuovo 5e8c1b61b5 AP_Compass: AP_Compass_VRBRAIN.cpp added _is_external overwrite to deal with external compass attached to internal I2C BUS 2015-02-02 08:44:00 +11:00