diff options
Diffstat (limited to 'gnuradio-runtime/python/gnuradio/ctrlport/RPCConnectionThrift.py')
-rw-r--r-- | gnuradio-runtime/python/gnuradio/ctrlport/RPCConnectionThrift.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/RPCConnectionThrift.py b/gnuradio-runtime/python/gnuradio/ctrlport/RPCConnectionThrift.py index f662a66c90..9a2a302af5 100644 --- a/gnuradio-runtime/python/gnuradio/ctrlport/RPCConnectionThrift.py +++ b/gnuradio-runtime/python/gnuradio/ctrlport/RPCConnectionThrift.py @@ -39,6 +39,7 @@ class ThriftRadioClient: self.transport.open() def __del__(self): + self.radio.shutdown() self.transport.close() def getRadio(self, host, port): @@ -154,6 +155,13 @@ class RPCConnectionThrift(RPCConnection.RPCConnection): for key, knob in self.thriftclient.radio.getKnobs(*args).iteritems(): #print("key:", key, "value:", knob, "type:", knob.type) result[key] = self.unpackKnob(key, knob) + + # If complex, convert to Python complex + # FIXME: better list iterator way to handle this? + if(knob.type == self.BaseTypes.C32VECTOR): + for i in xrange(len(result[key].value)): + result[key].value[i] = complex(result[key].value[i].re, + result[key].value[i].im) return result def getKnobsRaw(self, *args): |