|
From: | George Edwards |
Subject: | Problem with OOT Interpolator module in Python |
Date: | Thu, 21 Jan 2021 16:03:36 -0600 |
def __init__(self, my_start = True):
gr.interp_block.__init__(self,
name="my_interp_py_cc",
in_sig=[np.complex64, np.complex64, np.complex64],
out_sig=[np.complex64 ], interp = 2)
self.my_start = my_start
self.v1 = v1 = np.zeros(8)+np.zeros(8)*1j
self.v2 = v2 = 1.0+1.0*1j
def work(self, input_items, output_items):
in0 = input_items[0]
in1 = input_items[1]
in2 = input_items[2]
out = output_items[0]
global v1, v2
if self.my_start == True:
v1 = self.v1
v2 = self.v2
self.my_start = False
self.v1 = v1
self.v2 = v2
v2 = 1.0+1.0*1j
out[:] = np.array([v2,v2])
return len(output_items[0])
[Prev in Thread] | Current Thread | [Next in Thread] |