Bump java library versions
[fw/altos] / altosdroid / src / org / altusmetrum / AltosDroid / AltosBluetooth.java
index 484efaf833a6ee4ad2e41ddc13e771d60473e82f..3740f55d7f83a44d49cf7eabe08a150a4222fef6 100644 (file)
@@ -31,7 +31,7 @@ import android.os.Handler;
 //import android.os.Message;
 import android.util.Log;
 
-import org.altusmetrum.altoslib_5.*;
+import org.altusmetrum.altoslib_6.*;
 
 public class AltosBluetooth extends AltosLink {
 
@@ -52,6 +52,7 @@ public class AltosBluetooth extends AltosLink {
 
        // Constructor
        public AltosBluetooth(BluetoothDevice in_device, Handler in_handler) {
+//             set_debug(D);
                adapter = BluetoothAdapter.getDefaultAdapter();
                device = in_device;
                handler = in_handler;
@@ -136,9 +137,27 @@ public class AltosBluetooth extends AltosLink {
                }
        }
 
+       public double frequency() {
+               return frequency;
+       }
+
+       public int telemetry_rate() {
+               return telemetry_rate;
+       }
+
+       public void save_frequency() {
+               AltosPreferences.set_frequency(0, frequency);
+       }
+
+       public void save_telemetry_rate() {
+               AltosPreferences.set_telemetry_rate(0, telemetry_rate);
+       }
+
        private synchronized void wait_connected() throws InterruptedException, IOException {
                if (input == null) {
+                       if (D) Log.d(TAG, "wait_connected...");
                        wait();
+                       if (D) Log.d(TAG, "wait_connected done");
                        if (input == null) throw new IOException();
                }
        }