summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
46f08f8)
When using 2400 or 9600 baud remote link rates, we need to increase
the packet timeout from 500ms to much longer values to avoid annoying
the user with timeout warnings.
Signed-off-by: Keith Packard <keithp@keithp.com>
if (!can_cancel && remote)
System.out.printf("Uh-oh, reading remote serial device from swing thread\n");
if (!can_cancel && remote)
System.out.printf("Uh-oh, reading remote serial device from swing thread\n");
- if (remote && can_cancel)
+ if (remote && can_cancel) {
+ switch (telemetry_rate) {
+ case AltosLib.ao_telemetry_rate_38400:
+ default:
+ timeout = 500;
+ break;
+ case AltosLib.ao_telemetry_rate_9600:
+ timeout = 2000;
+ break;
+ case AltosLib.ao_telemetry_rate_2400:
+ timeout = 8000;
+ break;
+ }
+ }
*/
public boolean monitor_mode = false;
public int telemetry = AltosLib.ao_telemetry_standard;
*/
public boolean monitor_mode = false;
public int telemetry = AltosLib.ao_telemetry_standard;
- public int telemetry_rate = AltosLib.ao_telemetry_rate_38400;
+ public int telemetry_rate = -1;
public double frequency;
public String callsign;
AltosConfigData config_data;
public double frequency;
public String callsign;
AltosConfigData config_data;
if (debug)
System.out.printf("start remote %7.3f\n", frequency);
set_radio_frequency(frequency);
if (debug)
System.out.printf("start remote %7.3f\n", frequency);
set_radio_frequency(frequency);
- set_callsign(AltosPreferences.callsign());
+ if (telemetry_rate < 0)
+ telemetry_rate = AltosPreferences.telemetry_rate(serial);
+ set_telemetry_rate(telemetry_rate);
+ if (callsign.equals(""))
+ callsign = AltosPreferences.callsign();
+ set_callsign(callsign);
printf("p\nE 0\n");
flush_input();
remote = true;
printf("p\nE 0\n");
flush_input();
remote = true;