# Problem with qt constellation block

**URL:** <https://www.ruby-forum.com/t/problem-with-qt-constellation-block/241224>\
**Category:** GNU Radio\
**Created:** [May 19, 2014, 8:47pm UTC](https://www.ruby-forum.com/t/problem-with-qt-constellation-block/241224 "2014-05-19T20:47:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [May 19, 2014, 8:47pm UTC](https://www.ruby-forum.com/t/problem-with-qt-constellation-block/241224/1 "2014-05-19T20:47:44Z")

</div>

Hi All,  
I’m trying to built a system with several digital modulations. First, I  
should be able to print constellations by using qt constellation block.  
I  
started by creating a simple flowgraph with two modulations. That is my  
flowgraph [http://gnuradio.4.n7.nabble.com/file/n48338/qt\_applic.jpeg](http://gnuradio.4.n7.nabble.com/file/n48338/qt_applic.jpeg)  
.  
I take the top\_block.py file and I tried to modify it by adding new  
function  
to switch the null sink and the constellation block by using  
disconnect()  
and connect() function. finally in the main function i added lock() and  
unlock() functions to reconfigure the application.  
the problem is when i run the modified python file the constellation  
graphic  
appear but it conserves the first constellation representation even the  
switching is happened .  
what do you think about that?  
should I write something to rerun the qt application?  
I appreciate your help

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/problem-with-qt-constellation-block-tp48338.html](http://gnuradio.4.n7.nabble.com/problem-with-qt-constellation-block-tp48338.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![zielalaoui](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/439d5e/32.png) [@zielalaoui](https://www.ruby-forum.com/u/zielalaoui)\
**Post date:** [May 20, 2014, 5:59pm UTC](https://www.ruby-forum.com/t/problem-with-qt-constellation-block/241224/2 "2014-05-20T17:59:18Z")

</div>

On Mon, May 19, 2014 at 2:46 PM, zielalaoui [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> the problem is when i run the modified python file the constellation  
> graphic  
> appear but it conserves the first constellation representation even the  
> switching is happened .  
> what do you think about that?  
> should I write something to rerun the qt application?  
> I appreciate your help

Yes, the QT sinks keep some internal buffers, which are preserved during  
a  
lock/unlock reset event.

You could look to overload the start() function (add a bool  
cosnt\_sink\_c\_impl::start() function) that calls just calls \_reset() and  
returns block::start(). In the extreme, you could cal memset on all  
d\_residbufs\_real and d\_residbufs\_imag to rest them to 0, but I think  
just  
calling \_reset and having the pointers appropriately update should be  
enough.

Tom
