diff options
author | Simo Piiroinen <simo.piiroinen@jollamobile.com> | 2017-06-14 10:53:57 +0300 |
---|---|---|
committer | Lorn Potter <lorn.potter@gmail.com> | 2018-09-04 23:12:20 +0000 |
commit | 4ab2e8f086441c06a2dabbd4c62756fc0f029053 (patch) | |
tree | 27ae1189ab84fb8424f009387b05eb85558b8338 /src/plugins/sensorgestures | |
parent | a2d3d45f3e9f779a4fc10f8df07b9bd921e755c6 (diff) |
sensorfw: Fix initial proximity sensor state evaluation
The sensorfw plugin assumes that both proximity state query and change
notifications use the same withinProximity boolean type values. Because
the state query actually returns integer distance, the initial value
visible in for example QML ProximitySensor is logically reversed from
what it should be and it requires one or two sensor state transitions
before changes get notified in the expected manner.
Evaluate initial proximity state as "distance" value where zero means
that the sensor is covered.
Also use the initial value to setup the cached previously seen value
instead of blindly assuming that sensor is not covered.
As suggested in sensorfwd documentation: Switch from deprecated
dataAvailable() signal to reflectanceDataAvailable() signal.
Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
Change-Id: I49e5607134848dc3c72e79733321df6251b7df52
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'src/plugins/sensorgestures')
0 files changed, 0 insertions, 0 deletions