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
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
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
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
murata
af47a8e91c
AP_Compass: Unify from print or println to printf.
2017-01-27 18:20:22 +11: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
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
Gustavo Jose de Sousa
e5de4f2348
AP_Compass: AP_Compass_test: code enhancements
...
- Use panic() instead of looping forever.
- Readability improvement with the use of MAX() and MIN().
2016-03-09 10:12:14 -03:00
Gustavo Jose de Sousa
a61f9855d3
AP_Compass: AP_Compass_test: report multiple compasses
...
Report data from all available compasses, not just the primary one.
2016-03-09 10:12:10 -03:00
Gustavo Jose de Sousa
16acca865f
AP_Compass: AP_Compass_test: fix style
...
Used uncrustify and some manual changes.
2016-03-09 10:12:05 -03:00
Gustavo Jose de Sousa
c2e3f05dbf
waf: ardupilotwaf: prefix build context methods with ap_
...
It helps to distinguish between things from waf and things from ardupilotwaf.
2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa
3d22490397
waf: examples: use methods from bld instead of ardupilotwaf
2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa
d281067bcc
waf: make example binaries be placed in 'examples' dir
...
This commit makes examples' wscripts use ardupilotwaf.example() instead of
ardupilot.program().
2016-01-15 16:46:41 -02:00
Jonathan Challinger
9b5644fdb6
AP_Compass: fix example build
2015-12-29 10:46:35 -08:00
Lucas De Marchi
a096703b06
Global: don't link with AP_Progmem
...
AP_Progmem is not used anymore.
2015-12-27 15:58:12 -02:00
Lucas De Marchi
0bcbcd07cc
AP_Compass: remove unused AP_ADC_AnalogSource
2015-12-03 13:32:42 +11:00
Caio Marcelo de Oliveira Filho
6e7b73610d
waf: add waf support
2015-12-03 07:54:30 +11:00
Caio Marcelo de Oliveira Filho
cd7cfdef91
AP_Compass: examples use millis/micros/panic functions
2015-11-20 12:30:20 +09:00
Andrew Tridgell
8f4ce7f20b
build: removed all nocore.inoflag files
...
these were APM2 specific
2015-11-16 08:05:17 +11:00
Caio Marcelo de Oliveira Filho
a3169d0a34
AP_Compass: remove unnecessary includes from example
2015-10-21 09:16:11 +11:00
Caio Marcelo de Oliveira Filho
ec52df991c
build: compile only the HAL files needed by the board
...
Instead of requiring every program to specify the HAL related modules,
let the build system do it (in practice everything we compiled depended
on HAL anyway). This allow including only the necessary files in the
compilation.
2015-10-21 09:16:07 +11:00
Caio Marcelo de Oliveira Filho
2e464a53c2
AP_HAL: make code not depend on concrete HAL implementations
...
The switching between different AP_HAL was happening by giving different
definitions of AP_HAL_BOARD_DRIVER, and the programs would use it to
instantiate.
A program or library code would have to explicitly include (and depend)
on the concrete implementation of the HAL, even when using it only via
interface.
The proposed change move this dependency to be link time. There is a
AP_HAL::get_HAL() function that is used by the client code. Each
implementation of HAL provides its own definition of this function,
returning the appropriate concrete instance.
Since this replaces the job of AP_HAL_BOARD_DRIVER, the definition was
removed.
The static variables for PX4 and VRBRAIN were named differently to avoid
shadowing the extern symbol 'hal'.
2015-10-21 09:16:07 +11: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
Randy Mackay
825abdbedc
Compass: example sketch displays in milligauss
2015-10-07 21:35:24 +09: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
Andrew Tridgell
d6a1bd98e6
AP_Compass: convert example from .pde to .cpp
2015-06-01 16:58:11 +10:00
Randy Mackay
ade4f81c77
Compass: fix example sketch
2015-05-15 11:53:28 +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
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
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
Víctor Mayoral Vilches
d3b76cd8d3
AP_Compass: split compass into frontend/backend
2015-03-13 18:46:15 +11:00
Randy Mackay
635ff92d6b
Compass: fix example sketch
2015-01-28 17:15:39 +09:00
mirkix
9a65a8c8fb
AP_Compass: add AK8963 to auto-detect in test suite
2015-01-22 14:34:23 +11:00
mirkix
e9d4165a8d
AP_Compass: add AK8963 support to test suite
2015-01-22 14:34:17 +11:00
Andrew Tridgell
a686494127
AP_Compass: fixed example build
2014-11-28 10:40:34 +11:00
Andrew Tridgell
c49981c03d
AP_Compass: fixed example build
2014-08-13 22:11:25 +10:00
Andrew Tridgell
1e20f89f90
AP_Compass: use HAL_COMPASS_DEFAULT in example code
2014-07-14 09:44:36 +10:00
Randy Mackay
cf7e1a6339
Compass: example sketch update for set_and_save_offsets
2014-07-10 20:25:13 +09:00
Andrew Tridgell
9bb8f73d56
Compass: split compass learning out to its own C++ file
2014-02-16 13:21:06 +11:00
Andrew Tridgell
c538816825
AP_Compass: support compass health status on multiple compasses
2013-12-09 17:46:41 +11:00
Andrew Tridgell
cb16733918
AP_Compass: switched to a vector based interface
...
this is more consistent with other APIs and makes multi-device support
easier
2013-12-09 17:34:06 +11:00
Andrew Tridgell
ce7d458855
AP_Compass: added Linux support to the compass test
2013-09-28 21:24:02 +10:00
Andrew Tridgell
9a87b3f3c1
AP_Compass: use const on more functions and remove old calculate_heading()
...
the calculate_heading() based on roll/pitch is not needed anywhere
2013-05-09 09:24:06 +10:00
Andrew Tridgell
217f34e155
AP_Compass: added COMPASS_ORIENT parameter, to support external compasses
...
this allows the user to configure the compass for any orientation
supported by our rotation library
2013-05-02 12:48:14 +10:00
Andrew Tridgell
741174f5d5
AP_Compass: first cut at a PX4 compass driver
2013-01-04 16:21:24 +11:00
Andrew Tridgell
374af1cd14
build: change from Arduino.mk to apm.mk
2013-01-02 17:29:37 +11:00
Andrew Tridgell
a1187519a8
AP_HAL: use AP_HAL_BOARD_DRIVER in remaining test sketches
2012-12-20 14:52:37 +11:00