Gustavo Jose de Sousa
a1af0c2051
Filter: 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.
10 years ago
Randy Mackay
1289208244
LowPassFilter: add get method
10 years ago
Andrew Tridgell
b7f0735c2b
Filter: convert example from .pde to .cpp
10 years ago
Randy Mackay
151707cb0a
Filter: replace 2*M_PI_F with M_2PI_F
10 years ago
Andrew Tridgell
f9114f849b
Filter: revert AP_Math class change
10 years ago
Tom Pittenger
6d1b517aae
Filter: compiler warnings: apply is_zero(float) or is_equal(float)
10 years ago
Tom Pittenger
347fc1e59c
Filter: fix compile warnings re float constants
10 years ago
Randy Mackay
06ea18f97e
Filter: fix LPF example sketch
10 years ago
Randy Mackay
99a9a88529
Filter: dt check fix for LPF
10 years ago
Jonathan Challinger
f20a91ec95
Filter: add dt<0 check to LPF
10 years ago
Randy Mackay
22e1156c31
Filter: add some comments to LowPassFilter
10 years ago
Jonathan Challinger
76da2868d0
Filter: rework LowPassFilter
10 years ago
Randy Mackay
ca92821445
Filter: LowPassFilter gets another div-by-zero check
10 years ago
Jonathan Challinger
57f8a4d29d
Filter: add get_cutoff_frequency
10 years ago
Andrew Tridgell
f3706d63c7
Filter: prevent copying the filter parms on apply
10 years ago
Andrew Tridgell
b36122dec0
Filter: removed stdio.h
...
breaks AVR build
10 years ago
Jonathan Challinger
0133f0bb57
LowPassFilter2p: split into LowPassFilter2pfloat and LowPassFilter2pVector3f
10 years ago
Randy Mackay
4b78b2ce80
Filter: add get method to LowPassFilter
10 years ago
Randy Mackay
cf35bd3f42
LowPassFilter: add div by zero check
11 years ago
Andrew Tridgell
b16d84023e
Filter: fixed example build
11 years ago
Randy Mackay
a0369b85d1
LowPassFilter: make methods non-virtual
...
No classes inherit from this class so no need for set_cutoff_frequency,
set_time_constant and reset(T) to be declared virtual. Saves 6 bytes of
RAM.
11 years ago
Randy Mackay
38222d65e9
DerivativeFilter: update and slope non-virtual
...
No classes inherit from DerivativeFilter so no need to be virtual.
Saves 4bytes of RAM.
11 years ago
Randy Mackay
4040be9990
FilterWithBuffer: make get_sample non-virtual
...
virtual added to apply() and reset() declaration inline with base class.
This should have no impact on memory usage or functionality
11 years ago
Tobias
f4000e66e6
Filter: add consts
11 years ago
Andrew Tridgell
99da118faa
Filter: added in Leonards LowPassFilter2p filter
...
this is a backport from PX4
12 years ago
Andrew Tridgell
97b7130bb9
libraries: update license header to GPLv3
...
we switched to GPLv3 a long time ago, but neglected to update the
per-file license headers
12 years ago
Tobias
338c054da2
Filter: validity of array index was checked AFTER accessing the element.
...
(correction decreased Program size by 12 bytes)
12 years ago
James Bielman
4fa7bb1486
Add AVR compatibility header for missing math.h definitions.
...
- Define float versions of math functions to the double versions
on AVR (eg. #define sinf sin).
- These macros appear to be missing in older versions of avr-libs.
- Include AP_Math.h rather than math.h to get these definitions.
12 years ago
James Bielman
5631f865b2
Update floating point calculations to use floats instead of doubles.
...
- Allows use of hardware floating point on the Cortex-M4.
- Added "f" suffix to floating point literals.
- Call floating point versions of stdlib math functions.
12 years ago
Andrew Tridgell
d00b06d449
Filter: added a butter filter to example
12 years ago
Andrew Tridgell
befc6b7b9b
Filter: fixed butter filter build on px4
12 years ago
Pat Hickey
53ea7c564e
Butter filter: needs header guards
12 years ago
Jonathan Challinger
c66571b87d
Filter: added 2nd-order butterworth filters.
12 years ago
Andrew Tridgell
30b50a858d
Filter: fixed a warning on PX4
12 years ago
Andrew Tridgell
374af1cd14
build: change from Arduino.mk to apm.mk
12 years ago
Andrew Tridgell
2ba2e1c279
Derivative: removed reference to DESKTOP_BUILD
12 years ago
rmackay9
120b494d83
Filter: #include AP_Buffer.h no longer needed now that completementary filter has been moved to InertialNav library
12 years ago
Andrew Tridgell
a1187519a8
AP_HAL: use AP_HAL_BOARD_DRIVER in remaining test sketches
12 years ago
Andrew Tridgell
32afc3f9ae
Filter: fixed example warnings
12 years ago
Pat Hickey
eb530b86e8
move Arduino.mk to /mk/Arduino.mk
12 years ago
Andrew Tridgell
7d27e420ae
AP_HAL: remove unnecessary Arduino.h includes
12 years ago
Andrew Tridgell
cead629fc4
Filter: fixed merge error
12 years ago
Pat Hickey
475da4eca4
CONFIG_HAL_BOARD - test sketches fixed up, build all passes
12 years ago
Pat Hickey
a4f1f6a5db
AP_Progmem: fix dependencies for all sketches touched by AP_HAL_AVR
12 years ago
Pat Hickey
c56c4ae240
Various example sketches: hal.uart0->begin(115200) is redundant. use console.
...
just assume uart0 is initialized by the HAL, because it is. DRY.
also, don't ever use uart0 explicitly in example sketches, use console
and let the hal figure it out.
12 years ago
Pat Hickey
84e0dd406e
Filter: ported to AP_HAL
12 years ago
Pat Hickey
3f1d9d7f69
AP_Param: #include <AP_Param.h> fixups for libraries & sketches
...
* I mostly went through with grep and added an #include <AP_Param.h> below
every #include <AP_Common.h>. Not all of these example sketches might
strictly need AP_Param.
12 years ago
rmackay9
395eb25041
ThirdOrderCompFilter: delete because now combined with AP_InertialNav library
12 years ago
rmackay9
e6686dcab8
ThirdOrderCompFilter: remove last_time_constant_xy and _z static variables to save 8 bytes.
12 years ago
Andrew Tridgell
5a0632340c
Filter: fixed example build
12 years ago