Skip to content
Open
Changes from 1 commit
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
5 changes: 2 additions & 3 deletions pkg/board/board.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,9 @@ func FromFQBN(ctx context.Context, fqbn string) ([]Board, error) {
if len(port.GetMatchingBoards()) > 0 {
boardName = port.GetMatchingBoards()[0].GetName()
}

serial := strings.ToLower(port.GetPort().GetHardwareId()) // in windows this is uppercase.
switch port.GetPort().GetProtocol() {
case SerialProtocol:
serial := strings.ToLower(port.GetPort().GetHardwareId()) // in windows this is uppercase.

// TODO: we should store the board custom name in the product id so we can get it from the discovery service.
var customName string
if conn, err := adb.FromSerial(serial, ""); err == nil {
Expand Down Expand Up @@ -215,6 +213,7 @@ func FromFQBN(ctx context.Context, fqbn string) ([]Board, error) {
boards = append(boards, Board{
Protocol: NetworkProtocol,
Address: port.GetPort().GetAddress(),
Serial: serial,
BoardName: boardName,
CustomName: customName,
})
Expand Down