discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] callback function called twice


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] callback function called twice
Date: Wed, 24 Jul 2013 11:39:34 -0400

On Wed, Jul 24, 2013 at 8:51 AM, Nemanja Savic <address@hidden> wrote:
> Hi guys,
>
> this is kind of very old thread, but the same problem. I started changing my
> blocks for 3.7.0 and callbacks are called twice. Is there any explanation
> for this acting?
>
> thanks,
> Nemanja
>
>
> On Thu, Feb 28, 2013 at 9:53 AM, Nemanja Savic <address@hidden> wrote:
>>
>> Was any nonsense in previous post?
>>
>>
>> On Wed, Feb 27, 2013 at 2:16 PM, Nemanja Savic <address@hidden> wrote:
>>>
>>> Hi again GNURADIOers,
>>>
>>> I have a set member function which is also used as a callback from GRC.
>>> It looks like this:
>>>
>>> void
>>> test_file_sink::set_sensitivity(double milisecond)
>>> {
>>>     d_n_samples = (unsigned
>>> int)(milisecond*d_sample_rate/1000.0)*d_itemsize;
>>>   printf("\nd_n_samples: %d\n", d_n_samples);
>>>     init_old_data_buff();
>>> }
>>>
>>> When I run flowgraph, and change "sensitivity", my callback function is
>>> called twice.
>>> Is this normal action?
>>>
>>> Best
>>>
>>> --
>>> Nemanja Savić
>>
>>
>>
>>
>> --
>> Nemanja Savić
>
> --
> Nemanja Savić

Nemanja,

It's unclear what you are doing when changing the sensitivity? Is this
in GRC and using a GUI slider or something? Or are you triggering the
callback function some other way? If it's a GUI element, it could just
be that the system calls it based on a change in the state, which
could mean when you press and release or when you hit a button is one
update and when the update to the slider happens it gets triggered
again.

Is this really a big deal or are you just curious?

Tom



reply via email to

[Prev in Thread] Current Thread [Next in Thread]