Fixed equals method, which was screwing up accuracy improvement algo
This commit is contained in:
parent
c72d07ce3a
commit
c0f00cd9f4
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.dougkeen.bart"
|
package="com.dougkeen.bart"
|
||||||
android:versionCode="9"
|
android:versionCode="10"
|
||||||
android:versionName="1.1" >
|
android:versionName="1.1.1" >
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
|
@ -7,6 +7,7 @@ import com.dougkeen.bart.Line;
|
|||||||
import com.dougkeen.bart.Station;
|
import com.dougkeen.bart.Station;
|
||||||
|
|
||||||
public class Departure implements Parcelable, Comparable<Departure> {
|
public class Departure implements Parcelable, Comparable<Departure> {
|
||||||
|
private static final int ESTIMATE_EQUALS_TOLERANCE_MILLIS = 59999;
|
||||||
private static final int MINIMUM_MERGE_OVERLAP_MILLIS = 10000;
|
private static final int MINIMUM_MERGE_OVERLAP_MILLIS = 10000;
|
||||||
|
|
||||||
public Departure() {
|
public Departure() {
|
||||||
@ -249,11 +250,7 @@ public class Departure implements Parcelable, Comparable<Departure> {
|
|||||||
return false;
|
return false;
|
||||||
if (line != other.line)
|
if (line != other.line)
|
||||||
return false;
|
return false;
|
||||||
if (maxEstimate != other.maxEstimate)
|
if (Math.abs(maxEstimate - other.maxEstimate) > ESTIMATE_EQUALS_TOLERANCE_MILLIS)
|
||||||
return false;
|
|
||||||
if (minEstimate != other.minEstimate)
|
|
||||||
return false;
|
|
||||||
if (minutes != other.minutes)
|
|
||||||
return false;
|
return false;
|
||||||
if (platform == null) {
|
if (platform == null) {
|
||||||
if (other.platform != null)
|
if (other.platform != null)
|
||||||
|
Loading…
Reference in New Issue
Block a user