[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r8555 - in grc/trunk/src: grc grc/gui/elements grc_gnu
From: |
jblum |
Subject: |
[Commit-gnuradio] r8555 - in grc/trunk/src: grc grc/gui/elements grc_gnuradio/blocks/filters |
Date: |
Thu, 5 Jun 2008 13:39:08 -0600 (MDT) |
Author: jblum
Date: 2008-06-05 13:39:07 -0600 (Thu, 05 Jun 2008)
New Revision: 8555
Modified:
grc/trunk/src/grc/Constants.py
grc/trunk/src/grc/gui/elements/FlowGraph.py
grc/trunk/src/grc_gnuradio/blocks/filters/blks2_channel_model.xml
grc/trunk/src/grc_gnuradio/blocks/filters/blks2_rational_resampler_xxx.xml
grc/trunk/src/grc_gnuradio/blocks/filters/gr_fft_filter_xxx.xml
grc/trunk/src/grc_gnuradio/blocks/filters/gr_fft_vxx.xml
grc/trunk/src/grc_gnuradio/blocks/filters/gr_filter_delay_fc.xml
grc/trunk/src/grc_gnuradio/blocks/filters/gr_fir_filter_xxx.xml
grc/trunk/src/grc_gnuradio/blocks/filters/gr_freq_xlating_fir_filter_xxx.xml
grc/trunk/src/grc_gnuradio/blocks/filters/gr_interp_fir_filter_xxx.xml
grc/trunk/src/grc_gnuradio/blocks/filters/gr_rational_resampler_base_xxx.xml
Log:
firdes import in filter blocks, timing based redrawing (much smoother for large
fgs)
Modified: grc/trunk/src/grc/Constants.py
===================================================================
--- grc/trunk/src/grc/Constants.py 2008-06-05 13:53:49 UTC (rev 8554)
+++ grc/trunk/src/grc/Constants.py 2008-06-05 19:39:07 UTC (rev 8555)
@@ -117,8 +117,8 @@
##When the window has to be scrolled, move it this distance in the required
direction.
SCROLL_DISTANCE = 15
-##The redrawing sensitivity, how many motion detection events must occur
before a redraw?
-MOTION_DETECT_REDRAWING_SENSITIVITY = 3
+##The redrawing sensitivity, how many seconds must pass between motion events
before a redraw?
+MOTION_DETECT_REDRAWING_SENSITIVITY = .02
##How close the mouse click can be to a connection and register a connection
select.
CONNECTION_SELECT_SENSITIVITY = 5
Modified: grc/trunk/src/grc/gui/elements/FlowGraph.py
===================================================================
--- grc/trunk/src/grc/gui/elements/FlowGraph.py 2008-06-05 13:53:49 UTC (rev
8554)
+++ grc/trunk/src/grc/gui/elements/FlowGraph.py 2008-06-05 19:39:07 UTC (rev
8555)
@@ -32,6 +32,7 @@
import gtk
import random
+import time
from grc import Messages
class FlowGraph(Element):
@@ -52,7 +53,7 @@
self.mouse_pressed = False
self.selected_element = None
self.is_selected = lambda: bool(self.selected_element)
- self.count = 0
+ self.time = 0
def get_drawing_area(self): return self.drawing_area
@@ -277,7 +278,7 @@
self.set_coordinate(coordinate)
if left_click:
if self.selected_element:
self.selected_element.set_highlighted(False)
- self.count = 0
+ self.time = 0
self.mouse_pressed = True
old_selection = self.selected_element
self.selected_element =
self.what_is_selected(self.get_coordinate())
@@ -332,11 +333,10 @@
"""!
The mouse has moved. If mouse_pressed is true, react to the
motions:
If an Element is highlighted, this will move the Element by
redrawing it at the new position.
- """
- self.count = (1 +
self.count)%MOTION_DETECT_REDRAWING_SENSITIVITY
- #to perform a movement, the mouse must be pressed, an element
selected, count of zero.
- if self.mouse_pressed and\
- self.count == 0 and\
+ """
+ #to perform a movement, the mouse must be pressed, an element
selected, timediff large enough.
+ if time.time() - self.time >=
MOTION_DETECT_REDRAWING_SENSITIVITY and\
+ self.mouse_pressed and\
self.selected_element:
#The event coordinates must be within BPS pixels away
from the bounds of the flow graph.
fgW,fgH = self.get_size()
@@ -364,3 +364,5 @@
#move the selected element and record the new
coordinate
self.move_selected((deltaX, deltaY))
self.set_coordinate((x, y))
+ #update time
+ self.time = time.time()
Modified: grc/trunk/src/grc_gnuradio/blocks/filters/blks2_channel_model.xml
===================================================================
--- grc/trunk/src/grc_gnuradio/blocks/filters/blks2_channel_model.xml
2008-06-05 13:53:49 UTC (rev 8554)
+++ grc/trunk/src/grc_gnuradio/blocks/filters/blks2_channel_model.xml
2008-06-05 19:39:07 UTC (rev 8555)
@@ -9,6 +9,7 @@
<name>Channel Model</name>
<key>blks2_channel_model</key>
<import>from gnuradio import blks2</import>
+ <import>from gnuradio.gr import firdes</import>
<make>blks2.channel_model(
noise_voltage=$noise_voltage,
frequency_offset=$freq_offset,
Modified:
grc/trunk/src/grc_gnuradio/blocks/filters/blks2_rational_resampler_xxx.xml
===================================================================
--- grc/trunk/src/grc_gnuradio/blocks/filters/blks2_rational_resampler_xxx.xml
2008-06-05 13:53:49 UTC (rev 8554)
+++ grc/trunk/src/grc_gnuradio/blocks/filters/blks2_rational_resampler_xxx.xml
2008-06-05 19:39:07 UTC (rev 8555)
@@ -9,6 +9,7 @@
<name>Rational Resampler</name>
<key>blks2_rational_resampler_xxx</key>
<import>from gnuradio import blks2</import>
+ <import>from gnuradio.gr import firdes</import>
<make>blks2.rational_resampler_$(type)(
interpolation=$interp,
decimation=$decim,
Modified: grc/trunk/src/grc_gnuradio/blocks/filters/gr_fft_filter_xxx.xml
===================================================================
--- grc/trunk/src/grc_gnuradio/blocks/filters/gr_fft_filter_xxx.xml
2008-06-05 13:53:49 UTC (rev 8554)
+++ grc/trunk/src/grc_gnuradio/blocks/filters/gr_fft_filter_xxx.xml
2008-06-05 19:39:07 UTC (rev 8555)
@@ -9,6 +9,7 @@
<name>FFT Filter</name>
<key>gr_fft_filter_xxx</key>
<import>from gnuradio import gr</import>
+ <import>from gnuradio.gr import firdes</import>
<make>gr.fft_filter_$(type)($decim, $taps)</make>
<callback>set_taps($taps)</callback>
<param>
Modified: grc/trunk/src/grc_gnuradio/blocks/filters/gr_fft_vxx.xml
===================================================================
--- grc/trunk/src/grc_gnuradio/blocks/filters/gr_fft_vxx.xml 2008-06-05
13:53:49 UTC (rev 8554)
+++ grc/trunk/src/grc_gnuradio/blocks/filters/gr_fft_vxx.xml 2008-06-05
19:39:07 UTC (rev 8555)
@@ -9,6 +9,7 @@
<name>FFT</name>
<key>gr_fft_vxx</key>
<import>from gnuradio import gr</import>
+ <import>from gnuradio import window</import>
<make>#if $type.eval == "complex"
gr.fft_vcc($fft_size, $forward, $window, $shift)
#else
@@ -49,6 +50,7 @@
<param>
<name>Window</name>
<key>window</key>
+ <value>window.blackmanharris(1024)</value>
<type>real_vector</type>
</param>
<param>
Modified: grc/trunk/src/grc_gnuradio/blocks/filters/gr_filter_delay_fc.xml
===================================================================
--- grc/trunk/src/grc_gnuradio/blocks/filters/gr_filter_delay_fc.xml
2008-06-05 13:53:49 UTC (rev 8554)
+++ grc/trunk/src/grc_gnuradio/blocks/filters/gr_filter_delay_fc.xml
2008-06-05 19:39:07 UTC (rev 8555)
@@ -9,6 +9,7 @@
<name>Filter Delay</name>
<key>gr_filter_delay_fc</key>
<import>from gnuradio import gr</import>
+ <import>from gnuradio.gr import firdes</import>
<make>gr.filter_delay_fc($taps)</make>
<param>
<name>Taps</name>
Modified: grc/trunk/src/grc_gnuradio/blocks/filters/gr_fir_filter_xxx.xml
===================================================================
--- grc/trunk/src/grc_gnuradio/blocks/filters/gr_fir_filter_xxx.xml
2008-06-05 13:53:49 UTC (rev 8554)
+++ grc/trunk/src/grc_gnuradio/blocks/filters/gr_fir_filter_xxx.xml
2008-06-05 19:39:07 UTC (rev 8555)
@@ -9,6 +9,7 @@
<name>Decimating FIR Filter</name>
<key>gr_fir_filter_xxx</key>
<import>from gnuradio import gr</import>
+ <import>from gnuradio.gr import firdes</import>
<make>gr.fir_filter_$(type)($decim, $taps)</make>
<callback>set_taps($taps)</callback>
<param>
Modified:
grc/trunk/src/grc_gnuradio/blocks/filters/gr_freq_xlating_fir_filter_xxx.xml
===================================================================
---
grc/trunk/src/grc_gnuradio/blocks/filters/gr_freq_xlating_fir_filter_xxx.xml
2008-06-05 13:53:49 UTC (rev 8554)
+++
grc/trunk/src/grc_gnuradio/blocks/filters/gr_freq_xlating_fir_filter_xxx.xml
2008-06-05 19:39:07 UTC (rev 8555)
@@ -9,6 +9,7 @@
<name>Frequency Xlating FIR Filter</name>
<key>gr_freq_xlating_fir_filter_xxx</key>
<import>from gnuradio import gr</import>
+ <import>from gnuradio.gr import firdes</import>
<make>gr.freq_xlating_fir_filter_$(type)($decim, $taps, $center_freq,
$samp_rate)</make>
<callback>set_taps($taps)</callback>
<callback>set_center_freq($center_freq)</callback>
Modified: grc/trunk/src/grc_gnuradio/blocks/filters/gr_interp_fir_filter_xxx.xml
===================================================================
--- grc/trunk/src/grc_gnuradio/blocks/filters/gr_interp_fir_filter_xxx.xml
2008-06-05 13:53:49 UTC (rev 8554)
+++ grc/trunk/src/grc_gnuradio/blocks/filters/gr_interp_fir_filter_xxx.xml
2008-06-05 19:39:07 UTC (rev 8555)
@@ -9,6 +9,7 @@
<name>Interpolating FIR Filter</name>
<key>gr_interp_fir_filter_xxx</key>
<import>from gnuradio import gr</import>
+ <import>from gnuradio.gr import firdes</import>
<make>gr.interp_fir_filter_$(type)($interp, $taps)</make>
<callback>set_taps($taps)</callback>
<param>
Modified:
grc/trunk/src/grc_gnuradio/blocks/filters/gr_rational_resampler_base_xxx.xml
===================================================================
---
grc/trunk/src/grc_gnuradio/blocks/filters/gr_rational_resampler_base_xxx.xml
2008-06-05 13:53:49 UTC (rev 8554)
+++
grc/trunk/src/grc_gnuradio/blocks/filters/gr_rational_resampler_base_xxx.xml
2008-06-05 19:39:07 UTC (rev 8555)
@@ -9,6 +9,7 @@
<name>Rational Resampler Base</name>
<key>gr_rational_resampler_base_xxx</key>
<import>from gnuradio import gr</import>
+ <import>from gnuradio.gr import firdes</import>
<make>gr.rational_resampler_base_$(type)($interp, $decim, $taps)</make>
<callback>set_taps($taps)</callback>
<param>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r8555 - in grc/trunk/src: grc grc/gui/elements grc_gnuradio/blocks/filters,
jblum <=