Commit Graph

43 Commits

Author SHA1 Message Date
Lucas De Marchi 7dc3942ad4 AC_Fence: replace header guard with pragma once 2016-03-16 18:40:39 +11:00
Lucas De Marchi 2591261af6 Global: rename min and max macros to uppercase
The problem with using min() and max() is that they conflict with some
C++ headers. Name the macros in uppercase instead. We may go case by
case later converting them to be typesafe.

Changes generated with:

	git ls-files '*.cpp' '*.h' -z | xargs -0 sed -i 's/\([^_[:alnum:]]\)max(/\1MAX(/g'
	git ls-files '*.cpp' '*.h' -z | xargs -0 sed -i 's/\([^_[:alnum:]]\)min(/\1MIN(/g'
2015-12-01 16:28:09 -02:00
Caio Marcelo de Oliveira Filho ccd03bcf60 AC_Fence: use millis/micros/panic functions 2015-11-20 12:27:11 +09:00
Lucas De Marchi 831d8acca5 Remove use of PROGMEM
Now variables don't have to be declared with PROGMEM anymore, so remove
them. This was automated with:

    git grep -l -z PROGMEM | xargs -0 sed -i 's/ PROGMEM / /g'
    git grep -l -z PROGMEM | xargs -0 sed -i 's/PROGMEM//g'

The 2 commands were done so we don't leave behind spurious spaces.

AVR-specific places were not changed.
2015-10-30 14:35:16 +09:00
Gustavo Jose de Sousa d030e817d9 AC_Fence: 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:41 +10:00
Andrew Tridgell aa1bfb1ca7 AC_Fence: revert AP_Math class change 2015-05-05 13:27:04 +10:00
Tom Pittenger 94ffc9b942 AC_Fence: compiler warnings: apply is_zero(float) or is_equal(float) 2015-05-05 13:26:55 +10:00
Randy Mackay f06c859d93 AC_Fence: add comment re check_fence method 2015-04-14 16:10:09 +09:00
Jonathan Challinger 05fda4ee4c AC_Fence: accept curr_alt parameter instead of getting alt from inav 2015-04-14 16:10:07 +09:00
Jonathan Challinger f06cc5d0c1 AC_Fence: change inav to const reference 2015-04-14 16:10:02 +09:00
Randy Mackay 9aba885231 AC_Fence: fix prearm check
before arming the EKF's pred_horiz_pos_abs flag should be used
2015-03-18 21:25:47 +09:00
Randy Mackay 4754ecc9e2 AC_Fence: remove example sketch
This only tested compiling anyway
2015-03-13 16:40:52 +09:00
Randy Mackay 99046ebda6 AC_Fence: fix example sketch 2015-01-28 17:15:32 +09:00
Randy Mackay c24e997fb2 AC_Fence: use inertial nav's get_filter_status 2015-01-22 14:39:40 +09:00
Andrew Tridgell 55ec316718 AC_Fence: updates for new AP_Baro API 2015-01-09 11:50:56 +11:00
Andrew Tridgell 4fcf46005b AC_Fence: fixed example build 2014-10-24 12:10:39 +11:00
Andrew Tridgell f721e020f5 AC_Fence: fixed example build 2014-08-13 21:45:43 +10:00
Randy Mackay 71df1eb94f AC_Fence: fix example sketch 2014-07-29 12:00:46 +09:00
Andrew Tridgell 2b3becd252 AC_Fence: fixed example build 2014-07-25 17:53:27 +10:00
Randy Mackay 0c0521a555 AC_Fence: append f to floating point constants 2014-07-16 14:38:48 +09:00
Randy Mackay cc9c3bb5aa AC_Fence: increase default radius to 300m
300m is still within line of sight and this should reduce the number of
false breaches due to bad GPS positions
2014-07-14 11:25:04 +09:00
Randy Mackay e855cfec02 AC_Fence: add 10sec manual recovery
This resolves issue #461 by giving the pilot a minimum of 10 seconds to
attempt to manually recover before the autopilot will attempt to retake
control to bring the copter home or land.
2014-04-27 11:11:07 +09:00
Andrew Tridgell 7b2d56a8cb AC_Fence: disable example build
fails to build with compiler error
2014-04-01 06:38:25 +11:00
Andrew Tridgell 4507c0fc4c AC_Fence: fixed example build 2014-03-19 12:13:57 +09:00
Randy Mackay 4484a4232a AC_Fence: fix example sketch 2014-02-15 06:09:08 +11:00
Randy Mackay 4c02212404 AC_Fence: minor comment fix 2014-02-15 05:27:39 +11:00
Randy Mackay c4df3ea187 Fence: parameter display name fix 2013-11-26 22:18:05 +09:00
Andrew Tridgell 979c6ae3b6 AC_Fence: update for AHRS API changes 2013-11-04 21:21:42 +11:00
Randy Mackay c602f7da0c AC_Fence: fix example sketch 2013-10-27 21:53:22 +09:00
Tobias b94d6848de AC_Fence: replace "_ina->geT_position().z" with more efficent
"_inav->get_altitude()"
2013-10-27 13:41:19 +09:00
Tobias 596c7a25b7 AC_Fence: make member pointer to AP_InertialNav const, remove unused
gps-pointer member
2013-10-27 13:41:09 +09:00
Randy Mackay f144de21b4 AC_Fence: fix example sketch 2013-09-26 17:52:13 +09:00
Andrew Tridgell e1aa6e3ff1 libraries: fixed examples for no flash_leds() callback 2013-09-19 18:38:28 +10:00
Andrew Tridgell 9be02fb493 AC_Fence: changed to AP_Vehicle.h 2013-09-13 11:46:32 +10:00
Andrew Tridgell e6794239ca AC_Fence: fixed example build 2013-08-30 13:01:36 +10:00
Randy Mackay 04b84664e5 AC_Fence: add safety margin parameter
This will allow auto modes to proactively avoid breaching the fence
2013-08-15 16:05:38 +09:00
Randy Mackay 47f5c9b7a4 AC_Fence: remove unused gps pointer 2013-08-03 19:04:59 +09:00
Randy Mackay de59ea3ddc Copter Fence: reduce circle @Range to 30m 2013-07-27 10:28:33 +09:00
Andrew Tridgell 04835b095f AC_Fence: fixed examples build 2013-07-15 14:09:18 +10:00
Andrew Tridgell 56694fd9b1 AC_Fence: fixed example build 2013-05-08 16:44:50 +10:00
Randy Mackay bd75de6a22 AC_Fence: reduce to 150m radius and 100m high
100m high,
2013-05-03 14:57:37 +09:00
Randy Mackay 2d17688363 AC_Fence: add backup fence
Also includes fixes from code review with Tridge
2013-05-01 17:05:04 +09:00
Randy Mackay 9910d6d1cd AC_Fence: first implemenation of library 2013-04-27 11:14:05 +09:00