*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package org.altusmetrum.altosuilib_3;
+package org.altusmetrum.altosuilib_12;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.text.*;
import java.util.concurrent.*;
-import org.altusmetrum.altoslib_5.*;
+import org.altusmetrum.altoslib_12.*;
class AltosScanResult {
String callsign;
rate = in_rate;
}
- public boolean equals(AltosScanResult other) {
+ public int hashCode() {
+ return serial ^ frequency.hashCode() ^ telemetry ^ rate;
+ }
+
+ public boolean equals(Object o) {
+ if (o == null)
+ return false;
+ if (!(o instanceof AltosScanResult))
+ return false;
+ AltosScanResult other = (AltosScanResult) o;
return (serial == other.serial &&
- frequency.frequency == other.frequency.frequency &&
+ frequency.equals(other.frequency) &&
telemetry == other.telemetry &&
rate == other.rate);
}
if (state == null)
continue;
packet_count++;
- if (state.flight != AltosLib.MISSING) {
- final AltosScanResult result = new AltosScanResult(state.callsign,
- state.serial,
- state.flight,
+ AltosCalData cal_data = state.cal_data();
+ if (cal_data.flight != AltosLib.MISSING) {
+ final AltosScanResult result = new AltosScanResult(cal_data.callsign,
+ cal_data.serial,
+ cal_data.flight,
frequencies[frequency_index],
telemetry,
rate);