fghfgh

Dependencies:   mbed CMSIS_DSP_5 TextLCD

Files at this revision

API Documentation at this revision

Comitter:
jvicente
Date:
Thu Nov 21 18:15:20 2019 +0000
Parent:
7:4dd3ef163f65
Commit message:
hg

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 4dd3ef163f65 -r 05a125e4eee0 main.cpp
--- a/main.cpp	Thu Nov 21 16:49:56 2019 +0000
+++ b/main.cpp	Thu Nov 21 18:15:20 2019 +0000
@@ -4,7 +4,6 @@
 #include <string.h>
 #include "datos.h"
 
-#define frameLength 2048
 #define NUM_TAPS              15
 #define NUM_STAGES            3
 float inDataFloat[frameLength];
@@ -16,14 +15,11 @@
 float meanSinFiltro;
 float meanTrasFiltro;
 
+Serial pc(USBTX, USBRX); // tx, rx
 
 float  salida[frameLength];
 
-const float32_t iirCoeffs32[NUM_TAPS] = {
-    8.9618e-05,-1.439e-11,-8.9619e-05,1.8954,-0.91178,
-    1,2,0.99999,1.9116,-0.94211,
-    1,-2,0.99999,1.9588,-0.96799
-};
+const float32_t iirCoeffs32[NUM_TAPS] = {0.04475,-2.2348e-08,-0.044751,1.8954,-0.91178,0.04475,0.089501,0.04475,1.9116,-0.94211,0.04475,-0.089501,0.04475,1.9588,-0.96799 };
 
 
 static float32_t iirStateF32[4*NUM_STAGES];
@@ -53,16 +49,16 @@
 // PROGRAMA PRINCIPAL
 int main()
 {
-
+    pc.baud(115200);
     init_procesado();
     procesarfloat(datos,salida,frameLength);
-    printf("*******************************entrada\n");
+    pc.printf("*******************************entrada\n");
     for (int n=0; n<frameLength; n++) {
-        printf("%f\n",datos[n]);
+        pc.printf("%f\n",datos[n]);
     }
-    printf("********************************salida\n");
+    pc.printf("********************************salida\n");
     for (int n=0; n<frameLength; n++) {
-        printf("%f\n",salida[n]);
+        pc.printf("%f\n",salida[n]);
     }
     while(1) {
         wait(1000);