This makes sure the link doesn't try to start at the wrong frequency.
Signed-off-by: Keith Packard <keithp@keithp.com>
int cal) {
if (debug)
System.out.printf("set_radio_frequency %7.3f (freq %b) (set %b) %d\n", frequency, has_frequency, has_setting, cal);
- if (frequency == 0)
+ if (frequency == 0 || frequency == AltosLib.MISSING)
return;
if (has_frequency)
set_radio_freq((int) Math.floor (frequency * 1000 + 0.5));
public String name;
public void start_remote() throws TimeoutException, InterruptedException {
- if (frequency == 0.0)
+ if (frequency == 0.0 || frequency == AltosLib.MISSING)
frequency = AltosPreferences.frequency(serial);
if (debug)
System.out.printf("start remote %7.3f\n", frequency);
thread = new AltosIdleMonitor(this, link, (boolean) remote);
+ thread.set_frequency(AltosUIPreferences.frequency(serial));
+
status_update = new AltosFlightStatusUpdate(flightStatus);
new javax.swing.Timer(100, status_update).start();