|
From: | Yeo Jin Kuang Alvin (IA) |
Subject: | [Discuss-gnuradio] Variable in Delay block |
Date: | Mon, 28 May 2018 08:46:42 +0000 |
Hi all, Is it possible for me to create a QT GUI Range and put the ID in the Delay of the delay block? I tried and the graph doesn’t change. I also tried generating the python file and created a QT GUI Entry, use the ID in the QT GUI Entry (delay_amt) and edited the code def set_delay_amt(self, delay_amt): c = 0 for a in range(0,5000): for b in range(0,6000): if b == 5999: c = c + 1 t = c*0.001 delay_amt = int(0.04*((3500*(t-2.5))**2 + 227322562.9)**(1/2.0) self.delay_amt = delay_amt Qt.QMetaObject.invokeMethod(self._delay_amt_line_edit, “setText”, Qt.Q_ARG(“QString”, str(self.delay_amt))) Self.blocks_delay_0.set_dly(self.delay_amt) I have tested the values in python shell and I’ve gotten what I wanted. Just that when I run it, there doesn’t seems to be a delay changing with time. I want to control the delay overtime, to simulate the time take for it to transmit and
reflect back an object when the object is moving for 5 secs. Does this method works or is there a better way of doing this and how? Thank you in advanced! |
[Prev in Thread] | Current Thread | [Next in Thread] |