We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c500df commit 8064b50Copy full SHA for 8064b50
pkg/board/board.go
@@ -82,10 +82,14 @@ func identifyUnoQ(p *rpc.DetectedPort) {
82
}
83
84
var onBoard = sync.OnceValue(func() bool {
85
- var boardNames = []string{"Imola\n", "Inc. Robotics RB1\n"}
86
- buf, err := os.ReadFile("/sys/class/dmi/id/product_name")
87
- if err == nil && slices.Contains(boardNames, string(buf)) {
88
- return true
+ var boardNames = []string{
+ "Imola", // code name for UNO Q
+ }
+ if buf, err := os.ReadFile("/sys/class/dmi/id/product_name"); err == nil {
89
+ name := string(bytes.TrimSpace(buf))
90
+ if slices.Contains(boardNames, name) {
91
+ return true
92
93
94
return false
95
})()
0 commit comments