X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosSerial.java;h=5768ba710fb13f4b9ac731de677defbeab4e828a;hb=55747ce210d7d80d5b4fdaaf9dc7ee0f7bc8b0a3;hp=54cdcba7643b52b22524a2a175267d3a2dc43cfb;hpb=5270a0f1416baef5fde08547c6c98d97f973ae95;p=fw%2Faltos diff --git a/altosui/AltosSerial.java b/altosui/AltosSerial.java index 54cdcba7..5768ba71 100644 --- a/altosui/AltosSerial.java +++ b/altosui/AltosSerial.java @@ -264,7 +264,6 @@ public class AltosSerial extends AltosLink implements Runnable { flush_output(); } -<<<<<<< HEAD private int telemetry_len() { return Altos.telemetry_len(telemetry); } @@ -318,76 +317,6 @@ public class AltosSerial extends AltosLink implements Runnable { set_channel(AltosConvert.radio_frequency_to_channel(frequency)); } - public void set_radio_frequency(double in_frequency) throws InterruptedException, TimeoutException { - frequency = in_frequency; - if (frequency == 0.0) - frequency = AltosPreferences.frequency(device.getSerial()); - config_data(); - set_radio_frequency(frequency, - config_data.radio_frequency != 0, - config_data.radio_setting != 0, - config_data.radio_calibration); - } - - public void set_telemetry(int in_telemetry) { - telemetry = in_telemetry; - if (altos != null) { - if (monitor_mode) - printf("m 0\nm %x\n", telemetry_len()); - flush_output(); - } - } - - void set_monitor(boolean monitor) { - monitor_mode = monitor; - if (altos != null) { - if (monitor) - printf("m %x\n", telemetry_len()); - else - printf("m 0\n"); - flush_output(); - } - } - - public void set_callsign(String callsign) { - if (altos != null) { - printf ("c c %s\n", callsign); - flush_output(); - } - } - - public AltosConfigData config_data() throws InterruptedException, TimeoutException { - if (config_data == null) - config_data = new AltosConfigData(this); - return config_data; - } - - public void start_remote() throws TimeoutException, InterruptedException { - if (debug) - System.out.printf("start remote %7.3f\n", frequency); - if (frequency == 0.0) - frequency = AltosUIPreferences.frequency(device.getSerial()); - set_radio_frequency(frequency); - set_callsign(AltosUIPreferences.callsign()); - printf("p\nE 0\n"); - flush_input(); - remote = true; - } - - public void stop_remote() throws InterruptedException { - if (debug) - System.out.printf("stop remote\n"); - try { - flush_input(); - } finally { - printf ("~\n"); - flush_output(); - } - remote = false; - } - -======= ->>>>>>> bc5e669... altosui: Pull most of AltosSerial into AltosLink public void set_frame(Frame in_frame) { frame = in_frame; }