Karthik:
Here are some code segments that I borrowed and put together from
several of the gnu-radio examples.
#Complex Multiply Block
self.mc_2 = gr.multiply_const_cc(gain_2)
.
.
#Gain Control Slider
myform[‘Gain 2’] =
form.quantized_slider_field(parent=self.panel, sizer=hbox,
label = “Gain 2”,
weight=3, range=(-20, 20, .2),
callback=self.set_gain_2)
.
.
#Gain Control
def set_gain_2 (self, gain):
gain = max(-20, min(20, gain))
gain_2 = 10**(gain/20)
self.mc_2.set_k(gain_2)
These seem to work in my application, although I’m just learning Python.
Anytime the gain control slider changes, the gain is updated.
RCJ…