[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 03/06: qtgui: fixed issue #801 with control
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 03/06: qtgui: fixed issue #801 with controlpanel in the frequency display. |
Date: |
Mon, 22 Jun 2015 14:32:23 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch maint
in repository gnuradio.
commit c7d9bd3297f58f40c597f5beee8ca67f8f556290
Author: Tom Rondeau <address@hidden>
Date: Fri Jun 19 15:05:19 2015 -0400
qtgui: fixed issue #801 with controlpanel in the frequency display.
The logf calculation might produce a value slightly less than the even
number it should, so casting it to an integer would round it
down. Using round() to fix the problem.
---
gr-qtgui/lib/freqcontrolpanel.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gr-qtgui/lib/freqcontrolpanel.cc b/gr-qtgui/lib/freqcontrolpanel.cc
index 269b88a..5840989 100644
--- a/gr-qtgui/lib/freqcontrolpanel.cc
+++ b/gr-qtgui/lib/freqcontrolpanel.cc
@@ -21,6 +21,7 @@
*/
#include <gnuradio/qtgui/freqcontrolpanel.h>
+#include <cmath>
FreqControlPanel::FreqControlPanel(FreqDisplayForm *form)
: QVBoxLayout(),
@@ -245,7 +246,7 @@ FreqControlPanel::notifyAvgSlider(int val)
void
FreqControlPanel::toggleFFTSize(int val)
{
- int index = static_cast<int>(logf(static_cast<float>(val))/logf(2.0f)) - 5;
+ int index =
static_cast<int>(round(logf(static_cast<float>(val))/logf(2.0f))) - 5;
d_fft_size_combo->setCurrentIndex(index);
}
- [Commit-gnuradio] [gnuradio] branch maint updated (b9034d5 -> 3bff8fa), git, 2015/06/22
- [Commit-gnuradio] [gnuradio] 05/06: Merge remote-tracking branch 'tom/qtgui/cpfix' into maint, git, 2015/06/22
- [Commit-gnuradio] [gnuradio] 02/06: grc: fix generate mode error message (#800), git, 2015/06/22
- [Commit-gnuradio] [gnuradio] 01/06: completing the half sentence about when to use C++, git, 2015/06/22
- [Commit-gnuradio] [gnuradio] 03/06: qtgui: fixed issue #801 with controlpanel in the frequency display.,
git <=
- [Commit-gnuradio] [gnuradio] 06/06: Merge remote-tracking branch 'gnuradio-wg-grc/maint_grcwg' into maint, git, 2015/06/22
- [Commit-gnuradio] [gnuradio] 04/06: grc: fix context menu in props dialog text displays, git, 2015/06/22