Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

CP #325 #338

Merged
merged 7 commits into from
Apr 23, 2020
Merged

CP #325 #338

merged 7 commits into from
Apr 23, 2020

Conversation

LukasPaczos
Copy link
Member

@LukasPaczos LukasPaczos commented Apr 23, 2020

CP #325. Thanks again for your contribution @ystsoi!

I cleaned up the comments a bit and removed the uncertain vector drawable since it wouldn't be used by default.

<changelog>Improve the default compass engine's heading calculation and push updates even when uncertain. (h/t @ystsoi)</changelog>

ystsoi and others added 7 commits April 23, 2020 12:09
The compass engine has not adjusted the heading according to the device orientation. This causes wrong heading if the device is not in its normal orientation.
…r events, otherwise, only one sensor value is updated in each heading update.

Especially, there may be more TYPE_ACCELEROMETER events in some devices, such that TYPE_MAGNETIC_FIELD events could be dropped easily.
Also, it took longer time to reflect the latest heading if there are few events, due to the lowPassFilter.
… placed horizontally or vertically.

The previous logic may return wrong heading when the device is placed horizontally.
This makes it possible to use a different indicator for the unreliable case, instead of just changing the RenderMode to NORMAL.
@LukasPaczos LukasPaczos merged commit 161abf8 into master Apr 23, 2020
@LukasPaczos LukasPaczos deleted the lp-cp-325 branch April 23, 2020 11:30
@chloekraw
Copy link
Contributor

🎉

Edited the <changelog> above to add a h/t to @ystsoi!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants