Skip to content

Commit

Permalink
Ports -> get_identification defined for COM ports
Browse files Browse the repository at this point in the history
  • Loading branch information
afischer-sweepme committed Sep 6, 2024
1 parent 2f184d0 commit 9fe4fb6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/pysweepme/Ports.py
Original file line number Diff line number Diff line change
Expand Up @@ -1169,6 +1169,18 @@ def readline(self):

return bytes(line[:-leneol]), eol_found

def get_identification(self) -> str:

ports = serial.tools.list_ports.comports()

port_info = "No info available"
for port in ports:
if port.device == self.port_ID:
port_info = port.hwid
break

return port_info


class PrologixGPIBcontroller:

Expand Down

0 comments on commit 9fe4fb6

Please sign in to comment.