You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
log.Println(fmt.Sprintf("Did not find an open port in the serial port list. We are going to artificially push it onto the list. port:%v", port.portConf.Name))
488
-
varosspOsSerialPort
489
-
ossp.Name=port.portConf.Name
490
-
ossp.FriendlyName=port.portConf.Name
491
-
list=append([]OsSerialPort{ossp}, list...)
492
-
}
493
-
}
494
-
}
475
+
// if network {
476
+
// for port := range sh.ports {
477
+
478
+
// isFound := false
479
+
// for _, item := range list {
480
+
// if strings.ToLower(port.portConf.Name) == strings.ToLower(item.Name) {
481
+
// isFound = true
482
+
// }
483
+
// }
484
+
485
+
// if !isFound {
486
+
// // artificially push to front of port list
487
+
// log.Println(fmt.Sprintf("Did not find an open port in the serial port list. We are going to artificially push it onto the list. port:%v", port.portConf.Name))
488
+
// var ossp OsSerialPort
489
+
// ossp.Name = port.portConf.Name
490
+
// ossp.FriendlyName = port.portConf.Name
491
+
// list = append([]OsSerialPort{ossp}, list...)
492
+
// }
493
+
// }
494
+
// }
495
495
496
496
// we have a full clean list of ports now. iterate thru them
497
497
// to append the open/close state, baud rates, etc to make
0 commit comments