Facking kut filter werkt EINDELIJK !311!!111!!1!!!!!!!!!!!!!!!!!!!

Dependencies:   HIDScope MODSERIAL Matrix QEI biquadFilter mbed

Fork of Turning_Motor_V6 by Brighton de Jong

Files at this revision

API Documentation at this revision

Comitter:
Brighton_the_robot
Date:
Wed Oct 31 13:56:41 2018 +0000
Parent:
7:c5c648898881
Child:
9:355babe55589
Commit message:
Facking kut filter werkt EINDELIJK1111!!!11!!! TERING

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue Oct 30 15:41:58 2018 +0000
+++ b/main.cpp	Wed Oct 31 13:56:41 2018 +0000
@@ -36,10 +36,22 @@
 BiQuadChain bqc6;
 BiQuadChain bqc7;
 BiQuadChain bqc8;
-BiQuad BqNotch1( 9.65081e-01, -1.56203e+00, 9.65081e-01,-1.56858e+00, 9.64241e-01  );
-BiQuad BqNotch2(  1.00000e+00, -1.61855e+00, 1.00000e+00 ,-1.61100e+00, 9.65922e-01);
-BiQuad BqHP( 9.86760e-01, -1.97352e+00, 9.86760e-01, -1.97334e+00, 9.73695e-01 );
-BiQuad BqLP( 8.76555e-05, 1.75311e-04, 8.76555e-05, -1.97334e+00, 9.73695e-01 );
+BiQuad BqNotch1_1( 9.65081e-01, -1.56203e+00, 9.65081e-01,-1.56858e+00, 9.64241e-01  );
+BiQuad BqNotch2_1(  1.00000e+00, -1.61855e+00, 1.00000e+00 ,-1.61100e+00, 9.65922e-01);
+BiQuad BqNotch1_2( 9.65081e-01, -1.56203e+00, 9.65081e-01,-1.56858e+00, 9.64241e-01  );
+BiQuad BqNotch2_2(  1.00000e+00, -1.61855e+00, 1.00000e+00 ,-1.61100e+00, 9.65922e-01);
+BiQuad BqNotch1_3( 9.65081e-01, -1.56203e+00, 9.65081e-01,-1.56858e+00, 9.64241e-01  );
+BiQuad BqNotch2_3(  1.00000e+00, -1.61855e+00, 1.00000e+00 ,-1.61100e+00, 9.65922e-01);
+BiQuad BqNotch1_4( 9.65081e-01, -1.56203e+00, 9.65081e-01,-1.56858e+00, 9.64241e-01  );
+BiQuad BqNotch2_4(  1.00000e+00, -1.61855e+00, 1.00000e+00 ,-1.61100e+00, 9.65922e-01);
+BiQuad BqHP1( 9.86760e-01, -1.97352e+00, 9.86760e-01, -1.97334e+00, 9.73695e-01 );
+BiQuad BqHP2( 9.86760e-01, -1.97352e+00, 9.86760e-01, -1.97334e+00, 9.73695e-01 );
+BiQuad BqHP3( 9.86760e-01, -1.97352e+00, 9.86760e-01, -1.97334e+00, 9.73695e-01 );
+BiQuad BqHP4( 9.86760e-01, -1.97352e+00, 9.86760e-01, -1.97334e+00, 9.73695e-01 );
+BiQuad BqLP1( 8.76555e-05, 1.75311e-04, 8.76555e-05, -1.97334e+00, 9.73695e-01 );
+BiQuad BqLP2( 8.76555e-05, 1.75311e-04, 8.76555e-05, -1.97334e+00, 9.73695e-01 );
+BiQuad BqLP3( 8.76555e-05, 1.75311e-04, 8.76555e-05, -1.97334e+00, 9.73695e-01 );
+BiQuad BqLP4( 8.76555e-05, 1.75311e-04, 8.76555e-05, -1.97334e+00, 9.73695e-01 );
 
 volatile float Bicep_Right          = 0.0;
 volatile float Bicep_Left           = 0.0;
@@ -272,14 +284,14 @@
 {
     pc.baud(115200);    
     PwmPin1.period_us(30); //60 microseconds pwm period, 16.7 kHz 
-    bqc1.add( &BqNotch1 ).add( &BqNotch2 ).add( &BqHP );
-    bqc2.add(&BqLP);
-    bqc3.add( &BqNotch1 ).add( &BqNotch2 ).add( &BqHP );
-    bqc4.add(&BqLP);
-    bqc5.add( &BqNotch1 ).add( &BqNotch2 ).add( &BqHP );
-    bqc6.add(&BqLP);
-    bqc7.add( &BqNotch1 ).add( &BqNotch2 ).add( &BqHP );
-    bqc8.add(&BqLP);
+    bqc1.add( &BqNotch1_1 ).add( &BqNotch2_1 ).add( &BqHP1 );
+    bqc2.add(&BqLP1);
+    bqc3.add( &BqNotch1_2 ).add( &BqNotch2_2 ).add( &BqHP2 );
+    bqc4.add(&BqLP2);
+    bqc5.add( &BqNotch1_3 ).add( &BqNotch2_3 ).add( &BqHP3 );
+    bqc6.add(&BqLP3);
+    bqc7.add( &BqNotch1_4 ).add( &BqNotch2_4 ).add( &BqHP4 );
+    bqc8.add(&BqLP4);
     StateTicker.attach(StateMachine, 0.002);
    
     printTicker.attach(&Printing, 2.0);