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
raw gravity added #397
raw gravity added #397
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome PR, there are some comments that need to be addressed though :)
.vscode/settings.json
Outdated
@@ -0,0 +1,3 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove that file and add .vscode
to the gitignore?
new RNSensor(reactContext, "RNSensorsMagnetometer", Sensor.TYPE_MAGNETIC_FIELD), | ||
new RNSensor(reactContext, "RNSensorsBarometer", Sensor.TYPE_PRESSURE), | ||
new RNSensor(reactContext, "RNSensorsOrientation", Sensor.TYPE_ROTATION_VECTOR) | ||
new RNSensor(reactContext, "Gyroscope", Sensor.TYPE_GYROSCOPE), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you prefix them with RNSensors
?
src/rnsensors.js
Outdated
RNSensorsMagnetometer: MagnNative, | ||
RNSensorsBarometer: BarNative, | ||
RNSensorsOrientation: OrientNative, | ||
Gyroscope: GyroNative, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to stay prefixed
src/sensors.js
Outdated
RNSensorsMagnetometer: MagnNative, | ||
RNSensorsBarometer: BarNative, | ||
RNSensorsOrientation: OrientNative, | ||
Gyroscope: GyroNative, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to stay prefixed
all are done and now we can merge it |
Awesome, thanks for your help! |
🎉 This PR is included in version 7.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
* raw gravity added for android * raw gravity added for ios * prefixes * ignore vscode config * prefixes
I'm working to get the same for ios when user have gravity so linear acceleration can be calculated by
linearAcceleration = accelerometer - gravity