From 407bbe4bb7c8f73ac7d79de2f209f0a0e375cd65 Mon Sep 17 00:00:00 2001 From: jblum Date: Mon, 22 Sep 2008 02:37:46 +0000 Subject: [PATCH] config properties and rates for gl sinks git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9637 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-wxgui/README.gl | 15 ++++++++++++--- gr-wxgui/src/python/const_window.py | 5 +++-- gr-wxgui/src/python/fft_window.py | 3 ++- gr-wxgui/src/python/number_window.py | 3 ++- gr-wxgui/src/python/scope_window.py | 3 ++- gr-wxgui/src/python/waterfall_window.py | 3 ++- 6 files changed, 23 insertions(+), 9 deletions(-) diff --git a/gr-wxgui/README.gl b/gr-wxgui/README.gl index 66075870..1d3eec60 100644 --- a/gr-wxgui/README.gl +++ b/gr-wxgui/README.gl @@ -7,14 +7,23 @@ editing an entry in the GNU Radio preferences file at: [wxgui] style=gl +fft_rate=30 +waterfall_rate=30 +scope_rate=30 +number_rate=5 +const_rate=5 +const_size=2048 +>>>The style parameter accepts 'nongl', 'gl', and 'auto', and defaults to 'auto'. -The style parameter accepts 'nongl', 'gl', and 'auto', and defaults to 'auto'. - -'nongl' forces the use of the non-GL (current) sinks. +'nongl' forces the use of the non-GL (current) sinks. 'gl' forces the use of the new GL based sinks, and will raise an exception if the appropriate GL support does not exist. 'auto' currently equates to 'nongl'; however, in release 3.2, this will change to use GL if possible and if not, fallback to the non-GL versions. + +>>>The *_rate parameter sets the frame rate for various gl sinks. + +>>>The const_size parameter sets the number of constellation points per frame. diff --git a/gr-wxgui/src/python/const_window.py b/gr-wxgui/src/python/const_window.py index 0aea5b59..cb7236b4 100644 --- a/gr-wxgui/src/python/const_window.py +++ b/gr-wxgui/src/python/const_window.py @@ -29,6 +29,7 @@ import numpy import math import pubsub from constants import * +from gnuradio import gr #for gr.prefs ################################################## # Constants @@ -36,9 +37,9 @@ from constants import * SLIDER_STEPS = 200 ALPHA_MIN_EXP, ALPHA_MAX_EXP = -6, -0.301 GAIN_MU_MIN_EXP, GAIN_MU_MAX_EXP = -6, -0.301 -DEFAULT_FRAME_RATE = 5 +DEFAULT_FRAME_RATE = gr.prefs().get_long('wxgui', 'const_rate', 5) DEFAULT_WIN_SIZE = (500, 400) -DEFAULT_CONST_SIZE = 2048 +DEFAULT_CONST_SIZE = gr.prefs().get_long('wxgui', 'const_size', 2048) CONST_PLOT_COLOR_SPEC = (0, 0, 1) MARKER_TYPES = ( ('Dot Small', 1.0), diff --git a/gr-wxgui/src/python/fft_window.py b/gr-wxgui/src/python/fft_window.py index a8c66dc8..e7affb1b 100644 --- a/gr-wxgui/src/python/fft_window.py +++ b/gr-wxgui/src/python/fft_window.py @@ -29,6 +29,7 @@ import numpy import math import pubsub from constants import * +from gnuradio import gr #for gr.prefs ################################################## # Constants @@ -36,7 +37,7 @@ from constants import * SLIDER_STEPS = 100 AVG_ALPHA_MIN_EXP, AVG_ALPHA_MAX_EXP = -3, 0 DEFAULT_WIN_SIZE = (600, 300) -DEFAULT_FRAME_RATE = 30 +DEFAULT_FRAME_RATE = gr.prefs().get_long('wxgui', 'fft_rate', 30) DIV_LEVELS = (1, 2, 5, 10, 20) FFT_PLOT_COLOR_SPEC = (0, 0, 1) PEAK_VALS_COLOR_SPEC = (0, 1, 0) diff --git a/gr-wxgui/src/python/number_window.py b/gr-wxgui/src/python/number_window.py index 83f19f6e..e3fc4653 100644 --- a/gr-wxgui/src/python/number_window.py +++ b/gr-wxgui/src/python/number_window.py @@ -27,6 +27,7 @@ import numpy import wx import pubsub from constants import * +from gnuradio import gr #for gr.prefs ################################################## # Constants @@ -34,7 +35,7 @@ from constants import * NEG_INF = float('-inf') SLIDER_STEPS = 100 AVG_ALPHA_MIN_EXP, AVG_ALPHA_MAX_EXP = -3, 0 -DEFAULT_NUMBER_RATE = 5 +DEFAULT_NUMBER_RATE = gr.prefs().get_long('wxgui', 'number_rate', 5) DEFAULT_WIN_SIZE = (300, 300) DEFAULT_GAUGE_RANGE = 1000 diff --git a/gr-wxgui/src/python/scope_window.py b/gr-wxgui/src/python/scope_window.py index 2b220c9a..57905ca4 100644 --- a/gr-wxgui/src/python/scope_window.py +++ b/gr-wxgui/src/python/scope_window.py @@ -29,11 +29,12 @@ import numpy import time import pubsub from constants import * +from gnuradio import gr #for gr.prefs ################################################## # Constants ################################################## -DEFAULT_FRAME_RATE = 30 +DEFAULT_FRAME_RATE = gr.prefs().get_long('wxgui', 'scope_rate', 30) DEFAULT_WIN_SIZE = (600, 300) DEFAULT_V_SCALE = 1000 TRIGGER_MODES = ( diff --git a/gr-wxgui/src/python/waterfall_window.py b/gr-wxgui/src/python/waterfall_window.py index 51bd0188..702f9709 100644 --- a/gr-wxgui/src/python/waterfall_window.py +++ b/gr-wxgui/src/python/waterfall_window.py @@ -29,13 +29,14 @@ import numpy import math import pubsub from constants import * +from gnuradio import gr #for gr.prefs ################################################## # Constants ################################################## SLIDER_STEPS = 100 AVG_ALPHA_MIN_EXP, AVG_ALPHA_MAX_EXP = -3, 0 -DEFAULT_FRAME_RATE = 30 +DEFAULT_FRAME_RATE = gr.prefs().get_long('wxgui', 'waterfall_rate', 30) DEFAULT_WIN_SIZE = (600, 300) DIV_LEVELS = (1, 2, 5, 10, 20) MIN_DYNAMIC_RANGE, MAX_DYNAMIC_RANGE = 10, 200 -- 2.30.2