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
ハードウェアおよびソフトウェアはskelton_unzen_nucleo_f746を基本にしています。
Diff: signal_processing.cpp
- Revision:
- 18:b9b1116f8768
- Parent:
- 15:de22b9d147e0
- Child:
- 20:699e209fd19a
--- a/signal_processing.cpp Tue Jan 31 14:19:16 2017 +0000 +++ b/signal_processing.cpp Wed Feb 01 15:00:31 2017 +0000 @@ -6,7 +6,10 @@ { // place the signal processing initializing code here. this->volume_level = 0.0; // sample initializaiton - this->vfo = new VFO(); // allocate VFO + this->note = new Monophonic(block_size); // allocate VFO + note->set_Fs( SAMPLING_FREQUENCY ); + note->set_vfo_frequency( 440 ); + note->set_vfo_wave_form( triangle ); } // End of constructor() @@ -22,7 +25,7 @@ // place the signal processing coce here // VFO - this->vfo->run( tx_left_buffer, block_size); + this->note->run( tx_left_buffer, block_size); // apply gain and copy to right ch. for ( int i= 0; i< block_size; i++ ) @@ -36,7 +39,7 @@ void SignalProcessing::set_Fs( int Fs ) { this->enter_critical_section(); // forbidden interrrupt. - this->vfo->set_Fs( Fs ); + this->note->set_Fs( Fs ); this->leave_critical_section(); // now, ok to accept interrupt. } @@ -44,7 +47,7 @@ void SignalProcessing::set_vfo_frequency( int freq ) { this->enter_critical_section(); // forbidden interrrupt. - this->vfo->set_frequency( freq ); + this->note->set_vfo_frequency( freq ); this->leave_critical_section(); // now, ok to accept interrupt. } @@ -52,15 +55,15 @@ void SignalProcessing::set_vfo_duty_cycle( float duty ) { this->enter_critical_section(); // forbidden interrrupt. - this->vfo->set_duty_cycle( duty ); + this->note->set_vfo_duty_cycle( duty ); this->leave_critical_section(); // now, ok to accept interrupt. } - // VFO wave style -void SignalProcessing::set_vfo_wave_style( wave_style style ) + // VFO wave form +void SignalProcessing::set_vfo_wave_form( wave_form form ) { this->enter_critical_section(); // forbidden interrrupt. - this->vfo->set_wave_style( style ); + this->note->set_vfo_wave_form( form ); this->leave_critical_section(); // now, ok to accept interrupt. }