- // Reset the ConnectThread because we're done
- AltosBluetooth.this.notify();
- connect_thread = null;
- if (D) Log.i(TAG, "Completed connect");
- }
- } catch (Exception e) {
- if (D) Log.e(TAG, "Failed to finish connection", e);
- e.printStackTrace();
+ // Configure the newly connected device for telemetry
+ print("~\nE 0\n");
+ set_monitor(false);
+
+ // Let TelemetryService know we're connected
+ handler.obtainMessage(TelemetryService.MSG_CONNECTED).sendToTarget();
+
+ // Notify other waiting threads, now that we're connected
+ AltosBluetooth.this.notifyAll();
+
+ // Reset the ConnectThread because we're done
+ connect_thread = null;
+
+ if (D) Log.d(TAG, "ConnectThread: Connect completed");