Closed nsbruce closed 6 years ago
These latest commits can be included too @cjam
I simplified as you suggested. I just got rid of destroyed_pans altogether. I was being overly verbose to debug.
When I replaced the whole segment with:
print("flex::WaitForPanadaptersSync")
existing_pans = FlexApi.radio.WaitForPanadaptersSync(2000, 1000)
print("Number of active panadapters: {0}".format(
len(existing_pans)))
for p in existing_pans:
p.Close(True)
I get the following failure. It seems to be something pythonnet related (see pythonnet/pythonnet/#226)
flex::WaitForPanadaptersSync
handler caught exception: No method matches given arguments
Traceback (most recent call last):
File "/home/nsbruce/pybombs-prefix/GR-for-FlexRadio/lib/python2.7/dist-packages/gnuradio/gr/gateway.py", line 55, in eval
try: self._callback()
File "/home/nsbruce/pybombs-prefix/GR-for-FlexRadio/lib/python2.7/dist-packages/gnuradio/gr/gateway.py", line 170, in __gr_block_handle
self.__message.start_args_return_value = self.start()
File "/home/nsbruce/pybombs-prefix/GR-for-FlexRadio/lib/python2.7/dist-packages/flex/FlexSource.py", line 154, in start
self.radio = FlexApi().getRadio()
File "/home/nsbruce/pybombs-prefix/GR-for-FlexRadio/lib/python2.7/dist-packages/flex/flex.py", line 85, in getRadio
self.__initRadio()
File "/home/nsbruce/pybombs-prefix/GR-for-FlexRadio/lib/python2.7/dist-packages/flex/flex.py", line 77, in __initRadio
existing_pans = FlexApi.radio.WaitForPanadaptersSync(2000, 1000)
TypeError: No method matches given arguments
thread[thread-per-block[0]: <block source (3)>]: caught unrecognized exception
Okay I think that does it @cjam
Nick, About the error that your getting. Can you double check what your FlexLibMono radio.WaitForPanadaptersSync looks like. I just want to make sure that your branch has those latest updates.
@cjam Yea everything is up to date. I could just hard set the delay longer in Radio.cs but that feels like a huge cop-out. I wonder if the pythonnet error is stopping something from loading those changes though? I'll fiddle on Monday. We can consider it a future finicky enhancement.
It turns out #16 was created without understanding the problem. Panadapters were not being destroyed. In order to free up the flex for multiple pan support the included fixes DOES destroy all pans on the flex.