Re: [Discuss-gnuradio] Rounding values in QT Number

2018-03-07 Thread John Ackermann N8UR
Having built a working gnuradio with rtlsdr stuff from github sources, I've now made a proof-of-concept change to the QT Number Sink to change the precision to two decimal places. One-line change patch file attached. I am at a loss to add a "precision" parameter to the GRC form so this patch

Re: [Discuss-gnuradio] Rounding values in QT Number

2018-03-06 Thread John Ackermann N8UR
Well, good news on one front. I just built gnuradio from github on a fresh Linux Mint 18.3 install and the osmocom/rtlsdr stuff seems to work fine. So whatever problem was there has now been cleaned up. Thanks to whoever was responsible for that! Now on to patching QT Number sink... John -

Re: [Discuss-gnuradio] Rounding values in QT Number

2018-03-06 Thread John Ackermann N8UR
I must now reflect and ponder to wisely choose my path. All options suck. I'd actually like most to go back to the build-gnuradio script but I haven't been able to verify that the issue I had last summer was addressed -- I don't know what broke or where, but with changes to librtlsdr around t

Re: [Discuss-gnuradio] Rounding values in QT Number

2018-03-06 Thread CEL
Indeed, I was misjudging the syntax of QString.arg(double, int); the second thing is just a minimal width to be filled up with spaces. The optional precision argument is never specified, so Qt just does whatever the hell it feels like. Splendid functionality. Regarding moving things out-of-tree: I

Re: [Discuss-gnuradio] Rounding values in QT Number

2018-03-06 Thread John Ackermann N8UR
Thanks, Marcus! First, there's something goofy because I am getting 6 decimal places, not 4. See the attached screen shot. Second, unfortunately at the moment I'm using the Ubuntu packages. I used to always use the build-gnuradio script, but last summer I started having problems with librt

Re: [Discuss-gnuradio] Rounding values in QT Number

2018-03-06 Thread CEL
Hi John, there's no dumb questions, maybe badly researched ones, and you definitely don't have the habit of posting the latter, so: Good question! It all boils down to this line in gnuradio/gr- qtgui/lib/numberdisplayform.cc: d_text_box[i]->setText(QString("%1 %2").arg(f, 4, ' ').\

Re: [Discuss-gnuradio] Rounding values in QT Number

2018-03-05 Thread Kyeong Su Shin
io@gnu.org 제목: Re: [Discuss-gnuradio] Rounding values in QT Number I don't remember if the QT sink has this, but I seem to recall that some GUI sinks have "formatters" which are basically the same as the python formatter concept. On Mon, Mar 5, 2018 at 4:41 PM John Ackermann N

Re: [Discuss-gnuradio] Rounding values in QT Number

2018-03-05 Thread Dan CaJacob
I don't remember if the QT sink has this, but I seem to recall that some GUI sinks have "formatters" which are basically the same as the python formatter concept. On Mon, Mar 5, 2018 at 4:41 PM John Ackermann N8UR wrote: > I hate to put such a dumb question to the list, but I'm going nuts > tryi

[Discuss-gnuradio] Rounding values in QT Number

2018-03-05 Thread John Ackermann N8UR
I hate to put such a dumb question to the list, but I'm going nuts trying to do something that ought to be simple. I am using a QT Number Sink to display dB values in float format. It is showing many more decimal places than have any meaning. I'd like to round the display to one or two decim