discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Customized Block Giving Incorrect Output


From: Michael Dickens
Subject: Re: [Discuss-gnuradio] Customized Block Giving Incorrect Output
Date: Thu, 15 Feb 2018 10:18:16 -0500

Hi Tellrell - Yes you're making progress! A few thoughts on the Python:

1) Except the initial setting of in0, you can replace "input_items[0]" by "in0".

2) I think you can then replace "in1 = input_items[0][:][i]" with just "in1 = in0[i]". This works for me & makes sense based on the input_items structure.

3) The rest looks good. You might consider using NumPy to simplify (and possible speed up) computations.

4) "sync_block" might not be what you want: it assumes 1:1 input:output by default. The return value is both the number of items to be consumed as well as were generated. Currently your block isn't generating items, so if you want to use this inheritance with your block as-is you'll want to call "consume_each" with the correct number of items & then return 0.

Hope this continues to help & Keep it going! - MLD

On Thu, Feb 15, 2018, at 9:45 AM, Tellrell White wrote:
Thanks Michael for your feedback. I appreciate all the help from you and Marcus.
Updates:

1) I created a new block "ED Block" derived from gr.sync_block. I believe this simplifies things a bit.

2) Based on the info you provided me Michael on input_items, the "vec_length" data, which comes from the third index of input_items is the data I want to use in my work function. With this in mind, I've made some changes to my work function.

I believe I'm making some progress on the block. I've attached an updated copy of the .grc file. Also, is consume_each() needed here? Currently, I'm not using it in my script.


reply via email to

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