diff options
Diffstat (limited to 'examples/java/AsyncTinyB.java')
-rw-r--r-- | examples/java/AsyncTinyB.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/java/AsyncTinyB.java b/examples/java/AsyncTinyB.java index f70b890a..20313b33 100644 --- a/examples/java/AsyncTinyB.java +++ b/examples/java/AsyncTinyB.java @@ -6,6 +6,7 @@ import org.tinyb.BluetoothFactory; import org.tinyb.BluetoothGattCharacteristic; import org.tinyb.BluetoothGattService; import org.tinyb.BluetoothManager; +import org.tinyb.HCIStatusCode; import java.lang.reflect.InvocationTargetException; import java.util.concurrent.TimeUnit; @@ -87,7 +88,7 @@ public class AsyncTinyB { System.out.print("Found device: "); printDevice(sensor); - if (sensor.connect()) + if ( HCIStatusCode.SUCCESS == sensor.connect() ) System.out.println("Sensor with the provided address connected"); else { System.out.println("Could not connect device."); |