Commit Graph

57 Commits

Author SHA1 Message Date
Andrew Tridgell 3f226cd2b9 AP_Math: added from_rotation() method to Matrix3
this is used to get a rotation matrix from a rotation enum
2017-11-23 14:26:11 +11:00
Pierre Kancir f2812c1efd AP_Math: example fix travis warning
missing function declaration
implicit cast
some style fix
2017-04-13 19:56:16 +01:00
murata ec4cce15a1 AP_Math: Unify from print or println to printf. 2017-01-27 18:20:22 +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
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
Andrew Tridgell 6165c42535 AP_Math: added from_axis_angle() method on Matrix3f
for arbitrary rotations in simulator
2016-04-22 10:28:15 +10: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
Lucas De Marchi ba3325ffd3 AP_Math: rename rotation
The rotations are supposed to follow the name of the enum, in order. The
ROTATION_YAW_293_PITCH_68_ROLL_90 was added with the name of an
intrinsic 321 rotation, but the matrix is actually a 123 rotation,
following the other rotations already present.

Change the name to follow the other names.
2015-12-30 20:22:27 -02:00
Siddharth Bharat Purohit a0c3cbffee AP_Math: add inverse matrix test example
fix example build
2015-12-29 10:46:34 -08:00
Siddharth Bharat Purohit 5af0cc8eaf AP_Math: add inverse rotate example function 2015-12-29 10:46:34 -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 f5c03c786d AP_Math: remove unused AP_ADC_AnalogSource 2015-12-03 13:32:43 +11:00
Caio Marcelo de Oliveira Filho 6e7b73610d waf: add waf support 2015-12-03 07:54:30 +11:00
Andrew Tridgell 8f4ce7f20b build: removed all nocore.inoflag files
these were APM2 specific
2015-11-16 08:05:17 +11:00
Lucas De Marchi 20c6ffc5e3 Replace use of UARTDriver::printf_P() with UARTDriver::printf()
This also starts to show warnings on places that were already using
wrong printf format strings.
2015-10-30 14:35:25 +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
Caio Marcelo de Oliveira Filho 5020db4481 AP_Math: remove unnecessary includes
Remove unnecessary includes, in particular the includes for specific
boards. The list of libraries for 'polygon' example was updated so that
the example compiles again.
2015-10-21 09:16:09 +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 4790371f9b AP_Math: 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:38:18 +10:00
Andrew Tridgell 605b8b4ece AP_Math: converted rotations example to cpp
this is just a test conversion before we start converting on-mass
2015-05-21 13:41:20 +10:00
Andrew Tridgell 062c9406bd AP_Math: fixed rotations example build 2015-05-21 13:37:44 +10:00
Tom Pittenger a5d2f3a82f AP_Math: compiler warnings: float to double 2015-05-05 13:26:52 +10:00
Andrew Tridgell eca675c556 AP_Math: fix for HAL_SITL rename 2015-05-05 09:45:55 +10:00
Randy Mackay fecbf06008 AP_Math: fix example sketches 2015-05-01 20:57:38 +09:00
Randy Mackay 689cc9e298 AP_Math: fix example sketch 2015-01-28 17:15:43 +09:00
Jonathan Challinger 9e5a30d5ba AP_Math: change ROTATION_YAW_293_PITCH_68_ROLL_180 to ROLL_90 2015-01-02 17:15:18 +09:00
Andrew Tridgell 38c5f25c70 AP_Math: fixed example build 2014-11-25 13:22:17 +11:00
Randy Mackay 503d14428d AP_Math: add new rotation to example rotation sketch 2014-11-22 14:10:00 +09:00
Andrew Tridgell 917c9f7865 AP_Math: fixed example build 2014-08-13 21:48:35 +10:00
Andrew Tridgell 03dc27147e AP_Math: port examples to Linux 2014-07-29 15:49:38 +10:00
Andrew Tridgell aa5940c378 AP_Math: fixed example build 2014-07-25 17:51:30 +10:00
Andrew Tridgell acd54d0826 AP_Math: fixed example build 2014-03-19 12:13:48 +09:00
Andrew Tridgell 2df314799e AP_Math: added tests for quaternion to/from rotation matrix 2014-02-15 12:20:51 +11:00
Andrew Tridgell c1dff6aa65 AP_Math: fixed example build 2014-02-15 06:39:43 +11:00
Andrew Tridgell 9b5b4ced60 AP_Math: fixed example build 2013-12-17 11:51:37 +11:00
Andrew Tridgell 4c752e4a94 AP_Math: simplify rotations test code 2013-08-30 13:01:34 +10:00
Andrew Tridgell a295a01bbc AP_Math: added missing 90 degree rotations
this ensures we can handle all 90 degree rotations of the compass and
main board. A test in examples/rotations shows that we have them all.
2013-08-30 13:01:33 +10:00
Andrew Tridgell 38062bbb6d AP_Math: support some more rotation combinations 2013-01-13 17:32:48 +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
Pat Hickey eb530b86e8 move Arduino.mk to /mk/Arduino.mk 2012-12-20 14:52:35 +11:00
Andrew Tridgell 7d27e420ae AP_HAL: remove unnecessary Arduino.h includes 2012-12-20 14:52:30 +11:00
Pat Hickey 475da4eca4 CONFIG_HAL_BOARD - test sketches fixed up, build all passes 2012-12-20 14:51:37 +11:00
Pat Hickey a4f1f6a5db AP_Progmem: fix dependencies for all sketches touched by AP_HAL_AVR 2012-12-20 14:51:28 +11:00
Pat Hickey 7dbe198e5c AP_Math: port to work on coreless arduino (AP_HAL) 2012-12-20 14:51:24 +11:00
Pat Hickey 3f1d9d7f69 AP_Param: #include <AP_Param.h> fixups for libraries & sketches
* I mostly went through with grep and added an #include <AP_Param.h> below
  every #include <AP_Common.h>. Not all of these example sketches might
  strictly need AP_Param.
2012-12-20 14:51:19 +11:00