Andrew Tridgell
cbb1512ebc
AP_Compass: merged in compass device ID changes from master
2020-05-11 19:38:28 +10:00
Andrew Tridgell
3d9126ec4a
AP_Compass: run lsm303d at 91Hz, not 100Hz
...
Peter and I have discovered an odd behaviour with the lsm303d mag. If
you fetch data a bit too soon then it will give a peridic oscillation
in the output.
Checking the data ready bit in the status register doesn't help. The
only fix I've found is to run the sampling at a bit lower rate
2018-11-30 11:39:54 +11:00
Lucas De Marchi
2324a28e39
AP_Compass: LSM303D: use common method to accumulate samples
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
Lucas De Marchi
b1740e2d9c
AP_Compass: remove raspilot
2017-09-12 15:06:19 -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
murata
bc7b2144e7
AP_Compass: Change from magic number 0 to definition name.
2017-02-18 14:12:36 +00:00
murata
af47a8e91c
AP_Compass: Unify from print or println to printf.
2017-01-27 18:20:22 +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
Andrew Tridgell
3d5c57c5dc
AP_Compass: fixed orientation of PH2 in-tree compass drivers
2016-11-10 11:44:52 +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
02c2ba1331
AP_Compass: fixed dup semaphore bug
...
thanks to Lucas for spotting this!
2016-11-09 17:08:10 +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
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
36190ba545
AP_Compass: use thread per bus for lsm303d mag
2016-11-09 17:08:00 +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
dgrat
f8540f1a80
AP_Compass: Do not use is_zero() for non-float types
2016-05-16 19:08:35 -03:00
Lucas De Marchi
46936767c1
AP_Compass: LSM303D: check for overruns in compass values
2016-03-23 17:50:38 -03:00
Lucas De Marchi
cf2d866d51
AP_Compass: LSM303D: used AP_HAL::Device interface
...
Initialization was also changed a little bit so we don't try to
initialize 25 times. We rather use the same methods as in the
AP_InertialSensor drivers.
Also move up the call to is_zero() in read_raw so we don't set
_mag_[x|y|z] in case of failure.
2016-03-23 17:50:38 -03:00
Lucas De Marchi
5164fbb81b
AP_Compass: LSM303D: cleanup driver
...
Make it similar to other compass drivers, including method names.
2016-03-23 17:50:38 -03: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
d5d6a10e63
AP_Compass: LSM303D now is part of LSM9DS0
2016-03-18 21:51:37 -03:00
Lucas De Marchi
a671b7f5b2
AP_Compass: remove misleading message
...
Not having data ready during initialization is normal. Don't print error
message since it can mislead people to think the compass was not
initialized successfully.
2016-03-18 21:51:37 -03:00
Caio Marcelo de Oliveira Filho
0d3fbbdd37
AP_Compass: use millis/micros/panic functions
2015-11-20 12:30:05 +09:00
Lucas De Marchi
6f4904189b
Replace use of println_P() with println()
2015-10-30 14:35:22 +09:00
Lucas De Marchi
2c38e31c93
Remove use of PSTR
...
The PSTR is already define as a NOP for all supported platforms. It's
only needed for AVR so here we remove all the uses throughout the
codebase.
This was automated with a simple python script so it also converts
places which spans to multiple lines, removing the matching parentheses.
AVR-specific places were not changed.
2015-10-30 14:35:04 +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
raspilot
1b5e6849d9
AP_Compass: fix milligauss code in LSM303D driver
2015-09-16 16:52:17 +09: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