mirror of
https://github.com/uhi22/pyPLC.git
synced 2024-11-20 01:13:58 +00:00
fix: ignore ttyAMA0 serial interface
This commit is contained in:
parent
52caa7aa22
commit
0a2bddae9f
1 changed files with 6 additions and 3 deletions
|
@ -15,6 +15,9 @@ class hardwareInterface():
|
||||||
ports = []
|
ports = []
|
||||||
self.addToTrace('Available serial ports:')
|
self.addToTrace('Available serial ports:')
|
||||||
for n, (port, desc, hwid) in enumerate(sorted(comports()), 1):
|
for n, (port, desc, hwid) in enumerate(sorted(comports()), 1):
|
||||||
|
if (port=="/dev/ttyAMA0"):
|
||||||
|
self.addToTrace("ignoring /dev/ttyAMA0, because this is not an USB serial port")
|
||||||
|
else:
|
||||||
self.addToTrace('{:2}: {:20} {!r}'.format(n, port, desc))
|
self.addToTrace('{:2}: {:20} {!r}'.format(n, port, desc))
|
||||||
ports.append(port)
|
ports.append(port)
|
||||||
if (len(ports)<1):
|
if (len(ports)<1):
|
||||||
|
|
Loading…
Reference in a new issue