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: vfo.cpp
- Revision:
- 15:de22b9d147e0
- Parent:
- 14:cec63d8da48c
- Child:
- 16:d4ea3e6a0bce
diff -r cec63d8da48c -r de22b9d147e0 vfo.cpp --- a/vfo.cpp Mon Jan 30 14:48:42 2017 +0000 +++ b/vfo.cpp Mon Jan 30 15:01:29 2017 +0000 @@ -20,6 +20,22 @@ // place the signal processing coce here for ( int i= 0; i< block_size; i++ ) { + // 1 : if phase < half_way; 0 : others. + if ( this->style == square ) + { + if ( this->current_phase < this->half_way ) + out_buffer[i] = 0.5; + else + out_buffer[i] = 0.0; + } + + // to do, triangle. + + // update phase + this->current_phase += this->frequency; + // limit the range of the phase. + if ( this->current_phase >= this->Fs ) + this->current_phase -= this->Fs; } } // End of run()