Commit Graph

117 Commits

Author SHA1 Message Date
Leonard Hall 616ab50938 AC_PID_2D: add reset for filter and D term 2018-09-15 10:24:53 +10:00
Leonard Hall 88ded7ee67 AC_PID: Fix D term initialisation 2018-09-15 10:08:41 +10:00
Michael du Breuil 1d60b0ec62 AC_PID: Support new RC_Channels::read_input() 2018-04-26 08:00:09 +10:00
Michael du Breuil 5d84850f32 AC_PID: Use RC_Channels instead of hal.rcin 2018-04-11 21:47:07 +01:00
Randy Mackay 04822152da AC_PID: fixes after peer review of AC_PID_2D 2018-01-23 12:00:43 +09:00
Randy Mackay 398a0d89bf AC_P: add const accessor 2018-01-23 12:00:43 +09:00
Randy Mackay c1708db208 AC_PID: add const and use is_positive in AC_PI_2D 2018-01-23 12:00:43 +09:00
Leonard Hall fd964a21d6 AC_PID: add AC_PID_2D 2018-01-23 12:00:43 +09:00
Randy Mackay 4e8155f4e5 AC_PID: allow non-zero ff gain default 2018-01-05 13:33:21 +09:00
Randy Mackay 91d489d91e AC_PID: implement reset_filter 2017-10-26 19:44:47 +09:00
Randy Mackay f995106c1e AC_PID: minor formatting change 2017-08-09 18:03:09 +09:00
Pierre Kancir 320c5e1b96 AC_PID: example fix travis warning
missing function declaration
implicit cast
some style fix
2017-04-13 19:56:16 +01:00
Andrew Tridgell b97bf5d15e AC_PID: added feed-forward to AC_PID 2017-02-18 17:26:43 +11:00
murata 5e11497332 AC_PID: Unify from print or println to printf. 2017-01-27 18:20:22 +11:00
Andrew Tridgell ccae8979c1 AC_PID: expose filt_hz as a AP_Float
this allows defaults to be overridden
2017-01-12 17:39:37 +11:00
Andrew Tridgell 2086b591a2 AC_PID: expose ff() method in AC_PID
this allows for an abstract AC_PID class to be used in
AC_AttitudeControl for both multicopter and heli
2017-01-12 17:39:37 +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 a6404cf1ea AC_PID: removed AFF from heli PID
this is not used any more. Discussed with Rob on dev call
2016-05-12 17:37:01 +10:00
Andrew Tridgell cf08c46f30 AC_PID: fixed default leak min for heli 2016-05-12 17:34:23 +10:00
Andrew Tridgell 412dc10353 AC_PID: expose parameters as AP_Float
this enables full tuning capability
2016-05-07 18:34:03 +10:00
Ricardo de Almeida Gonzaga 5bd034a5a8 Global: start using cmath instead of math.h 2016-04-05 21:06:19 -07:00
Randy Mackay de537390c2 AC_HELI_PID: adjust parameter descriptions
ILMI range is now 0 to 1
2016-04-01 11:59:30 +09:00
Randy Mackay 3465f05bec AC_HELI_PID: shorten FILT_HZ to FILT, I_L_MIN to ILMI
Also minor formatting fix
2016-04-01 11:59:30 +09:00
Randy Mackay 425caeabf7 AC_PI_2D: fix parameter description 2016-04-01 11:59:30 +09:00
Randy Mackay 227e4f86d7 AC_PID: fix parameter description 2016-04-01 11:59:30 +09:00
Randy Mackay 920425567c AC_PID: shorten FILT_HZ to FILT 2016-04-01 11:59:30 +09:00
Lucas De Marchi f637a29ab6 AC_PID: replace header guard with pragma once 2016-03-16 18:40:39 +11:00
dgrat 5148e41c1a AP_Math: Cleaned macro definitions
Moved Definitions into a separate header. Replaced PI with M_PI and
removed the M_PI_*_F macros.
2016-02-27 02:51:33 -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
Andrew Tridgell 27b43f4036 AC_PID: fixed example build warning 2016-01-04 08:22:17 +11:00
Jonathan Challinger 9e6be648b9 AC_PID: 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 247195512f AC_PID: 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
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
Andrew Tridgell 8f4ce7f20b build: removed all nocore.inoflag files
these were APM2 specific
2015-11-16 08:05:17 +11:00
Robert Lefebvre c66af9b788 AC_HELI_PID: Add Leak-Min param and functionality. 2015-11-12 19:37:20 +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
Caio Marcelo de Oliveira Filho 9a2e0c2fd9 AC_PID: remove unnecessary includes from example 2015-10-21 09:16:10 +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
Grant Morphett 1595c137f8 AC_PID_test: fixed AC_HELI_PID constructor 2015-08-31 13:45:13 +09:00
Gustavo Jose de Sousa 286d084d83 AC_PID: 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 a62c450f86 AC_PID: convert example from .pde to .cpp 2015-06-01 16:58:10 +10:00
Andrew Tridgell 3ec8857fbc AC_PID: added set_desired_rate() interface
used to setup _pid_info for logging
2015-05-27 14:28:48 +10:00
Andrew Tridgell 6000bb0c32 AC_PID: log desired rate for VFF as well as AFF 2015-05-27 14:28:48 +10:00
Robert Lefebvre 366f87c91c AC_HELI_PID: Add Acceleration FF method. 2015-05-27 14:28:47 +10:00