Skip to content

Commit

Permalink
v1.1.5
Browse files Browse the repository at this point in the history
* Fix a bug where the rotation vector should only be initialized one time.
  • Loading branch information
KalebKE committed Mar 31, 2018
1 parent b094268 commit 2613805
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions fsensor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ android {
compileSdkVersion 26
buildToolsVersion '26.0.2'

lintOptions {
abortOnError false
}

defaultConfig {
minSdkVersion 14
targetSdkVersion 26
versionCode 1
versionName "1.0"
versionCode 5
versionName "1.1.5"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,10 @@ protected Quaternion getGyroscopeRotationVector(Quaternion previousRotationVecto
}

protected void initializeRotationVectorGyroscopeIfRequired(Quaternion rotationVectorAccelerationMagnetic) {
rotationVectorGyroscope = new Quaternion(rotationVectorAccelerationMagnetic.getScalarPart(),
if(rotationVectorGyroscope == null) {
rotationVectorGyroscope = new Quaternion(rotationVectorAccelerationMagnetic.getScalarPart(),
rotationVectorAccelerationMagnetic.getVectorPart());
}
}

private float[] getFusedOrientation(float[] gyroscope) {
Expand Down
Binary file modified release/fsensor-release.aar
Binary file not shown.

0 comments on commit 2613805

Please sign in to comment.