Commit Graph

19 Commits

Author SHA1 Message Date
Pierre Kancir 6fbcb21ae3 AP_Terrain: use get_distance_NE instead of location_diff 2019-04-08 08:00:52 -07:00
Dr.-Ing. Amilcar do Carmo Lucas 6082b230e8 AP_Terrain: replace location_offset() and get_distance() function calls with Location object member function calls
This allows removing duplicated code
2019-02-28 11:44:09 +11:00
Tom Pittenger f03c73aeff AP_Terrain: compiler warning printing %u with signed value 2018-04-06 07:40:37 +09:00
Peter Barker adde7bc588 AP_Terrain: fix snprintf buffer length warning
Also includes fix from Tridge to use MIN() instead of MAX()
2018-02-02 09:59:06 +09:00
Andrew Tridgell f8542c86b6 AP_Terrain: added support for AP_Terrain for ChibiOS 2018-01-15 11:46:02 +11:00
Peter Barker 698f18566b AP_Terrain: cast to int32_t to avoid warning about signedness
../../libraries/AP_Terrain/TerrainIO.cpp: In member function ‘void
AP_Terrain::open_file()’:
../../libraries/AP_Terrain/TerrainIO.cpp:176:46: warning: format ‘%u’
expects argument of type ‘unsigned int’, but argument 5 has type
‘__gnu_cxx::__enable_if<true, double>::__type {aka double}’ [-Wformat=]
              abs((uint32_t)block.lon_degrees));
                                              ^
../../libraries/AP_Terrain/TerrainIO.cpp:176:46: warning: format ‘%u’
expects argument of type ‘unsigned int’, but argument 7 has type
‘__gnu_cxx::__enable_if<true, double>::__type {aka double}’ [-Wformat=]
2017-09-01 13:30:56 +01:00
Michael du Breuil 3e2b5269a6 AP_Terrain: fix Coverity issue 91367
Also converts to using the get_relative_position_D_home() functions rather then attempting to derive home itself
2017-06-07 19:58:45 +10:00
Lucas De Marchi 4936fd8623 AP_Terrain: add O_CLOEXEC in places missing it
By opening with O_CLOEXEC we make sure we don't leak the file descriptor
when we are exec'ing or calling out subprograms. Right now we currently
don't do it so there's no harm, but it's good practice in Linux to have
it.
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
Caio Marcelo de Oliveira Filho 0aa520a273 AP_Terrain: use millis/micros/panic functions 2015-11-20 12:34:53 +09:00
Andrew Tridgell 0d26252bdb AP_Terrain: don't allocate cache array when terrain not enabled
this makes it easy to save 22k of ram when running other experiments
2015-09-23 08:31:17 +10:00
Gustavo Jose de Sousa fcd1d4938a AP_Terrain: 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:24 +10:00
Andrew Tridgell 1296da56bb AP_Terrain: fixed terrain path handling 2015-06-30 15:08:10 +10:00
Víctor Mayoral Vilches f592981a60 TerrainIO: Support custom_terrain_directory 2015-06-30 14:36:43 +10:00
Lucas De Marchi 6ae2591cad AP_Terrain: 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:54 +10:00
Andrew Tridgell e6c6fe095f AP_Terrain: fixed a warning 2014-10-22 18:27:20 +11:00
Andrew Tridgell 3faafc9644 AP_Terrain: replace HAVE_AP_TERRAIN with AP_TERRAIN_AVAILABLE 2014-07-25 07:59:48 +10:00
Andrew Tridgell db506b76fa AP_Terrain: split up code into separate cpp files
this should make it a bit easier to review
2014-07-24 21:50:19 +10:00