Segmentation stage 1

This commit is contained in:
2026-04-05 14:55:04 +02:00
parent 5241d06e7b
commit fb35d6c3d4
20 changed files with 467 additions and 117 deletions

View File

@@ -0,0 +1,18 @@
# Copyright (C) 2026 Hector van der Aa <hector@h3cx.dev>
# Copyright (C) 2026 Association Exergie <association.exergie@gmail.com>
# SPDX-License-Identifier: GPL-3.0-or-later
import serial.tools.list_ports
def list_serial_ports() -> list[str]:
ports = serial.tools.list_ports.comports()
valid_ports: list[str] = []
for port in ports:
if port.vid is not None and port.pid is not None:
valid_ports.append(port.device)
return valid_ports