uncrustify libraries/Filter/DerivativeFilter.cpp

This commit is contained in:
uncrustify 2012-08-16 23:22:10 -07:00 committed by Pat Hickey
parent e5b317cb42
commit 973dcba9ab
1 changed files with 18 additions and 18 deletions

View File

@ -51,8 +51,8 @@ float DerivativeFilter<T,FILTER_SIZE>::slope(void)
// use f() to make the code match the maths a bit better. Note // use f() to make the code match the maths a bit better. Note
// that unlike an average filter, we care about the order of the elements // that unlike an average filter, we care about the order of the elements
#define f(i) FilterWithBuffer<T,FILTER_SIZE>::samples[(((FilterWithBuffer<T,FILTER_SIZE>::sample_index-1)+i+1)+3*FILTER_SIZE/2) % FILTER_SIZE] #define f(i) FilterWithBuffer<T,FILTER_SIZE>::samples[(((FilterWithBuffer<T,FILTER_SIZE>::sample_index-1)+i+1)+3*FILTER_SIZE/2) % FILTER_SIZE]
#define x(i) _timestamps[(((FilterWithBuffer<T,FILTER_SIZE>::sample_index-1)+i+1)+3*FILTER_SIZE/2) % FILTER_SIZE] #define x(i) _timestamps[(((FilterWithBuffer<T,FILTER_SIZE>::sample_index-1)+i+1)+3*FILTER_SIZE/2) % FILTER_SIZE]
if (_timestamps[FILTER_SIZE-1] == _timestamps[FILTER_SIZE-2]) { if (_timestamps[FILTER_SIZE-1] == _timestamps[FILTER_SIZE-2]) {
// we haven't filled the buffer yet - assume zero derivative // we haven't filled the buffer yet - assume zero derivative