diff options
author | Andrew Inwood <ainwood@blackberry.com> | 2014-03-25 14:13:35 -0400 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-28 21:17:48 +0100 |
commit | cc8c26d77db10eef152432caf3f8e677c0fffb21 (patch) | |
tree | 82bfe2c001779e54296db6e51140c0c8507699ef /src/sensors/sensors.pro | |
parent | 01e97935c61498adb650d2e639ac8948a5e67a8f (diff) | |
download | qtsensors-cc8c26d77db10eef152432caf3f8e677c0fffb21.tar.gz |
Create a new sensor type for distance.
Create a new sensor type for distance. This sensor type supports new hardware sensors
that can measure physical distance from the device, in centimeters. The API is designed
to mimic the Android API for proximity (TYPE_PROXIMITY), so that if a given proximity
sensor only supports a binary measurement (near vs far), then instead of reporting distance
in cm, the QDistanceSensor will return the max range value to represent far, and a lesser
value to represent close. Using this definition should simplify implementation.
The main reason for not implementing this as a new property of QProximitySensor is that
clients of QProximitySensor have made the assumption that they will receive the readingReady
signal if and only if the reading has changed from near to far or vice versa. Adding a
distance property will break that assumption, as distance has a higher degree of precision.
Change-Id: Ia804948c78ff7391fc8b78df975cddcf861326dc
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
Diffstat (limited to 'src/sensors/sensors.pro')
-rw-r--r-- | src/sensors/sensors.pro | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sensors/sensors.pro b/src/sensors/sensors.pro index e7ad05f..5ca3325 100644 --- a/src/sensors/sensors.pro +++ b/src/sensors/sensors.pro @@ -35,7 +35,7 @@ PRIVATE_HEADERS += \ SOURCES += qsensorbackend.cpp\ qsensormanager.cpp\ - qsensorplugin.cpp\ + qsensorplugin.cpp SOURCES += \ gestures/qsensorgesture.cpp \ @@ -65,6 +65,7 @@ SENSORS=\ qambientlightsensor\ qambienttemperaturesensor\ qcompass\ + qdistancesensor\ qholstersensor\ qlightsensor\ qmagnetometer\ @@ -75,7 +76,7 @@ SENSORS=\ qtapsensor\ qtiltsensor\ qgyroscope\ - qpressuresensor\ + qpressuresensor for(s,SENSORS) { # Client API |