Experimental implementation of the adaptive filter of "Interface" magazine in 2016-2017

Dependencies:   amakusa mbed-dsp mbed shimabara ukifune unzen_nucleo_f746

Fork of skeleton_unzen_nucleo_f746 by seiichi horie

ハードウェアおよびソフトウェアはskelton_unzen_nucleo_f746を基本にしています。

Revision:
14:cec63d8da48c
Parent:
13:b33cb5925113
Child:
15:de22b9d147e0
--- a/signal_processing.cpp	Sun Jan 29 03:05:56 2017 +0000
+++ b/signal_processing.cpp	Mon Jan 30 14:48:42 2017 +0000
@@ -6,6 +6,7 @@
 {
         // place the signal processing initializing code here.
     this->volume_level = 0.0;   // sample initializaiton
+    this->vfo = new VFO();      // allocate VFO
 }   // End of constructor()
     
     
@@ -19,13 +20,39 @@
            )
 {
         // place the signal processing coce here
+
+        // VFO
+    this->vfo->run( tx_left_buffer, block_size);
+    
+        // apply gain and copy to right ch.
     for ( int i= 0; i< block_size; i++ )
     {
-            tx_left_buffer[i]  = rx_left_buffer[i]  * this->volume_level;
-            tx_right_buffer[i] = rx_right_buffer[i] * this->volume_level;
+            tx_right_buffer[i]  = tx_left_buffer[i]  *= this->volume_level;
     }
 }   // End of run()
     
+
+void SignalProcessing::set_Fs( int Fs )
+{
+    this->vfo->set_Fs( Fs );
+}
+
+void SignalProcessing::set_frequency( int freq )
+{
+    this->vfo->set_frequency( freq );
+}
+
+void SignalProcessing::set_duty_cycle( float duty )
+{
+    this->vfo->set_duty_cycle( duty );
+}
+
+void SignalProcessing::set_wave_style( wave_style style )
+{
+    this->vfo->set_wave_style( style );
+}
+
+
            
         // Sample method. Set the volume level to the object.
 void SignalProcessing::set_volume( float vol )