summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f395bca)
We've had code to synchronously update the local and remote radio
frequencies when doing configuration over the remote link. This patch
adds the same code when changing the call sign and baud rate.
Signed-off-by: Keith Packard <keithp@keithp.com>
return radio_frequency >= 0 || radio_setting >= 0 || radio_channel >= 0;
}
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;
public void set_frequency(double freq) {
int frequency = radio_frequency;
int setting = radio_setting;
radio_calibration);
/* When remote, reset the dongle frequency at the same time */
if (remote) {
radio_calibration);
/* When remote, reset the dongle frequency at the same time */
if (remote) {
link.stop_remote();
link.set_radio_frequency(frequency);
link.stop_remote();
link.set_radio_frequency(frequency);
+ 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);
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 (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)
/* HAS_ACCEL */
/* UI doesn't support accel cal */
if (pad_orientation >= 0)