Skip to content

Commit

Permalink
Merge pull request analogdevicesinc#249 from analogdevicesinc/fix-cle…
Browse files Browse the repository at this point in the history
…anup

Fix analogdevicesinc#248 buffer destructor error
  • Loading branch information
tfcollins authored Oct 14, 2021
2 parents 0cdd84a + faf157b commit e23b8d5
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 e23b8d5

Please sign in to comment.