// Constructor
public AltosBluetooth(BluetoothDevice in_device, Handler in_handler) {
+// set_debug(D);
adapter = BluetoothAdapter.getDefaultAdapter();
device = in_device;
handler = in_handler;
}
}
+ 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();
}
}