|
From: | John Ackermann N8UR |
Subject: | [Discuss-gnuradio] Rounding values in QT Number |
Date: | Mon, 5 Mar 2018 16:36:56 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 |
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 decimal places.
I tried making an embedded python block to do the rounding and finally succeeded (it was a long and painful process, and frankly I don't understand why I had to do what I did to get it to work), but the number sink is still printing all the extra decimal places, they're just now set to zero.
Is there any trick to round or even just truncate the number of decimal places shown in the QT Number Sink?
Thanks, John
[Prev in Thread] | Current Thread | [Next in Thread] |