Test of pmic GPA with filter

Dependencies:   mbed

Fork of nucf446-cuboid-balance1_strong by RT2_Cuboid_demo

Revision:
20:0319a4a56db8
Parent:
10:600d7cf652e7
--- a/IIR_filter.h	Thu Apr 05 07:33:08 2018 +0000
+++ b/IIR_filter.h	Thu Apr 05 10:22:41 2018 +0000
@@ -1,26 +1,25 @@
 class IIR_filter{
      public:
      
-        //IIR_filter(float *A[],float *B[]);       
-        IIR_filter(float T,float Ts);
-        IIR_filter(float T,float Ts,float K);
-        IIR_filter(float w0,float D, float Ts, float K);
-        IIR_filter(float *,float *, int,int);
+        IIR_filter(float T, float Ts);
+        IIR_filter(float T, float Ts, float K);
+        IIR_filter(float w0, float D, float Ts, float K);
+        IIR_filter(float *b, float *a, int nb_, int na_);
                     
         float operator()(float u){
-            return filter(u);
+            return filter((double)u);
          }
         virtual     ~IIR_filter();
         void        reset(float);
-        float       filter(float);
+        float       filter(double);
     
     private:
 
         unsigned int nb;
         unsigned int na;
-        float *B;
-        float *A;
-        float *uk;
-        float *yk;
-        float K;
+        double *B;
+        double *A;
+        double *uk;
+        double *yk;
+        double K;
 };
\ No newline at end of file