Refactor of Get Ports

This commit is contained in:
2026-04-04 00:55:39 +01:00
parent ffe363e777
commit 8716cdd6bd
2 changed files with 2 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ func main () {
deviceSelectorWindow := app.NewWindow("OpenBPS - The Open Source Battery Profiler & Simulator") deviceSelectorWindow := app.NewWindow("OpenBPS - The Open Source Battery Profiler & Simulator")
//Dropdown for USB Port Selection //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) fmt.Println("Selected Port: ",value)
}) })
portSelector.PlaceHolder = "First Should Be an Autodetect" portSelector.PlaceHolder = "First Should Be an Autodetect"

View File

@@ -1,6 +1,6 @@
package serial package serial
func Get_Ports() []string { func GetPorts() []string {
//will eventually hold a list of connected usb devices with matching ID //will eventually hold a list of connected usb devices with matching ID
ports := []string{"/dev/tty0","/dev/tty2","/dev/tty3"} ports := []string{"/dev/tty0","/dev/tty2","/dev/tty3"}