Monitor idle was setting the frequency to 0, which takes a while with
the new native radio frequency setting code. Don't do that, instead
pull out the preferred frequency for that, as is done in other places
where a frequency of 0.0 is used.
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)
+ return;
if (has_frequency)
set_radio_freq((int) Math.floor (frequency * 1000));
else if (has_setting)
public void set_radio_frequency(double in_frequency) throws InterruptedException, TimeoutException {
frequency = in_frequency;
+ if (frequency == 0.0)
+ frequency = AltosPreferences.frequency(device.getSerial());
config_data();
set_radio_frequency(frequency,
config_data.radio_frequency != 0,