diff --git a/lib/fcd/fcd_source.cc b/lib/fcd/fcd_source.cc index 89f6ab5..38ce7dc 100644 --- a/lib/fcd/fcd_source.cc +++ b/lib/fcd/fcd_source.cc @@ -206,16 +206,6 @@ osmosdr::gain_range_t fcd_source::get_gain_range( const std::string & name, size return get_gain_range( chan ); } -bool fcd_source::set_gain_mode( bool automatic, size_t chan ) -{ - return get_gain_mode(chan); -} - -bool fcd_source::get_gain_mode( size_t chan ) -{ - return true; -} - double fcd_source::set_gain( double gain, size_t chan ) { _src->set_lna_gain(gain); diff --git a/lib/fcd/fcd_source.h b/lib/fcd/fcd_source.h index 5e816b8..6fa00a3 100644 --- a/lib/fcd/fcd_source.h +++ b/lib/fcd/fcd_source.h @@ -65,8 +65,6 @@ public: std::vector get_gain_names( size_t chan = 0 ); osmosdr::gain_range_t get_gain_range( size_t chan = 0 ); osmosdr::gain_range_t get_gain_range( const std::string & name, size_t chan = 0 ); - bool set_gain_mode( bool automatic, size_t chan = 0 ); - bool get_gain_mode( size_t chan = 0 ); double set_gain( double gain, size_t chan = 0 ); double set_gain( double gain, const std::string & name, size_t chan = 0 ); double get_gain( size_t chan = 0 ); diff --git a/lib/file/file_source_c.cc b/lib/file/file_source_c.cc index 2816716..e62ce60 100644 --- a/lib/file/file_source_c.cc +++ b/lib/file/file_source_c.cc @@ -183,16 +183,6 @@ osmosdr::gain_range_t file_source_c::get_gain_range( const std::string & name, s return get_gain_range( chan ); } -bool file_source_c::set_gain_mode( bool automatic, size_t chan ) -{ - return get_gain_mode(chan); -} - -bool file_source_c::get_gain_mode( size_t chan ) -{ - return true; -} - double file_source_c::set_gain( double gain, size_t chan ) { return get_gain(chan); diff --git a/lib/file/file_source_c.h b/lib/file/file_source_c.h index ace491e..68f12ab 100644 --- a/lib/file/file_source_c.h +++ b/lib/file/file_source_c.h @@ -63,8 +63,6 @@ public: std::vector get_gain_names( size_t chan = 0 ); osmosdr::gain_range_t get_gain_range( size_t chan = 0 ); osmosdr::gain_range_t get_gain_range( const std::string & name, size_t chan = 0 ); - bool set_gain_mode( bool automatic, size_t chan = 0 ); - bool get_gain_mode( size_t chan = 0 ); double set_gain( double gain, size_t chan = 0 ); double set_gain( double gain, const std::string & name, size_t chan = 0 ); double get_gain( size_t chan = 0 ); diff --git a/lib/osmosdr_src_iface.h b/lib/osmosdr_src_iface.h index a169e0d..3c0f831 100644 --- a/lib/osmosdr_src_iface.h +++ b/lib/osmosdr_src_iface.h @@ -130,14 +130,14 @@ public: * \param chan the channel index 0 to N-1 * \return the actual gain mode */ - virtual bool set_gain_mode( bool automatic, size_t chan = 0 ) = 0; + virtual bool set_gain_mode( bool automatic, size_t chan = 0 ) { return false; } /*! * Get the gain mode selected for the underlying radio hardware. * \param chan the channel index 0 to N-1 * \return the actual gain mode (true means automatic gain mode) */ - virtual bool get_gain_mode( size_t chan = 0 ) = 0; + virtual bool get_gain_mode( size_t chan = 0 ) { return false; } /*! * Set the gain for the underlying radio hardware. diff --git a/lib/uhd/uhd_source_c.cc b/lib/uhd/uhd_source_c.cc index d5f9715..809516a 100644 --- a/lib/uhd/uhd_source_c.cc +++ b/lib/uhd/uhd_source_c.cc @@ -229,16 +229,6 @@ osmosdr::gain_range_t uhd_source_c::get_gain_range( const std::string & name, si return range; } -bool uhd_source_c::set_gain_mode( bool automatic, size_t chan ) -{ - return get_gain_mode(chan); -} - -bool uhd_source_c::get_gain_mode( size_t chan ) -{ - return true; -} - double uhd_source_c::set_gain( double gain, size_t chan ) { _src->set_gain(gain, chan); diff --git a/lib/uhd/uhd_source_c.h b/lib/uhd/uhd_source_c.h index 46c5a30..5ab2963 100644 --- a/lib/uhd/uhd_source_c.h +++ b/lib/uhd/uhd_source_c.h @@ -65,8 +65,6 @@ public: std::vector get_gain_names( size_t chan = 0 ); osmosdr::gain_range_t get_gain_range( size_t chan = 0 ); osmosdr::gain_range_t get_gain_range( const std::string & name, size_t chan = 0 ); - bool set_gain_mode( bool automatic, size_t chan = 0 ); - bool get_gain_mode( size_t chan = 0 ); double set_gain( double gain, size_t chan = 0 ); double set_gain( double gain, const std::string & name, size_t chan = 0 ); double get_gain( size_t chan = 0 );