diff --git a/fsensor/build.gradle b/fsensor/build.gradle index f803311..1084b45 100644 --- a/fsensor/build.gradle +++ b/fsensor/build.gradle @@ -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" diff --git a/fsensor/src/main/java/com/kircherelectronics/fsensor/filter/fusion/OrientationFusion.java b/fsensor/src/main/java/com/kircherelectronics/fsensor/filter/fusion/OrientationFusion.java index ba16fcb..394090b 100644 --- a/fsensor/src/main/java/com/kircherelectronics/fsensor/filter/fusion/OrientationFusion.java +++ b/fsensor/src/main/java/com/kircherelectronics/fsensor/filter/fusion/OrientationFusion.java @@ -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) { diff --git a/release/fsensor-release.aar b/release/fsensor-release.aar index e710e65..c31b443 100644 Binary files a/release/fsensor-release.aar and b/release/fsensor-release.aar differ