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 Matrix QEI biquadFilter mbed
Fork of Filter by
Revision 8:b6b09226a421, committed 2018-10-31
- Comitter:
- Brighton_the_robot
- Date:
- Wed Oct 31 13:56:41 2018 +0000
- Parent:
- 7:c5c648898881
- 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);
