Commit Graph

20 Commits

Author SHA1 Message Date
Peter Barker cac2c63e72 AC_PID: remove method operator
remove the metho operator from the class.

This means this will no longer work:

Quaternion q{0,1,2,3};
q(5,6,7,8);

.... that used to set the quaternion componets, but is an odd / atypical syntax to use
2024-07-31 08:54:37 +10:00
Iampete1 18d0dbcd8a AC_PID: use new defualt pattern 2023-01-24 10:16:56 +11:00
Iampete1 8d216fbce3 AC_PID: params always use set method 2022-08-03 13:43:48 +01:00
Iampete1 3f84ba12c0 AC_PID: use set_and_defualt to set defualt values 2022-07-20 17:59:59 +10:00
Leonard Hall 1d720cc5e9 AC_PID: library update and additional functions
includes corrections from peer review
2021-04-03 12:07:59 +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
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
Randy Mackay 425caeabf7 AC_PI_2D: fix parameter description 2016-04-01 11:59:30 +09: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
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
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 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
Tom Pittenger 9d74f57ed3 AP_PID: replace fabs() with fabsf() 2015-05-09 09:57:26 +10:00
Andrew Tridgell 33555b7f12 AC_PID: revert AP_Math class change 2015-05-05 13:27:05 +10:00
Tom Pittenger 01180d52c4 AP_PID: compiler warnings: apply is_zero(float) 2015-05-05 13:26:51 +10:00
Randy Mackay 67b0c6f5c4 AC_PID: replace is_equal with is_zero 2015-04-28 16:22:08 +09:00
dgrat 303cfd683a AC_PID: replace floating point '==' with is_equal
Also add div-by-zero check to fix calc_filt_alpha

Also get_i and get_shrink_i do not need to set values to zero in Vector2f
constructor because this is already done.
2015-04-28 16:21:46 +09:00
Randy Mackay a095a8c3a1 AC_PID: more protection against NaN and Inf 2015-04-09 20:19:55 +09:00
Randy Mackay cc0d5b9ced AC_PI_2D: replace set_filt_hz method with filt_hz
Thanks to Jonathan Challinger for spotting this bug
2015-03-11 17:28:36 +09:00
Leonard Hall 34a5bc8b33 AC_PI_2D: 2-axis PI controller 2015-03-06 14:01:56 +09:00