How to use value of a variable_sink in program

how to use value of a variable_sink in program?

I use a variable_sink to receive a value that clac in GRC program
Now I want to use this value in another place in program(name as
val_freq),

So how to do that? I announced val_freq in front of whole program and
add
two yellow lines in variable_sink,
but it doesn’t work.

self.blks2_variable_sink_x_0 = grc_blks2.variable_sink_f(
vlen=1,
decim=1,
callback=self.set_mod_freq_sg,
global val_freq
val_freq=self.set_mod_freq_sg,
)

how to use value of a variable_sink in program?

I use a variable_sink to receive a value that clac in GRC program
Now I want to use this value in another place in program(name as
val_freq),

So how to do that? I announced val_freq in front of whole program and
add
two yellow lines in variable_sink,
but it doesn’t work.

self.blks2_variable_sink_x_0 = grc_blks2.variable_sink_f(
vlen=1,
decim=1,
callback=self.set_mod_freq_sg,
global val_freq
val_freq=self.set_mod_freq_sg,
)

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs