projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosdroid: Rename Connect message, add connected message
[fw/altos]
/
altosdroid
/
src
/
org
/
altusmetrum
/
AltosDroid
/
TelemetryService.java
diff --git
a/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java
b/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java
index 60500a2c44f813e4ff32273aecc3bcbcff4b833e..cf7ae6da452a312dd095d7810ca052b2877db7a8 100644
(file)
--- a/
altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java
+++ b/
altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java
@@
-47,7
+47,8
@@
public class TelemetryService extends Service {
static final int MSG_REGISTER_CLIENT = 1;
static final int MSG_UNREGISTER_CLIENT = 2;
static final int MSG_REGISTER_CLIENT = 1;
static final int MSG_UNREGISTER_CLIENT = 2;
- static final int MSG_CONNECT_TELEBT = 3;
+ static final int MSG_CONNECT = 3;
+ static final int MSG_CONNECTED = 4;
public static final int STATE_NONE = 0;
public static final int STATE_READY = 1;
public static final int STATE_NONE = 0;
public static final int STATE_READY = 1;
@@
-85,10
+86,13
@@
public class TelemetryService extends Service {
s.mClients.remove(msg.replyTo);
if (D) Log.d(TAG, "Client unbound from service");
break;
s.mClients.remove(msg.replyTo);
if (D) Log.d(TAG, "Client unbound from service");
break;
- case MSG_CONNECT
_TELEBT
:
+ case MSG_CONNECT:
if (D) Log.d(TAG, "Connect command received");
s.startAltosBluetooth((BluetoothDevice) msg.obj);
break;
if (D) Log.d(TAG, "Connect command received");
s.startAltosBluetooth((BluetoothDevice) msg.obj);
break;
+ case MSG_CONNECTED:
+ if (D) Log.d(TAG, "Connected to device");
+ break;
default:
super.handleMessage(msg);
}
default:
super.handleMessage(msg);
}
@@
-112,6
+116,8
@@
public class TelemetryService extends Service {
public void onCreate() {
// Create a reference to the NotificationManager so that we can update our notifcation text later
//mNM = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
public void onCreate() {
// Create a reference to the NotificationManager so that we can update our notifcation text later
//mNM = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
+
+ telem = new LinkedBlockingQueue<AltosLine>();
}
@Override
}
@Override