diff options
author | Liang Qi <liang.qi@qt.io> | 2016-09-17 22:55:17 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-09-17 22:55:17 +0200 |
commit | ecd018fe2ee4508e094f631d882ecc1360abec01 (patch) | |
tree | 9b1a8f00e0d6eca0f51768d7af4018f7af0187f8 /src/plugins/sensors/ios/ioscompass.mm | |
parent | 62ec986855e3b3c9fda54a09ca83ae5039663c9c (diff) | |
parent | 724008411c16aaf8fa25c09745e20d0d47d65721 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I14345192d06a8a0ac9000feab6daea0f11b41f72
Diffstat (limited to 'src/plugins/sensors/ios/ioscompass.mm')
-rw-r--r-- | src/plugins/sensors/ios/ioscompass.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/sensors/ios/ioscompass.mm b/src/plugins/sensors/ios/ioscompass.mm index 34eb0aa7..7fc48d36 100644 --- a/src/plugins/sensors/ios/ioscompass.mm +++ b/src/plugins/sensors/ios/ioscompass.mm @@ -71,8 +71,8 @@ QT_BEGIN_NAMESPACE quint64 timestamp = quint64(newHeading.timestamp.timeIntervalSinceReferenceDate * 1e6); double accuracy = newHeading.headingAccuracy; // Accuracy is the maximum number of degrees the reading can be off. The QtSensors scale - // goes from 1 to 0, with 1 being the best (0 degrees off), and 0 worst (365 degrees off): - qreal calibrationLevel = (accuracy < 0) ? 0 : qMax(0., 1 - (accuracy / 365)); + // goes from 1 to 0, with 1 being the best (0 degrees off), and 0 worst (360 degrees off): + qreal calibrationLevel = (accuracy < 0) ? 0 : qMax(0., 1 - (accuracy / 360)); qreal heading = qreal(newHeading.magneticHeading); m_iosCompass->headingChanged(heading, timestamp, calibrationLevel); } |