[Discuss-gnuradio] cross compiling (Swig issue?)

2012-06-25 Thread cjpatton
Hello all, I've tried to build GNU Radio 3.6.0 for an embedded system running OpenWRT. I cross compiled with OpenWRT's toolchain, but used Swig 2.0.4 on the host system. When I try to run a GNU Radio program that requires Python, I get the following error: root@OpenWrt:~# usrp_flex Traceback (m

Re: [Discuss-gnuradio] cross compiling (Swig issue?)

2012-06-25 Thread cjpatton
Hello Almohanad, thanks for your quick reply! Almohanad Fayez-2 wrote: > > Chris, I'm a little confused by "I used SWIG 2.0.4 on the host" I haven't > used OpenWRT but the assumption is that you have a cross compiled swig on > your host which you're linking against and have installed on your em

[Discuss-gnuradio] gr_block::set_history()

2012-09-20 Thread cjpatton
I have a general work function for which I will use GNU Radio's history functionality. In the block's constructor, I call set_history( m ). I cast the input buffer in the standard way: const float *in = (const float *) input_items[0]; My question is wheere in[0] refers to in the buffer. It woul

Re: [Discuss-gnuradio] gr_block::set_history()

2012-09-21 Thread cjpatton
Tom and Kyle, Thanks for your replies. Suppose I want in[0] to refer to the beginning of the new data. Then I could do this: const float *in = (const float *) input_items[history()-1]; So in[noutput_items-1] is the last? Thanks! Chris -- View this message in context: http://gnuradio

Re: [Discuss-gnuradio] gr_block::set_history()

2012-09-21 Thread cjpatton
Hello Tom, Of course, how could I forget? I had to modify your code a bit to get to work, however: const float *in = (const float *) &((const float*)input_items[0])[history()-1]; It just needed a type cast in there. My code works now. The suggestion about gr_quadrature_demod_cf is very helpfu

Re: [Discuss-gnuradio] gr_block::set_history()

2012-09-24 Thread cjpatton
Hello Tom, I have a follow-up question about how history works in gnuradio. Making no assumptions about the input/output ratio of a gr_block, is it safe to assume that noutput_items is the number of new data given to the block? I.e., Does calling 'consume(noutput_items)' consume all the new data