bugst / go-serial

A cross-platform serial library for go-lang.
BSD 3-Clause "New" or "Revised" License
682 stars 205 forks source link

get invalid port name on Windows(commit 0996f84) #194

Open fcying opened 3 months ago

fcying commented 3 months ago

in the pre commit(f5a4685), use Refresh func get port name Found port: COM1 last commit(0996f84), Found port: \Device\Serial0

func Refresh() []string {
    ports, err := serial.GetPortsList()
    if err != nil {
        log.Fatal(err)
    }
    for _, port := range ports {
        log.Printf("Found port: %v\n", port)
    }
    return ports
}

Is there a way to switch back to the original display?