# Flexrf\_base.cc

**URL:** <https://www.ruby-forum.com/t/flexrf-base-cc/162184>\
**Category:** GNU Radio\
**Created:** [March 6, 2009, 3:11pm UTC](https://www.ruby-forum.com/t/flexrf-base-cc/162184 "2009-03-06T15:11:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattias\_k](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/74df32/32.png) [@mattias\_k](https://www.ruby-forum.com/u/mattias_k)\
**Post date:** [March 6, 2009, 3:11pm UTC](https://www.ruby-forum.com/t/flexrf-base-cc/162184/1 "2009-03-06T15:11:21Z")

</div>

Hi list,

# I was browsing the c++ code in gr-usrp today, and found a strange thing in “flexrf\_base.cc”, line 337 to 349 in svn10524 (included below).

flexrf\_base\_tx::gain\_min()  
{  
return usrp()-\>pga\_max();  
}

float  
flexrf\_base\_tx::gain\_max()  
{  
return usrp()-\>pga\_max();  
}

==================

Is it just me who thinks it looks strange that both gain\_min() and  
gain\_max() calls pga\_max()? Since it looks like a typo, I felt obligated  
to report…

BR  
//Mattias

---

<div class="post-metadata">

**Author:** ![mattias\_k](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/74df32/32.png) [@mattias\_k](https://www.ruby-forum.com/u/mattias_k)\
**Post date:** [March 6, 2009, 8:03pm UTC](https://www.ruby-forum.com/t/flexrf-base-cc/162184/2 "2009-03-06T20:03:09Z")

</div>

On Fri, Mar 06, 2009 at 03:09:54PM +0100, Mattias K. wrote:

> float
> 
> BR

Hi Mattias,

That code is correct. For best performance of the RFX’s we always run  
the PGA’s at the maximum gain.

Eric
