Open fredericjs opened 3 months ago
Currently python-seabreeze still has some issues with the OceanHDX models.
If you can produce a reproducible error case that does not require manual intervention, it should be possible to start debugging where the issue occurs. Maybe we just need to flush the usb buffer on system exit.
I don't have a OceanHDX spectrometer myself, but I can help you debug your use case.
Cheers, Andreas 😃
The HDX spectrometers now work via the network interface!
spectrometer and system information
current problem
I have some code to read data from my HDX spectrometer using pyseabreeze backend. The issue I get is when interrupting the program execution and running the program again, I get the following error:
When I run the spectrometer in a separate daemon thread and then interrupt the program execution, I get the following error when restarting the program:
It seems to me that there is unread data in the USB buffer and the next time the program starts, it mistakenly reads that data when trying to read the header. The error occurs only when the program was halted during reading. The issue disappears when unplugging the USB connector and plugging it back in.
steps to reproduce
Use the minimal code example and force terminate the program during the while loop. Afterwards, the spectrometer cannot be correctly connected. Even the OceanView software at this point can't detect the spectrometer.
minimal code example and error (very helpful if available)