Skip to content

Commit

Permalink
Fix analogdevicesinc#248 buffer destructor error
Browse files Browse the repository at this point in the history
Signed-off-by: Travis F. Collins <[email protected]>
  • Loading branch information
tfcollins committed Oct 14, 2021
1 parent 0cdd84a commit faf157b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions adi/rx_tx.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ def rx_destroy_buffer(self):

def __del__(self):
self.__rxbuf = []
if hasattr("self", "_rxadc") and self._rxadc:
for m in self._rx_channel_names:
v = self._rxadc.find_channel(m)
v.enabled = False
self._rxadc = []

def _rx_init_channels(self):
Expand Down Expand Up @@ -299,6 +303,11 @@ def __init__(self, tx_cyclic_buffer=False):
dds.__init__(self)

def __del__(self):
self.__txbuf = []
if hasattr("self", "_txdac") and self._txdac:
for m in self._tx_channel_names:
v = self._txdac.find_channel(m)
v.enabled = False
self._txdac = []

@property
Expand Down

0 comments on commit faf157b

Please sign in to comment.