summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormleech <mleech@221aa14e-8319-0410-a670-987f0aec2ac5>2007-07-30 03:46:03 +0000
committermleech <mleech@221aa14e-8319-0410-a670-987f0aec2ac5>2007-07-30 03:46:03 +0000
commit89ccdd52761aa7c77010cfbe8e46a4ac9b813e92 (patch)
tree63844fb4579ce2055c3a258eb78aeccf923b7cf1
parentafdea599c98729e2b868819565f4c95c563c8c48 (diff)
Extended the range of the offset controls so that it now covers -750 to +750
Added bounds-checking/setting for both --calib_coeff and --calib_offset git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@6084 221aa14e-8319-0410-a670-987f0aec2ac5
-rwxr-xr-xgr-radio-astronomy/src/python/usrp_ra_receiver.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/gr-radio-astronomy/src/python/usrp_ra_receiver.py b/gr-radio-astronomy/src/python/usrp_ra_receiver.py
index 95a9291f03..7a57d7e75b 100755
--- a/gr-radio-astronomy/src/python/usrp_ra_receiver.py
+++ b/gr-radio-astronomy/src/python/usrp_ra_receiver.py
@@ -148,7 +148,15 @@ class app_flow_graph(stdgui.gui_flow_graph):
# Calibration coefficient and offset
self.calib_coeff = options.calib_coeff
self.calib_offset = options.calib_offset
- self.orig_calib_offset = options.calib_offset
+ if self.calib_offset < -750:
+ self.calib_offset = -750
+ if self.calib_offset > 750:
+ self.calib_offset = 750
+
+ if self.calib_coeff < 1:
+ self.calib_offset = 1
+ if self.calib_coeff > 100:
+ self.calib_offset = 100
self.integ = options.integ
self.avg_alpha = options.avg
@@ -374,8 +382,8 @@ class app_flow_graph(stdgui.gui_flow_graph):
self.integ = options.integ
if self.setimode == False:
self.myform['integration'].set_value(int(options.integ))
- self.myform['offset'].set_value(options.calib_offset)
- self.myform['dcgain'].set_value(options.calib_coeff)
+ self.myform['offset'].set_value(self.calib_offset)
+ self.myform['dcgain'].set_value(self.calib_coeff)
self.myform['average'].set_value(int(options.avg))
@@ -521,7 +529,7 @@ class app_flow_graph(stdgui.gui_flow_graph):
if self.setimode == False:
myform['offset'] = form.slider_field(parent=self.panel, sizer=vbox3,
- label="Post-Detector Offset", weight=1, min=-500, max=500,
+ label="Post-Detector Offset", weight=1, min=-750, max=750,
callback=self.set_pd_offset)
vbox3.Add((2,0), 0, 0)
myform['dcgain'] = form.slider_field(parent=self.panel, sizer=vbox3,