X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altoslib%2FAltosConfigData.java;h=fc1f2442ebfa04fd66074a096449eda21022fdc3;hb=b97a125a9f8bd9619833647a9b6aa6329103e136;hp=fd38635cc0cd25c1e7e1560c5741e53ac8bafe09;hpb=935f769fee351545622e223a283fca64608ca410;p=fw%2Faltos diff --git a/altoslib/AltosConfigData.java b/altoslib/AltosConfigData.java index fd38635c..fc1f2442 100644 --- a/altoslib/AltosConfigData.java +++ b/altoslib/AltosConfigData.java @@ -386,6 +386,10 @@ public class AltosConfigData implements Iterable { return radio_frequency >= 0 || radio_setting >= 0 || radio_channel >= 0; } + public boolean has_telemetry_rate() { + return telemetry_rate >= 0; + } + public void set_frequency(double freq) { int frequency = radio_frequency; int setting = radio_setting; @@ -425,6 +429,8 @@ public class AltosConfigData implements Iterable { return false; if (product.startsWith("TeleMetrum-v2")) return false; + if (product.startsWith("EasyMega")) + return false; return true; } @@ -558,20 +564,39 @@ public class AltosConfigData implements Iterable { radio_calibration); /* When remote, reset the dongle frequency at the same time */ if (remote) { + link.flush_output(); link.stop_remote(); link.set_radio_frequency(frequency); + link.flush_output(); link.start_remote(); } } - if (callsign != null) + if (telemetry_rate >= 0) { + link.printf("c T %d\n", telemetry_rate); + if (remote) { + link.flush_output(); + link.stop_remote(); + link.set_telemetry_rate(telemetry_rate); + link.flush_output(); + link.start_remote(); + } + } + + if (callsign != null) { link.printf("c c %s\n", callsign); + if (remote) { + link.flush_output(); + link.stop_remote(); + link.set_callsign(callsign); + link.flush_output(); + link.start_remote(); + } + } + if (radio_enable >= 0) link.printf("c e %d\n", radio_enable); - if (telemetry_rate >= 0) - link.printf("c T %d\n", telemetry_rate); - /* HAS_ACCEL */ /* UI doesn't support accel cal */ if (pad_orientation >= 0)