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

raw gravity added #397

Merged
merged 5 commits into from Jul 23, 2021
Merged

raw gravity added #397

merged 5 commits into from Jul 23, 2021

Conversation

Ehsan0Hejazi
Copy link
Contributor

I'm working to get the same for ios when user have gravity so linear acceleration can be calculated by
linearAcceleration = accelerometer - gravity

@Ehsan0Hejazi Ehsan0Hejazi changed the title raw gravity added for android raw gravity added Jul 18, 2021
Copy link
Member

@DanielMSchmidt DanielMSchmidt left a 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 :)

@@ -0,0 +1,3 @@
{
Copy link
Member

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),
Copy link
Member

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,
Copy link
Member

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,
Copy link
Member

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

@Ehsan0Hejazi
Copy link
Contributor Author

all are done and now we can merge it

@DanielMSchmidt DanielMSchmidt merged commit e33b074 into react-native-sensors:master Jul 23, 2021
@DanielMSchmidt
Copy link
Member

Awesome, thanks for your help!

@DanielMSchmidt
Copy link
Member

🎉 This PR is included in version 7.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

kibolho pushed a commit to kibolho/react-native-sensors that referenced this pull request Oct 7, 2023
* raw gravity added for android

* raw gravity added for ios

* prefixes

* ignore vscode config

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

Successfully merging this pull request may close these issues.

None yet

2 participants