From 89ccdd52761aa7c77010cfbe8e46a4ac9b813e92 Mon Sep 17 00:00:00 2001 From: mleech Date: Mon, 30 Jul 2007 03:46:03 +0000 Subject: [PATCH] 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 --- .../src/python/usrp_ra_receiver.py | 16 ++++++++++++---- 1 file 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 95a9291f..7a57d7e7 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, -- 2.30.2