Remove COM port listing function from main script
This commit is contained in:
parent
775ab55af9
commit
d6d5cc587f
12
main.py
12
main.py
@ -3,18 +3,6 @@ import serial.tools.list_ports
|
||||
import threading
|
||||
import time
|
||||
|
||||
def list_com_ports():
|
||||
"""Вывод списка доступных COM-портов"""
|
||||
ports = serial.tools.list_ports.comports()
|
||||
if not ports:
|
||||
print("COM-порты не обнаружены")
|
||||
return []
|
||||
|
||||
print("\nДоступные COM-порты:")
|
||||
for index, port in enumerate(ports):
|
||||
print(f"{index + 1}. {port.device}")
|
||||
return ports
|
||||
|
||||
def read_com_port(ser):
|
||||
"""Функция для чтения данных из COM-порта"""
|
||||
while True:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user