The file I'm trying to compile is qam_corr_demod.py.
I have file directory similar to gr-how-to-square and the makefiles are mostly copies of the makfiles in this example, with modifications.
I have made a block, qam.demodulate_cf, which I would like to use together with two signal sources in qam_corr_demod.py. The block itself (qam.demodulate_cf) works fine, but im not able to compile the qam_corr_demod.py and make it available in my qam module. What are the changes I should do to the makefiles to make this work?
I do not get the first error I reported anymore.
thanks for any help
erlend
2006/11/11, Eric Blossom <[EMAIL PROTECTED]>:
On Sat, Nov 11, 2006 at 12:43:01PM +0100, Erlend Barstad Strand wrote:
> Hi
>
> Im trying to implement a hier_block, but when do a "sudo make install" I get
> the following error:
> "
> Byte-compiling python modules...
> qam_corr_demod.py File
> "/usr/local/lib/python2.4/site-packages/python/qam_corr_demod.py", line 28
> gr.hier_block.__init__(self, fg, self.qam_corr , self.qam_corr)
> ^
> SyntaxError: invalid syntax
> "
>
> does anyone know why this happend?
>
> best regards
> erlend
Erlend, that's not much of a hint. It is a file that you wrote, right?
Eric
import math
from gnuradio import gr
import qam
class qam_corr_demod(gr.hier_block):
def __init__(self, fg, fs, fc, amplitude, decim):
self.sampling_freq = int(fs)
self.carrier_freq = int(fc)
self.amplitude = int(amplitude)
self.decimation = int(decim)
self.carrier_inphase = gr.sig_source_c(sampling_freq, gr.GR_COS_WAVE, carrier_freq, amplitude)
self.carrier_quadrature = gr.sig_source_c(sampling_freq, gr.GR_SIN_WAVE, carrier_freq, amplitude)
self.qam_corr = qam.demodulate_cf(decimation)
self.kludge_out = gr.kludge_copy()
# wire the block together
fg.connect((self.qam_corr,0), (self.kludge_out,0))
fg.connect((self.qam_corr,1), (self.kludge_out,1))
fg.connect(self.carrier_inphase, (self.qam_corr,1))
fg.connect((self.carrier_quadrature, (self.qam_corr,2))
gr.hier_block.__init__(self, fg, self.qam_corr , self.kludge_out)
_______________________________________________ Discuss-gnuradio mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
