Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DeviceMotion] convert rotationRate to degrees #7876

Merged
merged 7 commits into from May 2, 2020

Conversation

EvanBacon
Copy link
Contributor

@EvanBacon EvanBacon commented Apr 16, 2020

Why

How

  • Add interval property on iOS and Android
  • All sensors use correct gravity size 9.80665
  • DeviceMotion rotationRate has been changed on Android and in the docs to match the W3 spec.
  • Convert rotationRate to degrees per the W3 spec https://www.w3.org/TR/orientation-event/

Test Plan

  • Tested the native rotation rate side by side with web rotation rate.
  • My web app that screams when you drop your phone on the ground now works on native.

@EvanBacon EvanBacon requested a review from ide April 16, 2020 23:59
@EvanBacon EvanBacon self-assigned this Apr 16, 2020
@ExpoBot
Copy link

ExpoBot commented Apr 17, 2020

Warnings
⚠️

You modified sdk/devicemotion.md in the unversioned directory. Please consider copying the changes to the latest released version if applicable.

Generated by 🚫 dangerJS against f38cebf

@EvanBacon EvanBacon marked this pull request as ready for review April 17, 2020 20:12
@EvanBacon EvanBacon merged commit f9b1b53 into master May 2, 2020
@EvanBacon EvanBacon deleted the @evanbacon/sensors/fix-native-device-motion branch May 2, 2020 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DeviceMotion] rotationRate is not consistent across platforms Device Motion doesn't match web spec
2 participants