discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] question about routing data


From: Przemek Lewandowski
Subject: Re: [Discuss-gnuradio] question about routing data
Date: Sun, 4 Oct 2015 18:19:00 +0200

Kevin, one more small question 

if I want to have for example 3 inputs and 3 outputs, and 2 gui chooser widgets - for choosing input and output. what will change ?

problem is that I dont know when _expression_ "[[chooser == i for i in xrange(3)]]"  is invoked. I tryied to do a function instead of this _expression_ but it was only invoked once.

Greeting


2015-10-04 16:45 GMT+02:00 Przemek Lewandowski <address@hidden>:
Kevin, I am eternally grateful.

thank  you for help, it wasnt so obvious - I mean that _expression_ "[[chooser == i for i in xrange(3)]]" 

2015-10-04 16:35 GMT+02:00 Kevin Reid <address@hidden>:
On Oct 4, 2015, at 6:02, Przemek Lewandowski <address@hidden> wrote:

> Thank you Kevin for reply.
>
> I have created small system with "multiply matrix" block. And it works good, BUT I dont how to change it during runtime :) there is input "set A" - but I dont know how to set it from gui ?? all i know is that input is async

Don't use the message port, just the regular GRC dataflow stuff. That is, you enter for the matrix value a Python _expression_ depending on the GUI block's value, and GRC takes care of updating it when needed.

Here's a simple demo. The QT GUI Chooser block produces a numeric index, and we specify a 1-by-n matrix which will have exactly one nonzero value at that index:

    [[chooser == i for i in xrange(3)]]




--
Kevin Reid                                  <http://switchb.org/kpreid/>





reply via email to

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