forked from upstream-mirrors/OpenTracks
Chagne gps accuracy default tp 50m
This commit is contained in:
@@ -283,7 +283,7 @@ public class ChartFragment extends Fragment implements TrackDataListener {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onMinRequiredAccuracy(int minRequiredAccuracy) {
|
||||
public boolean onRecordingGpsAccuracy(int minRequiredAccuracy) {
|
||||
// We don't care.
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ public class MyTracksMapFragment extends SupportMapFragment implements TrackData
|
||||
// Current location
|
||||
private Location currentLocation;
|
||||
private Location lastTrackPoint;
|
||||
private int minRequiredAccuracy = PreferencesUtils.MIN_REQUIRED_ACCURACY_DEFAULT;
|
||||
private int recordingGpsAccuracy = PreferencesUtils.RECORDING_GPS_ACCURACY_DEFAULT;
|
||||
|
||||
/**
|
||||
* True to continue keeping the current location visible on the screen.
|
||||
@@ -492,8 +492,8 @@ public class MyTracksMapFragment extends SupportMapFragment implements TrackData
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onMinRequiredAccuracy(int newValue) {
|
||||
minRequiredAccuracy = newValue;
|
||||
public boolean onRecordingGpsAccuracy(int newValue) {
|
||||
recordingGpsAccuracy = newValue;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -714,7 +714,7 @@ public class MyTracksMapFragment extends SupportMapFragment implements TrackData
|
||||
hasGoodFix = false;
|
||||
} else {
|
||||
hasFix = !LocationUtils.isLocationOld(currentLocation);
|
||||
hasGoodFix = currentLocation.getAccuracy() <= minRequiredAccuracy;
|
||||
hasGoodFix = currentLocation.getAccuracy() <= recordingGpsAccuracy;
|
||||
}
|
||||
if (!hasFix) {
|
||||
message = getString(R.string.gps_wait_for_signal);
|
||||
|
||||
@@ -56,7 +56,7 @@ public class StatsFragment extends Fragment implements TrackDataListener {
|
||||
|
||||
private Location lastLocation = null;
|
||||
private TripStatistics lastTripStatistics = null;
|
||||
private int minRequiredAccuracy = PreferencesUtils.MIN_REQUIRED_ACCURACY_DEFAULT;
|
||||
private int recordingGpsAccuracy = PreferencesUtils.RECORDING_GPS_ACCURACY_DEFAULT;
|
||||
|
||||
// A runnable to update the total time field.
|
||||
private final Runnable updateTotalTime = new Runnable() {
|
||||
@@ -148,7 +148,7 @@ public class StatsFragment extends Fragment implements TrackDataListener {
|
||||
|
||||
if (lastLocation != null) {
|
||||
boolean hasFix = !LocationUtils.isLocationOld(lastLocation);
|
||||
boolean hasGoodFix = lastLocation.getAccuracy() <= minRequiredAccuracy;
|
||||
boolean hasGoodFix = lastLocation.getAccuracy() <= recordingGpsAccuracy;
|
||||
|
||||
if (!hasFix || !hasGoodFix) {
|
||||
lastLocation = null;
|
||||
@@ -207,8 +207,8 @@ public class StatsFragment extends Fragment implements TrackDataListener {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onMinRequiredAccuracy(int newValue) {
|
||||
minRequiredAccuracy = newValue;
|
||||
public boolean onRecordingGpsAccuracy(int newValue) {
|
||||
recordingGpsAccuracy = newValue;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user