altosdroid: Add debugging statements to AltosBluetooth
authorMike Beattie <mike@ethernal.org>
Sun, 26 Aug 2012 03:21:57 +0000 (15:21 +1200)
committerMike Beattie <mike@ethernal.org>
Sun, 26 Aug 2012 03:21:57 +0000 (15:21 +1200)
Signed-off-by: Mike Beattie <mike@ethernal.org>
altosdroid/src/org/altusmetrum/AltosDroid/AltosBluetooth.java

index 4c3f979d7c386df38e3260f864ba0bf23124b64c..db63b342cbb8803e8adcd3181041f219c0f7fd88 100644 (file)
@@ -127,13 +127,16 @@ public class AltosBluetooth extends AltosLink {
        }
 
        private void connection_failed() {
+               if (D) Log.i(TAG, "Bluetooth Connection failed!");
        }
        
        public void print(String data) {
                byte[] bytes = data.getBytes();
                try {
+                       if (D) Log.i(TAG, "Entering print();");
                        wait_connected();
                        output.write(bytes);
+                       if (D) Log.i(TAG, "Writing bytes: '" + data + "'");
                } catch (IOException e) {
                        connection_failed();
                } catch (InterruptedException e) {