Open rajkundu opened 1 year ago
Currently, it takes about 5-10 seconds to initialize an NDI camera on my computer (16" Intel MacBook Pro, macOS 12.5). This is because of the following code, which sequentially probes serial ports for NDI devices: https://github.com/SciKit-Surgery/scikit-surgerynditracker/blob/26bd21b2e01c96df5444a019ae7149e5cf42b44c/sksurgerynditracker/nditracker.py#L57-L64 Therefore, on my computer, serial port 0 (/dev/cu.BLTH) is always unnecessarily probed before serial port 1 (/dev/cu.usbserial-144130, the NDI Camera).
/dev/cu.BLTH
/dev/cu.usbserial-144130
The current best workaround is to set configuration['serial port'] = '/dev/cu.usbserial-144130'. This works fine, but it would be nice to have functionality which probes serial ports simultaneously and returns as soon as any NDI device is found.
configuration['serial port'] = '/dev/cu.usbserial-144130'
Any thoughts on this?
It sounds sensible, I just left a comment on the pull request.
Currently, it takes about 5-10 seconds to initialize an NDI camera on my computer (16" Intel MacBook Pro, macOS 12.5). This is because of the following code, which sequentially probes serial ports for NDI devices: https://github.com/SciKit-Surgery/scikit-surgerynditracker/blob/26bd21b2e01c96df5444a019ae7149e5cf42b44c/sksurgerynditracker/nditracker.py#L57-L64 Therefore, on my computer, serial port 0 (
/dev/cu.BLTH
) is always unnecessarily probed before serial port 1 (/dev/cu.usbserial-144130
, the NDI Camera).The current best workaround is to set
configuration['serial port'] = '/dev/cu.usbserial-144130'
. This works fine, but it would be nice to have functionality which probes serial ports simultaneously and returns as soon as any NDI device is found.