Refactor of Get Ports
This commit is contained in:
@@ -14,7 +14,7 @@ func main () {
|
||||
deviceSelectorWindow := app.NewWindow("OpenBPS - The Open Source Battery Profiler & Simulator")
|
||||
|
||||
//Dropdown for USB Port Selection
|
||||
portSelector :=widget.NewSelect(serial.Get_Ports(), func(value string) {
|
||||
portSelector :=widget.NewSelect(serial.GetPorts(), func(value string) {
|
||||
fmt.Println("Selected Port: ",value)
|
||||
})
|
||||
portSelector.PlaceHolder = "First Should Be an Autodetect"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package serial
|
||||
|
||||
func Get_Ports() []string {
|
||||
func GetPorts() []string {
|
||||
|
||||
//will eventually hold a list of connected usb devices with matching ID
|
||||
ports := []string{"/dev/tty0","/dev/tty2","/dev/tty3"}
|
||||
|
||||
Reference in New Issue
Block a user