limit arrow update on dashboard to >3 degrees
This commit is contained in:
parent
04d2a25c22
commit
1aa0a026f8
1 changed files with 8 additions and 1 deletions
|
@ -180,8 +180,15 @@ public class DashFavoritesFragment extends DashBaseFragment {
|
|||
}
|
||||
|
||||
public void updateCompassValue(float value) {
|
||||
//heading = value;
|
||||
//updateArrows();
|
||||
float lastHeading = heading;
|
||||
heading = value;
|
||||
updateArrows();
|
||||
if (heading != null && lastHeading != null && Math.abs(MapUtils.degreesDiff(lastHeading, heading)) > 3) {
|
||||
updateArrows();
|
||||
} else {
|
||||
heading = lastHeading
|
||||
}
|
||||
}
|
||||
|
||||
public void updateLocation(Location location) {
|
||||
|
|
Loading…
Reference in a new issue