Commit Graph

384 Commits

Author SHA1 Message Date
Peter Barker 302e5c6871 AP_Common: have get_vector_xy_from_origin_NE take a Vector2f rather than 3f
Also, rename it from get_vector_xy_from_origin_NED
2017-12-15 01:24:13 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas 5a0ffe94d2 AP_Common: NFC spell in comments 2017-11-27 23:13:34 +09:00
Patrick José Pereira 9693da751e AP_common: Add stdio.h when using SITL_printf
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2017-10-24 22:55:56 +01:00
Lucas De Marchi 54a4a78795 AP_Common: do not include version.h/ap_version.h
The interface provided by each vehicle should be used to get the
version.
2017-09-23 21:37:45 -07:00
Lucas De Marchi 370e10281b AP_Common: AP_FWVersion: add pointers to git hash strings
Keeping the hash strings on this struct allow to handle them
the same way on common code and remove ifdefs.
2017-09-23 21:37:45 -07:00
squilter 1a9bccaaa7 AP_Common: fix Bitmask out-of-range values 2017-09-09 14:05:41 +09:00
Randy Mackay 963c9c93fe AP_Common: constify bitmask 2017-09-09 14:05:41 +09:00
Randy Mackay f187df225a AP_Common: add setall, count and size methods to Bitmask 2017-09-09 14:05:41 +09:00
Peter Barker 445777429b AP_FWVersion: add structure to hold firmware version 2017-08-30 15:54:46 +01:00
Randy Mackay aaac6b3692 AP_Common: Bitmask formatting fix 2017-08-30 20:07:04 +09:00
Lucas De Marchi 3102247a85 AP_Common: add FALLTHROUGH define 2017-08-22 23:59:13 -07:00
Andrew Tridgell 71158e3e74 AP_Common: added #pragma once 2017-05-06 15:21:14 +10:00
Pierre Kancir 2200302081 AP_Common: example fix travis warning
missing function declaration
implicit cast
some style fix
2017-04-13 19:56:16 +01:00
murata 50eead63cc AP_Common: Unify from print or println to printf. 2017-01-27 18:20:22 +11:00
Dr.-Ing. Amilcar Do Carmo Lucas 8419045aea Spell in comments 2017-01-06 10:57:39 -08:00
Lucas De Marchi b0ddf81687 Remove stdbool.h include for C++ sources
This header is not needed in our C++ sources.
2016-12-16 11:38:52 -08:00
Andrew Tridgell 6adad11e2f AP_Common: added simple bitmask class 2016-12-02 09:49:39 +11:00
murata f9add59b58 Global: Aggregate the same definitions.
Global: Aggregate the same definitions.
2016-11-09 11:46:55 -03:00
Lucas De Marchi 6b88f3367b AP_Common: remove AP_PRODUCT_ID_* macros
These are not used anymore.
2016-11-09 17:08:05 +11:00
Lucas De Marchi 2e4c1818a3 AP_Common: add missing O_CLOEXEC definition
O_CLOEXEC is not available on Nuttx, nor it makes sense there. Define it
as 0, so we can use it in code.
2016-11-07 12:37:30 -03:00
murata c808ee2f49 Global: To nullptr from NULL.
RC_Channel: To nullptr from NULL.

AC_Fence: To nullptr from NULL.

AC_Avoidance: To nullptr from NULL.

AC_PrecLand: To nullptr from NULL.

DataFlash: To nullptr from NULL.

SITL: To nullptr from NULL.

GCS_MAVLink: To nullptr from NULL.

DataFlash: To nullptr from NULL.

AP_Compass: To nullptr from NULL.

Global: To nullptr from NULL.

Global: To nullptr from NULL.
2016-11-02 16:04:47 -02: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
Leandro Pereira 0f865a019a AP_HAL_Linux: Add Pollable/Poller
Add system's polling infrastructure to be notified whenever a
file descriptor is ready to be read from or written to.

Adds a few classes:
  * Poller, as an interface to epoll()
  * Pollable, as an interface to a file descriptor
2016-07-30 00:55:27 -03:00
Tom Pittenger b78255cc25 AP_Common: avoid using AP_Math is_zero() because it is classless
- because it is classless it can not be called like AP_Math::is_zero() and will then conflict with local definition of is_zero()
2016-07-20 22:32:47 -07:00
Tom Pittenger 3edd95b99b AP_Common: add Location::is_zero and ::zero member functions 2016-07-20 22:32:47 -07:00
Lucas De Marchi 471de28967 AP_Common: provide minimal byteswap.h and endian.h 2016-07-08 19:49:32 -03:00
Lucas De Marchi c728b6c164 AP_Common: missing/fenv: fix coding style 2016-07-07 11:35:18 -03:00
Siddharth Bharat Purohit 484db9ff82 AP_Common: add replacements for fe control functions systems without them 2016-07-07 11:35:18 -03:00
Lucas De Marchi 1962acad49 AP_Common: simplify ARRAY_SUBSCRIPT macro
Add DEFINE prefix, since this macro is defining these operators and
remove the parameter since we will always use it to access a
union/struct as a byte array.
2016-06-23 21:02:05 -03:00
Gustavo Jose de Sousa 5154369e9d AP_Common: define the ARRAY_SUBSCRIPT macro 2016-06-23 21:02:05 -03:00
Lucas De Marchi 8a58c06adb AP_Common: add macro to ignore unused result
In some cases we want to call functions annotated with
warn_unused_result but we know it's safe to ignore the return value.
Prefixing with (void) used to work, but it doesn't do anymore on all
versions of gcc and clang.
See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425

This solution is a mix of the solutions provided in the above bug report
and the one provided by Gustavo Sousa at
https://github.com/ArduPilot/ardupilot/pull/4277#issuecomment-224957375
2016-06-23 18:34:01 -03:00
Francisco Ferreira ac90527da5 AP_Common: change check from GCC version to glibc version (and Cygwin) 2016-06-23 18:19:54 +10:00
Lucas De Marchi 39d4fa2cf8 Revert changes to cmath according to gcc version
Revert these commits:
	"AP_Common: gcc 4.9.2 behaves differently from 4.9.3"
	"AP_Common: this workaround for missing/cmath is also needed for gcc 4.9.3"

This breaks the build for PX4. The change is related to the libc, not
the compiler version. We have an workaround there based on compiler
version just because it's usual to have a more recent libc version when
you have a recent compiler.
2016-06-21 13:54:41 -03:00
Andrew Tridgell 2108127712 AP_Common: gcc 4.9.2 behaves differently from 4.9.3
tested 4.9.3 on cygwin, 4.9.2 on ubuntu

I do hope that it doesn't depend on the OS
2016-06-21 21:34:54 +10:00
Andrew Tridgell 224c714c83 AP_Common: this workaround for missing/cmath is also needed for gcc 4.9.3
tested on cygwin with 4.9.3
2016-06-21 19:19:09 +10:00
Lucas De Marchi 7703e5f1d1 AP_Common: remove support for flymaple 2016-05-23 21:49:45 -03:00
Andrew Tridgell 5f7af390ec AP_Common: a useful debug macro for SITL 2016-05-23 10:10:29 +10:00
Tom Pittenger f085666032 AP_Common: fix compile when using AP_TERRAIN_AVAILABLE 0 2016-05-20 12:28:46 -07:00
Lucas De Marchi c4306de122 AP_Common: fix build on windows
The way the build was fixed for gcc >= 5.3 breaks the build for older
compiler versions on waf. Fix this by ifdef'ing for WAF_BUILD and
checking the compiler version.
2016-05-18 22:56:50 -03:00
Andrew Tridgell 7b47d54d6b AP_Common: workaround for SITL on windows 2016-05-17 20:55:57 +10:00
Tom Pittenger 02eeb2d4f0 AP_Common: 1of3 add loiter_xtrack option flag for post-loiter navigation
0 to crosstrack from center of waypoint, 1 to crosstrack from tangent exit location
2016-05-16 11:50:53 -07:00
Ricardo de Almeida Gonzaga a8889e5765 AP_Common: Fix typos 2016-05-13 19:20:05 -03:00
dgrat 41661f815f AP_Math: Replace the pythagorous* functions with a variadic template
The new function can deal with a variable number of function parameters.
Additionally, I renamed the functions to norm(), because this is the
standard name used in several other projects.
2016-05-10 11:41:26 -03:00
Lucas De Marchi fea084a596 Global: use ap_version.h
This header is used by waf to contain the generated version macros,
particularly using the git hash. For waf it's better to be in a separate
header since it then can keep track of changes on it a trigger
recompilation.

For the make build system, a dummy ap_version.h file has been added in
the missing/ folder so both implementations can co-exist.
2016-05-06 13:11:28 -03:00
Lucas De Marchi 1238c872a9 AP_Common: remove unused Arduino.h header 2016-05-06 13:11:27 -03:00
Randy Mackay 85963cecb4 Location: add additional comments 2016-04-30 10:33:01 +09:00
Randy Mackay 5161d63f8b Location: operator= uses const reference 2016-04-30 10:33:01 +09:00
Randy Mackay d6309a3a1a Location: remove unused methods 2016-04-30 10:33:01 +09:00
Randy Mackay 1bfb565e18 Location: rename set_alt to set_alt_cm 2016-04-30 10:33:01 +09:00