Skip to content

Commit

Permalink
fix compile, build tags
Browse files Browse the repository at this point in the history
  • Loading branch information
riking committed Jul 3, 2018
1 parent b007fa2 commit 35f517b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions prog4/bluez/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func (a *JoyconAPI) connectAllDevices() {

ch := make(chan *dbus.Call, len(deviceList))
for _, path := range deviceList {
a.busConn.Object(BlueZBusName, path).Go("org.bluez.Device1.ConnectProfile", 0, ch, HIDProfileUUIDStrU)
a.busConn.Object(BlueZBusName, path).Go("org.bluez.Device1.ConnectProfile", 0, ch, HIDProfileUUIDStr)
}
go func() {
for _ = range deviceList {
Expand All @@ -162,7 +162,7 @@ func (a *JoyconAPI) connectAllDevices() {
// Same as above, but only one device. Use 'go' when calling.
func (a *JoyconAPI) tryConnectDevice(path dbus.ObjectPath) {
fmt.Println("[bluez] attempting connect to", path)
call := a.busConn.Object(BlueZBusName, path).Call("org.bluez.Device1.ConnectProfile", 0, HIDProfileUUIDStrU)
call := a.busConn.Object(BlueZBusName, path).Call("org.bluez.Device1.ConnectProfile", 0, HIDProfileUUIDStr)
if call.Err != nil {
fmt.Fprintf(os.Stderr,
"\r[bluez] [INFO] failed to connect bluetooth device %s: %v\n",
Expand Down Expand Up @@ -674,7 +674,7 @@ func (a *JoyconAPI) getDeviceInfo(path dbus.ObjectPath) (btDeviceInfo, error) {
}
*/
for _, v := range uuids {
if v == HIDProfileUUIDStrL || v == HIDProfileUUIDStrU {
if v == HIDProfileUUIDStr {
newInfo.IsInputDevice = true
break
}
Expand Down
2 changes: 1 addition & 1 deletion prog4/jcdriver/bluetooth_bluez.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build linux,!nobluez,never
//+build linux,!nobluez,bluez

package main

Expand Down
2 changes: 1 addition & 1 deletion prog4/jcdriver/bluetooth_generic.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build !linux linux
//+build !linux linux,!bluez

package main

Expand Down

0 comments on commit 35f517b

Please sign in to comment.