Re: how to insert if...else logic between 2 blocks

2020-12-04 Thread james jordan
Hi Fabian, thanks for your help. i write a fft index to freq transform block. i put the source here for anyone need. From: Discuss-gnuradio on behalf of Fabian Schwartau Sent: Friday, December 4, 2020 9:28 PM To: discuss-gnuradio

Re: Post on Gnu Radio Companion filtering

2020-12-04 Thread Barry Duggan
Hi Gary, Thank you for your correction. We have updated https://wiki.gnuradio.org/index.php/Quadrature_Demod and fixed the math rendering as well :) Also I have added your FM posts to https://wiki.gnuradio.org/index.php/SuggestedReading#GNU_Radio_Specific You may be interested in https://p

Re: Post on Gnu Radio Companion filtering

2020-12-04 Thread Gary Schafer
"When responding to a thread from Discuss Gnuradio, be sure to include it as a CC or 'Reply All'." Yup. When I received the daily digest today, I realized my mistake. My bad. (*waves at everyone*) Thanks, Barry! On 12/4/20 4:27 PM, Barry Duggan wrote: Hi Gary, Thank you for your correction.

Re: how to insert if...else logic between 2 blocks

2020-12-04 Thread james jordan
Hi Fabian, thanks for your quick reply. i think python block is a good choice but how to define the block param as what i want? i only see there is a example param in the block. when i modify the code as below def __init__(self, center_freq=1850e6, fft_size, freq_range): grc can not interpret the

Re: how to insert if...else logic between 2 blocks

2020-12-04 Thread Fabian Schwartau
Hi James, I cannot tell where you got that init function from, but you are passing 3 arguments to it (ignoring self). The first one has a default argument (1850e6), but the following don't. That's not allowed in python. If you want to give a default parameter for the center_freq, put the parameter

Re: how to insert if...else logic between 2 blocks

2020-12-04 Thread Fabian Schwartau
Hi James, three options I can see: 1) Quick& Dirty: Implement both algorithms in parallel and use the Peak Detector block to generate a 0 or 1 depending on your condition. Then invert the condition, multiply the outputs of the two algorithms with the two condition outputs and add them. 2) Dependin

how to insert if...else logic between 2 blocks

2020-12-04 Thread james jordan
Hi ALL, i want to compute process a block's output then pass the result to another block's input. the process is not a fix equation but like this if(output > a)... else... so is there any way to do this without making a new block by myself. can i modify the generated python code to insert this l