diff options
author | Liang Qi <liang.qi@qt.io> | 2016-09-19 14:33:39 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-09-19 14:33:44 +0200 |
commit | df3374bd4bb8af1494f6a35b1102f15cfe9633e0 (patch) | |
tree | 5c76f62e0e0be4bb7a79f3441717c6b8c4d302af /src/plugins/sensors/ios/ioscompass.mm | |
parent | 0032fd615097baeff2414e352e095bc412000941 (diff) | |
parent | ecd018fe2ee4508e094f631d882ecc1360abec01 (diff) |
Merge remote-tracking branch 'origin/5.7' into 5.8
Change-Id: I35021aba57d8acc6b6e27e9800c6a244cb0e99da
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); } |