summaryrefslogtreecommitdiff
path: root/gr-qtgui
diff options
context:
space:
mode:
authorPhilip Balister2011-11-01 15:51:26 -0400
committerPhilip Balister2011-11-01 15:51:26 -0400
commit3259e2a6a4effa2e847f096094df36d37e781742 (patch)
tree4184041baff12ed12fbd3845a70e7db497960b98 /gr-qtgui
parent037c5f60492f9201e23671fc87dd1ed0dd5cc5c9 (diff)
downloadgnuradio-3259e2a6a4effa2e847f096094df36d37e781742.tar.gz
gnuradio-3259e2a6a4effa2e847f096094df36d37e781742.tar.bz2
gnuradio-3259e2a6a4effa2e847f096094df36d37e781742.zip
qtgui_sink_c : Fix update rate math.
I botched the conversion to gruel high res timers. This patch fixes things. Checked on x86 byt hand adjusting update rate. We should expose the update rate setting to users. Signed-off-by: Philip Balister <philip@opensdr.com>
Diffstat (limited to 'gr-qtgui')
-rw-r--r--gr-qtgui/include/qtgui_sink_c.h2
-rw-r--r--gr-qtgui/lib/qtgui_sink_c.cc6
2 files changed, 4 insertions, 4 deletions
diff --git a/gr-qtgui/include/qtgui_sink_c.h b/gr-qtgui/include/qtgui_sink_c.h
index 28c0f1372..024ea360b 100644
--- a/gr-qtgui/include/qtgui_sink_c.h
+++ b/gr-qtgui/include/qtgui_sink_c.h
@@ -90,7 +90,7 @@ private:
bool d_plotfreq, d_plotwaterfall, d_plottime, d_plotconst;
- double d_update_time;
+ gruel::high_res_timer_type d_update_time;
QWidget *d_parent;
SpectrumGUIClass *d_main_gui;
diff --git a/gr-qtgui/lib/qtgui_sink_c.cc b/gr-qtgui/lib/qtgui_sink_c.cc
index 625ddbdf6..b99a0c56a 100644
--- a/gr-qtgui/lib/qtgui_sink_c.cc
+++ b/gr-qtgui/lib/qtgui_sink_c.cc
@@ -124,7 +124,7 @@ qtgui_sink_c::initialize()
d_plottime, d_plotconst);
// initialize update time to 10 times a second
- set_update_time(0.1);
+ set_update_time(0.5);
d_last_update = gruel::high_res_timer_now();
d_update_active = false;
@@ -191,8 +191,8 @@ qtgui_sink_c::set_frequency_axis(double min, double max)
void
qtgui_sink_c::set_update_time(double t)
{
- d_update_time = t;
- d_main_gui->SetUpdateTime(d_update_time);
+ d_update_time = t * gruel::high_res_timer_tps();
+ d_main_gui->SetUpdateTime(t);
}
void