pyvisa / pyvisa-py

A pure python PyVISA backend
https://pyvisa-py.readthedocs.io
MIT License
282 stars 120 forks source link

serial: trim COM from serial ports and add it when opening #269

Closed MatthieuDartiailh closed 4 years ago

MatthieuDartiailh commented 4 years ago
MatthieuDartiailh commented 4 years ago

Will fail till https://github.com/pyvisa/pyvisa/pull/545 is merged

MatthieuDartiailh commented 4 years ago

Actually this revealed a more complicated issue. According to the VISA standard we only expect integers after the resource type (i.e. ASRL1::INSTR) and I started enforcing this in PyVISA, but it appears it will break serial on pyvisa-py both on Windows (but there we can easily fix it) and Linux where it is more complicated since the port can look like a path /dev/ttyAMA0.

I need to think a bit about how to fix this issue. The windows patch still makes sense to get a more homogeneous experience, but it won't be sufficient for Linux.

MatthieuDartiailh commented 4 years ago

I went with the option of allowing ResourceInfo board to be None which allows to preserve all previous and past functionality. This should be good to go.

MatthieuDartiailh commented 4 years ago

bors r+

bors[bot] commented 4 years ago

Build succeeded: