summaryrefslogtreecommitdiff
path: root/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-04-13 11:39:14 -0700
committerKeith Packard <keithp@keithp.com>2013-04-13 11:39:14 -0700
commite4b6fc3238ad9911fd40ef25accf82a401cb190f (patch)
treebcabafa1f7c2657cd0d8883ad0ef069206268293 /altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java
parent2f7015afcca7c6042365d2124d3a5b7219e8e588 (diff)
altosdroid: Show our position in the map tab. Squeeze to fit phones
Shrink everything to fit on phones, then add phone location to the map tab Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java')
-rw-r--r--altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java b/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java
index 0ddfdfc3..f1304a95 100644
--- a/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java
+++ b/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java
@@ -245,6 +245,9 @@ public class TelemetryService extends Service {
}
private void startAltosBluetooth() {
+ if (device == null) {
+ return;
+ }
if (mAltosBluetooth == null) {
if (D) Log.d(TAG, String.format("startAltosBluetooth(): Connecting to %s (%s)", device.getName(), device.getAddress()));
mAltosBluetooth = new AltosBluetooth(device, mHandler);
@@ -274,6 +277,8 @@ public class TelemetryService extends Service {
private void connected() {
try {
+ if (mAltosBluetooth == null)
+ throw new InterruptedException("no bluetooth");
mConfigData = mAltosBluetooth.config_data();
} catch (InterruptedException e) {
} catch (TimeoutException e) {