From 98c703b3282b47ae2e0deaf317468f789cc9176e Mon Sep 17 00:00:00 2001 From: Dimitri Stolnikov Date: Sun, 1 Apr 2012 16:35:30 -0700 Subject: fcd: adds setter function to configure mixer gain --- gr-fcd/lib/fcd_source_c_impl.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'gr-fcd/lib/fcd_source_c_impl.cc') diff --git a/gr-fcd/lib/fcd_source_c_impl.cc b/gr-fcd/lib/fcd_source_c_impl.cc index a67d5bdbb..9543f16eb 100644 --- a/gr-fcd/lib/fcd_source_c_impl.cc +++ b/gr-fcd/lib/fcd_source_c_impl.cc @@ -173,6 +173,22 @@ void fcd_source_c_impl::set_lna_gain(float gain) /* TODO: check fme */ } +// Set mixer gain +void fcd_source_c_impl::set_mixer_gain(float gain) +{ + FCD_MODE_ENUM fme; + unsigned char g; + + if ( gain > 4.0 ) { + g = TMGE_P12_0DB; + } else { + g = TMGE_P4_0DB; + } + + fme = fcdAppSetParam(FCD_CMD_APP_SET_MIXER_GAIN, &g, 1); + /* TODO: check fme */ +} + // Set new frequency correction void fcd_source_c_impl::set_freq_corr(int ppm) { -- cgit