X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosConfig.java;h=c5de83f20608cea55c17a6eb78b1d5cab3090470;hb=336224a08327cadc95f6e5b564a4ddc64aaad8f8;hp=854d5384620e34e0655188d002aa9a27704678e8;hpb=97517ee585462c2d355f23f999fb8d9ebd908ec1;p=fw%2Faltos diff --git a/altosui/AltosConfig.java b/altosui/AltosConfig.java index 854d5384..c5de83f2 100644 --- a/altosui/AltosConfig.java +++ b/altosui/AltosConfig.java @@ -207,13 +207,20 @@ public class AltosConfig implements ActionListener { void save_data() { try { + int channel; start_serial(); serial_line.printf("c m %d\n", main_deploy.get()); serial_line.printf("c d %d\n", apogee_delay.get()); - if (!remote) { - serial_line.printf("c r %d\n", radio_channel.get()); - serial_line.printf("c f %d\n", radio_calibration.get()); + channel = radio_channel.get(); + serial_line.printf("c r %d\n", channel); + if (remote) { + serial_line.stop_remote(); + serial_line.set_channel(channel); + AltosPreferences.set_channel(device.getSerial(), channel); + serial_line.start_remote(); } + if (!remote) + serial_line.printf("c f %d\n", radio_calibration.get()); serial_line.printf("c c %s\n", callsign.get()); if (flight_log_max.get() != 0) serial_line.printf("c l %d\n", flight_log_max.get()); @@ -337,11 +344,11 @@ public class AltosConfig implements ActionListener { version = new string_ref("unknown"); product = new string_ref("unknown"); - device = AltosDeviceDialog.show(owner, AltosDevice.product_any); + device = AltosDeviceDialog.show(owner, Altos.product_any); if (device != null) { try { serial_line = new AltosSerial(device); - if (!device.matchProduct(AltosDevice.product_telemetrum)) + if (!device.matchProduct(Altos.product_telemetrum)) remote = true; try { init_ui();