Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions pkg/board/board.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,14 @@ func identifyUnoQ(p *rpc.DetectedPort) {
}

var onBoard = sync.OnceValue(func() bool {
var boardNames = []string{"UNO Q\n", "Imola\n", "Inc. Robotics RB1\n"}
buf, err := os.ReadFile("/sys/class/dmi/id/product_name")
if err == nil && slices.Contains(boardNames, string(buf)) {
return true
var boardNames = []string{
"Imola", // code name for UNO Q
}
if buf, err := os.ReadFile("/sys/class/dmi/id/product_name"); err == nil {
name := string(bytes.TrimSpace(buf))
if slices.Contains(boardNames, name) {
return true
}
}
return false
})()
Expand Down