diff --git a/library/build.gradle b/library/build.gradle index 6f82b97c..4ae03651 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -31,8 +31,8 @@ android { defaultConfig { minSdkVersion 18 targetSdkVersion 28 - versionCode 60 - versionName "3.7.0" + versionCode 61 + versionName "3.7.1" } buildTypes { release { diff --git a/library/src/main/java/com/mbientlab/metawear/impl/SensorFusionBoschImpl.java b/library/src/main/java/com/mbientlab/metawear/impl/SensorFusionBoschImpl.java index 88c0e9a2..5c917583 100644 --- a/library/src/main/java/com/mbientlab/metawear/impl/SensorFusionBoschImpl.java +++ b/library/src/main/java/com/mbientlab/metawear/impl/SensorFusionBoschImpl.java @@ -715,7 +715,7 @@ public Task calibrate(CancellationToken ct, long pollingPeriod, gyro = new Capture<>(null), mag = new Capture<>(null); - return Task.forResult(null).continueWhile(() -> !terminate.get(), ignored -> ct.isCancellationRequested() ? readCalibrationStateAsync().onSuccessTask(task -> { + return Task.forResult(null).continueWhile(() -> !terminate.get(), ignored -> !ct.isCancellationRequested() ? readCalibrationStateAsync().onSuccessTask(task -> { if (updateHandler != null) { updateHandler.receivedUpdate(task.getResult()); }