host: Fix crash and beautift code.

This commit is contained in:
Alexander Chemeris
2015-04-27 22:10:28 -04:00
parent 1337b13d56
commit 5001cb8f95
2 changed files with 4 additions and 4 deletions

View File

@@ -18,7 +18,7 @@ public:
// Voltage to Watts curves
typedef std::map<double,double> pa_curve_t;
power_amp_impl(pa_type_t pa_type, pa_curve_t v2w, pa_curve_t w2v);
power_amp_impl(pa_type_t pa_type, const pa_curve_t &v2w, const pa_curve_t &w2v);
~power_amp_impl();
// Get the PA type
@@ -183,7 +183,7 @@ power_amp::pa_type_t power_amp::pa_str_to_type(std::string pa_str)
* power_amp_impl methods
**********************************************************************/
power_amp_impl::power_amp_impl(pa_type_t pa_type, pa_curve_t v2w, pa_curve_t w2v)
power_amp_impl::power_amp_impl(pa_type_t pa_type, const pa_curve_t &v2w, const pa_curve_t &w2v)
: _pa_type(pa_type)
, _v2w_curve(v2w)
, _w2v_curve(w2v)

View File

@@ -142,8 +142,6 @@ private:
void set_pa_dcdc_r(uint8_t val);
uint8_t get_pa_dcdc_r() const {return _pa_dcdc_r;}
uhd::gain_range_t get_pa_power_range(const std::string &which) const;
double set_pa_power(double power, const std::string &which);
//communication interfaces
std::string _device_ip_addr;
@@ -183,6 +181,8 @@ private:
void set_nlow(bool en);
void set_divsw1(bool en);
void set_divsw2(bool en);
uhd::gain_range_t get_pa_power_range(const std::string &which) const;
double set_pa_power(double power, const std::string &which);
uint16_t get_tcxo_dac(const umtrx_iface::sptr &);
uhd::transport::zero_copy_if::sptr make_xport(const size_t which, const uhd::device_addr_t &args);
std::complex<double> get_dc_offset_correction(const std::string &which) const;