discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: Re: [Discuss-gnuradio] How to display mux value?


From: Pawel Koszut
Subject: Re: Re: [Discuss-gnuradio] How to display mux value?
Date: Tue, 22 May 2007 08:16:23 +0200
User-agent: KMail/1.9.5

Hi Steven,

It works fine !
Together with Charles Swiger's suggestions, you helped me with three possible 
approaches :
=========================================
m = usrp.determine_rx_mux_value(self.u, options.rx_subdev_spec)
print "mux1 = %x" %(0x100000000 + m)
print "mux2 = ",hex(0x100000000 + m)
print "mux3 = 0x%08x" % (0xFFFFFFFFL & long(m))
=========================================

Thanks for both of you,

Pawel


On Tuesday 08 May 2007 16:47, you wrote:
> (Sorry for sending this twice, Pawel, I forgot to send to list. Also I
> corrected a minor error I made)
>
> Hi Pawel-
>
> You've probably figured this out by now, but I ran into the same thing
> yesterday. Here's what I did.
>
> in_mux_value = usrp.determine_rx_mux_value(self.usrp_in,
> in_dcard_subdev_spec)
> print "RX mux value: 0x%08x" % (0xFFFFFFFFL & long(in_mux_value))
> self.usrp_in.set_mux(in_mux_value)
>
> The determine_*x_mux_value() method returns a (32 bit) int, but if the MSB
> is set, for example 0xF0F0F0F2, python thinks it's a negative number, which
> screws up the printing. Cast it to a long and mask off the bottom 32 bits.
>
> Hope that helps.
>
> -Steven
>
> On 4/28/07, Pawel Koszut <address@hidden> wrote:
> > Hi all !
> >
> > Who knows how to display mux value ?
> >
> > print "mux =", hex(usrp.determine_rx_mux_value(self.u,
> > options.rx_subdev_spec))
> >
> > displays negative values, for example -0xf0f0f0e
> > How to interpret negative value ?
> > and how to interpret 7 digit hex number istead of 8 digit.
> >
> > regards,
> > Pawel
> >
> >
> > _______________________________________________
> > Discuss-gnuradio mailing list
> > address@hidden
> > http://lists.gnu.org/mailman/listinfo/discuss-gnuradio




reply via email to

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