summaryrefslogtreecommitdiffstats
path: root/examples/java/HelloTinyB.java
diff options
context:
space:
mode:
Diffstat (limited to 'examples/java/HelloTinyB.java')
-rw-r--r--examples/java/HelloTinyB.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/java/HelloTinyB.java b/examples/java/HelloTinyB.java
index 77435de6..b6709b7f 100644
--- a/examples/java/HelloTinyB.java
+++ b/examples/java/HelloTinyB.java
@@ -11,6 +11,7 @@ import org.tinyb.BluetoothFactory;
import org.tinyb.BluetoothGattCharacteristic;
import org.tinyb.BluetoothGattService;
import org.tinyb.BluetoothManager;
+import org.tinyb.HCIStatusCode;
public class HelloTinyB {
static boolean running = true;
@@ -149,7 +150,7 @@ public class HelloTinyB {
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.");