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

Gravity sensor and fix for orientation #35

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mattermoran
Copy link

Added gravity sensor and fixed delay for orientation sensor
#33

@@ -105,11 +105,15 @@ public void onSensorChanged(SensorEvent sensorEvent) {
roll = 360 - (0 - roll);
}

i++;
Copy link

@Kuluum Kuluum Oct 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to move that right under long curTime = System.currentTimeMillis();. Not to make excess work with geting orientation and performing data to send event.

@@ -10,8 +10,8 @@
import android.util.Log;

public class SensorManagerModule extends ReactContextBaseJavaModule {
private static final String REACT_CLASS = "SensorManager";
private AccelerometerRecord mAccelerometerRecord = null;
private static final String REACT_CLASS = "SensorManager";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not the best idea to break the code alignment)

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

Successfully merging this pull request may close these issues.

2 participants