Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: HIDScope MODSERIAL mbed
Fork of Signal Filter by
Diff: main.cpp
- Revision:
- 7:7493a0c5c6aa
- Parent:
- 6:c20a8c0f90ed
- Child:
- 8:a1ea1bf49944
--- a/main.cpp Sun Sep 27 14:56:16 2015 +0000 +++ b/main.cpp Mon Sep 28 08:41:32 2015 +0000 @@ -36,7 +36,7 @@ { double f_x[f_N]; double f_sum=0; - f_x[1]=abs(u); + f_x[1]=fabs(u); for (int i=f_N; i>=1; i--){ f_x[i]=f_x[i-1]; } @@ -45,7 +45,7 @@ for (int i=f_N; i>=0; i--){ f_sum=f_x[i]+f_sum; } - a=f_sum/(double(f_N)*0.002); + a=f_sum/double(f_N); f_sum=0; return a; } @@ -75,6 +75,7 @@ //double y2 = biquad( u2, f2_v1, f2_v2, f2_a1, f2_a2, f2_b0, f2_b1, f2_b2 ); double z1 = sliding_average(y1, N); scope.set(0,z1); + //scope.set(1,u1); scope.send(); }