From 3259e2a6a4effa2e847f096094df36d37e781742 Mon Sep 17 00:00:00 2001 From: Philip Balister Date: Tue, 1 Nov 2011 15:51:26 -0400 Subject: 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 --- gr-qtgui/include/qtgui_sink_c.h | 2 +- gr-qtgui/lib/qtgui_sink_c.cc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'gr-qtgui') 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 -- cgit