From 1cb1d64ebeaa9b87026fde26a39d00ff94e97abc Mon Sep 17 00:00:00 2001 From: Eduardo Silva Date: Tue, 26 May 2026 11:38:48 +0100 Subject: [PATCH] use a cross-platform lib to fetch the available ports for probing --- cdashdisplay/connect.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cdashdisplay/connect.go b/cdashdisplay/connect.go index b9586cc..38bfece 100644 --- a/cdashdisplay/connect.go +++ b/cdashdisplay/connect.go @@ -4,19 +4,19 @@ import ( "esdi/peripheral/communication" "esdi/peripheral/communication/packets" "fmt" - "path/filepath" "time" "github.com/tarm/serial" + portp "go.bug.st/serial" ) func listPorts() ([]string, error) { - ttyUSBs, err := filepath.Glob("/dev/ttyUSB*") + ports, err := portp.GetPortsList() if err != nil { return []string{}, err } - return ttyUSBs, nil + return ports, nil } func probe(WT *communication.WalkieTalkie) error {