Signed-off-by: Mike Beattie <mike@ethernal.org>
}
private void startAltosBluetooth(BluetoothDevice d) {
}
private void startAltosBluetooth(BluetoothDevice d) {
+ if (mAltosBluetooth == null) {
if (D) Log.i(TAG, "Connecting to " + d.getName());
mAltosBluetooth = new AltosBluetooth(d, mHandler);
setState(STATE_CONNECTING);
if (D) Log.i(TAG, "Connecting to " + d.getName());
mAltosBluetooth = new AltosBluetooth(d, mHandler);
setState(STATE_CONNECTING);
+ } else {
+ stopAltosBluetooth();
+ mHandler.sendMessageDelayed(Message.obtain(null, MSG_CONNECT, d), 1000);
+ }
}
private synchronized void setState(int s) {
}
private synchronized void setState(int s) {