Skip to content

Commit 824e16d

Browse files
authored
Merge pull request #33 from arduino/add_0x_prefix
Add '0x..' prefix to usb vid and pid
2 parents d6109e1 + a6d1d66 commit 824e16d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ type DFUInterface struct {
154154
// AsDiscoveryPort converts this DFUInterface into a discovery.Port
155155
func (i *DFUInterface) AsDiscoveryPort() *discovery.Port {
156156
props := properties.NewMap()
157-
props.Set("vid", fmt.Sprintf("%04X", i.VID))
158-
props.Set("pid", fmt.Sprintf("%04X", i.PID))
157+
props.Set("vid", fmt.Sprintf("0x%04X", i.VID))
158+
props.Set("pid", fmt.Sprintf("0x%04X", i.PID))
159159
if i.SerialNumber != "" {
160160
props.Set("serial", i.SerialNumber)
161161
}

0 commit comments

Comments
 (0)