comment arrow initialization fix for non-compass devices
This commit is contained in:
parent
9fa44e1419
commit
41ff4fd5e9
2 changed files with 2 additions and 0 deletions
|
@ -513,6 +513,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateCompassValue(float value) {
|
public void updateCompassValue(float value) {
|
||||||
|
//99 in next line used to one-time initalize arrows (with reference vs. fixed-north direction) on non-compass devices
|
||||||
float lastHeading = heading != null ? heading : 99;
|
float lastHeading = heading != null ? heading : 99;
|
||||||
heading = value;
|
heading = value;
|
||||||
if (heading != null && Math.abs(MapUtils.degreesDiff(lastHeading, heading)) > 5) {
|
if (heading != null && Math.abs(MapUtils.degreesDiff(lastHeading, heading)) > 5) {
|
||||||
|
|
|
@ -211,6 +211,7 @@ public class DashFavoritesFragment extends DashBaseFragment {
|
||||||
public void updateCompassValue(float value) {
|
public void updateCompassValue(float value) {
|
||||||
//heading = value;
|
//heading = value;
|
||||||
//updateArrows();
|
//updateArrows();
|
||||||
|
//99 in next line used to one-time initalize arrows (with reference vs. fixed-north direction) on non-compass devices
|
||||||
float lastHeading = heading != null ? heading : 99;
|
float lastHeading = heading != null ? heading : 99;
|
||||||
heading = value;
|
heading = value;
|
||||||
if (heading != null && Math.abs(MapUtils.degreesDiff(lastHeading, heading)) > 5) {
|
if (heading != null && Math.abs(MapUtils.degreesDiff(lastHeading, heading)) > 5) {
|
||||||
|
|
Loading…
Reference in a new issue