compass don't work
paulle opened this issue · 2 comments
paulle commented
The compass don't work. The compass scale is always grey, no blue as in the screenshot on f-droid and showing north in every position.
Android 11
Sony Xperia 4
woheller69 commented
Then your GPS position is not good enough and does not provide data on direction (bearing).
if (mGpsLocation.hasBearing()) {
mB.gpsCont.compass.setLineColor(ContextCompat.getColor(this,R.color.accent));
mB.gpsCont.compass.setTextColor(ContextCompat.getColor(this,R.color.dynamicFgDim));
mB.gpsCont.compass.setShowMarker(true);
bearing = mGpsLocation.getBearing();
} else {
mB.gpsCont.compass.setLineColor(ContextCompat.getColor(this,R.color.disabledStateColor));
mB.gpsCont.compass.setTextColor(ContextCompat.getColor(this,R.color.disabledStateColor));
mB.gpsCont.compass.setShowMarker(false);
}
Or you are not moving. Direction is only available in GPS while moving
paulle commented
Thank you very much for the hint. And yes compass is working with a better GPS fix.
Gesendet von ProtonMail mobile
…-------- Original-Nachricht --------
Am 10. Dez. 2021, 06:36, woheller69 schrieb:
Then your GPS position is not good enough and does not provide data on direction (bearing).
if (mGpsLocation.hasBearing()) {
mB.gpsCont.compass.setLineColor(ContextCompat.getColor(this,R.color.accent));
mB.gpsCont.compass.setTextColor(ContextCompat.getColor(this,R.color.dynamicFgDim));
mB.gpsCont.compass.setShowMarker(true);
bearing = mGpsLocation.getBearing();
} else {
mB.gpsCont.compass.setLineColor(ContextCompat.getColor(this,R.color.disabledStateColor));
mB.gpsCont.compass.setTextColor(ContextCompat.getColor(this,R.color.disabledStateColor));
mB.gpsCont.compass.setShowMarker(false);
}
—
You are receiving this because you authored the thread.
Reply to this email directly, [view it on GitHub](#3 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/ABFAS3Y4G7A6OSWLOTQR7XDUQGGXHANCNFSM5JX4ZZYQ).
Triage notifications on the go with GitHub Mobile for [iOS](https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675) or [Android](https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub).