summaryrefslogtreecommitdiffstats
path: root/src/plugins/sensors
Commit message (Collapse)AuthorAgeFilesLines
...
| * add gyroscope for sensorfw backendLorn Potter2013-08-011-0/+1
| | | | | | | | | | | | | | | | Task-number: QTBUG-32754 Change-Id: I9037c20953d67584fdfeb4d0fabdfd73f919f14c Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * use 9.80665 as standard gravity for calculations.Lorn Potter2013-08-011-2/+1
| | | | | | | | | | | | | | | | Task-number: QTBUG-32751 Change-Id: I65076fa41d5c6a4e716df96bc5156068c1bd0040 Reviewed-by: Alex Blasche <alexander.blasche@digia.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | iOS: change magnetometer implementation to use Timer base pollingRichard Moe Gustavsen2013-06-122-83/+54
| | | | | | | | | | | | | | | | | | | | | | Ref change: 102bdf3 We need to change the implementation to use polling rather than callback to achieve full performance together with fine-grained QTimers. Change-Id: Ic3bf978633c56175eeca90cad8ed764a0b1c9b0c Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | iOS: change gyro implementation to use Timer base pollingRichard Moe Gustavsen2013-06-102-35/+23
| | | | | | | | | | | | | | | | | | | | | | Ref change: 102bdf3 We need to change the implementation to use polling rather than callback to achieve full performance together with fine-grained QTimers. Change-Id: I895418996b53432642d37279855167d815261d92 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* | Merge branch 'stable' into devSergio Ahumada2013-06-0722-24/+45
|\| | | | | | | | | | | | | | | Conflicts: .qmake.conf sync.profile Change-Id: I0eaa022110b99fc5bc7cdf6304b5cda3ad3e8f8c
| * fix build in OBS, as well as fixes for API changes.Lorn Potter2013-06-0622-23/+44
| | | | | | | | | | | | | | Change-Id: I27eabe7c8b79e03d814deb541db5e7f0b5449099 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
| * Fix pkgconfig dependsLorn Potter2013-05-231-1/+1
| | | | | | | | | | | | | | We call it sensord-qt5 now. Use this instead of the qt4 sensord Change-Id: I54f9de52e572f0afbfef742cf0c84fc64f1469f0 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* | iOS: change accelerometer to use QTimer for pollingRichard Moe Gustavsen2013-06-052-37/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the docs (CMMotionManager class reference) there are two ways of interacting with the accelerometer; Either through the callback API (NSOperationQueue), or peridic sampling (polling). Our first implementation of IOSAcceleometer used the former technique, which turns out to have bad performance when using the sensor together with a fine-grained QTimer. And this case is pretty common when using sensors together with e.g QML. Reading through the docs more carefully, they recommend using the polling technique when creating games instead since the NSOperationQueue introduces some overhead. So this patch does that, change the implementation to use QTimer based polling. And this solves the performance issues found. Change-Id: Ifde0d2292302467afb8db90a954ef45f3238350e Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-05-237-18/+21
|\| | | | | | | Change-Id: I497c153fe555fbfbbd5fbb40f65f614ee33b065d
| * Remove debug output.Friedemann Kleint2013-05-132-2/+0
| | | | | | | | | | | | | | Task-number: QTBUG-31074 Change-Id: I7cb66ccbe74203e87e3bcc60400a8f7b2b2be0ed Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
| * BlackBerry: Fix for GeoValues supportBernd Weimer2013-05-061-3/+1
| | | | | | | | | | | | | | | | Generic QSensor("QMagnetometer") crashed, because of a null pointer access. Fixed by disabling geo values support for generic magnetometer sensors. Change-Id: Ie3e654df10f325ff42cd3a08c3108e9b7a84604f Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
| * Make it possible to bundle Android buildsEskil Abrahamsen Blomfeldt2013-05-064-13/+20
| | | | | | | | | | | | | | | | | | Add the bundled jar file and information about required plugins. Task-number: QTBUG-30751 Change-Id: I41918e8f04449439703ef1ae91c78636e9475f36 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-04-298-3/+428
|\| | | | | | | Change-Id: I4cfd0e2a2f108f5ecf79c56418c02928b041856e
| * iOS: enable generic sensorsRichard Moe Gustavsen2013-04-231-0/+4
| | | | | | | | | | Change-Id: I400661cabd4839f8a4e0c2b648a8a62a161dc955 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
| * Generic: set PLUGIN_CLASS_NAME to help static builds (iOS)Richard Moe Gustavsen2013-04-231-0/+1
| | | | | | | | | | | | | | | | | | | | qmake will parse QTPLUGIN when building static apps, and create a stand-alone cpp file that adds the needed Q_IMPORT_PLUGIN lines. But for this to work, PLUGIN_CLASS_NAME needs to be set. Change-Id: Id92d78f3d77c3ce0d59fd27eec1df3271a947d51 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: implement proximity sensorRichard Moe Gustavsen2013-04-164-2/+215
| | | | | | | | | | Change-Id: Ia4c2dbe4f81ceda1600f9f642effbc3377cfa94d Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
| * iOS: implement compassRichard Moe Gustavsen2013-04-164-3/+210
| | | | | | | | | | Change-Id: I639a472cd2dfca177282cb4961d589f11f924e36 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-04-166-5/+6
|\| | | | | | | Change-Id: Ia02497aafc94feba0381ffe8733cbc89f29fb412
| * iOS: implement magnetometerRichard Moe Gustavsen2013-04-145-2/+238
| | | | | | | | | | Change-Id: I611e1ccafb0362b78737785e9cc7f4f48278063a Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
| * iOS: remove unneeded void pointer casting in private headersRichard Moe Gustavsen2013-04-142-4/+5
| | | | | | | | | | | | | | | | | | | | The headers in use for the sensor backend are private, and should never be directly included in any .cpp files. As such, we don't need to be careful using obj-c features in the header files. Change-Id: If16a84c88a7e7afc45afe00e668e4582337e4907 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
| * iOS: add QPointer guard to accelerometer and gyroRichard Moe Gustavsen2013-04-142-20/+34
| | | | | | | | | | | | | | | | | | | | Since we process data from the sensors using a callback queued to the application operation queue, we need to check that the qt sensor is still alive before accessing it. Change-Id: I697d72f94aedec34b125006d6405428e282bfc0d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
| * iOS: refactor and simplify IOSAccelerometer codeRichard Moe Gustavsen2013-04-142-74/+22
| | | | | | | | | | | | | | | | | | | | | | | | The code as it stood made use of an extra obj-c class to listen for sensor readings. This is not needed with the block (lambda) API used by CMMotionManager. This will also make IOSGyroscope and (soon) IOSMagnetometer follow the same code pattern. Change-Id: If945f8616f4cdde98b31382fcd9c555c2b490c4a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
| * iOS: remove unnecessary test for accelerometer availableRichard Moe Gustavsen2013-04-101-17/+14
| | | | | | | | | | | | | | | | | | The accelerometer is always available, so no need to check for this. Change-Id: I79411ff023c4350c5b31d4fad048484db2b2fe43 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
| * iOS: set data rate on accelerometer before starting itRichard Moe Gustavsen2013-04-101-0/+4
| | | | | | | | | | | | | | | | | | Respect user data rate settings by applying the rate just before the sensor starts Change-Id: I3da37497c574cbf94d57699c941ce2bf3b54373c Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
| * iOS: bugfix accelerometer timestampRichard Moe Gustavsen2013-04-101-1/+3
| | | | | | | | | | | | | | | | Convert from NSTimeInterval to microseconds Change-Id: I51fb3791aa72dcc7514c39820e4347a3c1d4039a Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
| * iOS: implement gyroscope for iOSRichard Moe Gustavsen2013-04-104-4/+171
| | | | | | | | | | | | Change-Id: I4a46908a4b4e166c489dce4a034ef68698288419 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
| * Android: Report correct timestamp valuev5.1.0-alpha1Paul Olav Tvete2013-04-045-5/+5
| | | | | | | | | | | | | | | | Android uses nanoseconds for the timestamp while Qt uses microseconds. Change-Id: I1a6a4c2c3e8cfc950d795e00b7d7546869399f29 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * Fix warnings in qtsensorsThiago Macieira2013-04-031-0/+1
| | | | | | | | | | | | | | | | qtapsensor.h:110:34: error: extra ";" [-pedantic] qsensor.cpp:147:12: error: ‘qrange_id’ defined but not used [-Werror=unused-variable] dummycommon.cpp:151:9: error: variable ‘ok’ set but not used [-Werror=unused-but-set-variable] Change-Id: Ief3b4841bae7c255a40ad8f19f3f8733a613db48 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | iOS: implement magnetometerRichard Moe Gustavsen2013-04-105-2/+238
| | | | | | | | | | Change-Id: I611e1ccafb0362b78737785e9cc7f4f48278063a Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | Added temperature property to pressure sensorBernd Weimer2013-04-092-0/+2
| | | | | | | | | | | | | | | | | | | | | | Many air pressure sensors provide their temperature, as well. This can be used for temperature compensation for instance. The pressure sensor API has been extended and a BlackBerry backend has been implemented. Change-Id: I188e1276dff74601d757d0a356b28b4fea4594bd Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-04-031-0/+4
|\| | | | | | | Change-Id: I14f923883afe9f43282e449725f509e0688e597e
| * Install the jar fileBogDan Vatra2013-04-021-0/+4
| | | | | | | | | | | | | | Change-Id: I7bb84492336a69fc5389f3a26f026f7cb91c7052 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | BlackBerry: Removed comment in pressure sensor backendBernd Weimer2013-03-281-2/+0
| | | | | | | | | | | | | | Verified pressure sensor and removed corresponding TODO comment. Change-Id: I1ed08373f874db33e64c80fd784d5e1c95dd1f8e Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | iOS: remove unneeded void pointer casting in private headersRichard Moe Gustavsen2013-03-222-4/+5
| | | | | | | | | | | | | | | | | | The headers in use for the sensor backend are private, and should never be directly included in any .cpp files. As such, we don't need to be careful using obj-c features in the header files. Change-Id: If16a84c88a7e7afc45afe00e668e4582337e4907 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | iOS: add QPointer guard to accelerometer and gyroRichard Moe Gustavsen2013-03-222-20/+34
| | | | | | | | | | | | | | | | | | Since we process data from the sensors using a callback queued to the application operation queue, we need to check that the qt sensor is still alive before accessing it. Change-Id: I697d72f94aedec34b125006d6405428e282bfc0d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | iOS: refactor and simplify IOSAccelerometer codeRichard Moe Gustavsen2013-03-222-74/+22
| | | | | | | | | | | | | | | | | | | | | | The code as it stood made use of an extra obj-c class to listen for sensor readings. This is not needed with the block (lambda) API used by CMMotionManager. This will also make IOSGyroscope and (soon) IOSMagnetometer follow the same code pattern. Change-Id: If945f8616f4cdde98b31382fcd9c555c2b490c4a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | iOS: remove unnecessary test for accelerometer availableRichard Moe Gustavsen2013-03-211-17/+14
| | | | | | | | | | | | | | | | | | The accelerometer is always available, so no need to check for this. Change-Id: I79411ff023c4350c5b31d4fad048484db2b2fe43 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* | iOS: set data rate on accelerometer before starting itRichard Moe Gustavsen2013-03-211-0/+4
| | | | | | | | | | | | | | | | | | Respect user data rate settings by applying the rate just before the sensor starts Change-Id: I3da37497c574cbf94d57699c941ce2bf3b54373c Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* | iOS: bugfix accelerometer timestampRichard Moe Gustavsen2013-03-211-1/+3
| | | | | | | | | | | | | | | | Convert from NSTimeInterval to microseconds Change-Id: I51fb3791aa72dcc7514c39820e4347a3c1d4039a Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* | iOS: implement gyroscope for iOSRichard Moe Gustavsen2013-03-214-4/+171
|/ | | | | | Change-Id: I4a46908a4b4e166c489dce4a034ef68698288419 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* iOS: implement accelerometer for iOSLorn Potter2013-03-128-1/+415
| | | | | | | This change implements an accelerometer for iOS. Change-Id: Id6de98427312bc0be42935fd9704117665d1e4a2 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* add sensorfw based sensor pluginLorn Potter2013-03-0530-2/+2345
| | | | | | | ported from qtmobility. Change-Id: Ia4ee6e2b7ecbc441c5f6605f1bbabfec22ddcd09 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Sensor implementation for AndroidPaul Olav Tvete2013-03-0523-8/+1405
| | | | | | | | | | | | | | | Based on the Necessitas project by Bogdan Vatra. Contributors to the Qt5 project: BogDan Vatra <bogdan@kde.org> Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Paul Olav Tvete <paul.tvete@digia.com> The full history of the Qt5 port can be found in refs/old-heads/android, SHA-1 caa4103a80ef90db5eb9836f6b6028b7ce36c73a Change-Id: I57e772ee5079c0ea74f685b65ae2864d73e7c750 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Make debug code compile againPaul Olav Tvete2013-03-051-6/+6
| | | | | | Change-Id: I96458c3e79e979ed5e682df48765d76482bfead6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Initialize variablesPaul Olav Tvete2013-03-011-0/+2
| | | | | | | | | The old values of xRotation and yRotation are used in calculations. This should fix the bug where the tilt sensor would occasionally report NaN. Change-Id: I87e67cdbf66976f0c74e91d0f1660f7fc12f31cc Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* BlackBerry: Support QMagnetometer::returnGeoValuesThomas McGuire2013-03-012-10/+27
| | | | | | Change-Id: Ib81074bb9ea2b922fb8c599e7e758346e85bb6e0 Reviewed-by: Adam Parco <aparco@rim.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Blackberry: Prevent spurious calls to dataAvailable() when stoppedThomas McGuire2013-03-011-13/+22
| | | | | | | | | | | | | | | Explicitly disable the socket notifier and drain the device file to avoid dataAvailable() being called spuriously. This fixes high CPU usage that occurred in some circumstances after stopping the sensor. Many thanks to Dmytro Mishchenko for reporting and helping to track down the problem. Change-Id: Idcaff1432b96b392d033e5b21c2b379259792212 Reviewed-by: Adam Parco <aparco@rim.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-256-6/+5
|\ | | | | | | | | | | | | | | | | Conflicts: src/plugins/sensors/generic/generictiltsensor.cpp src/sensors/qtapsensor.h sync.profile Change-Id: I017a5fa8dffb69b41727495175c0fca9b76962e1
| * remove nokia and replace with qt-project in pluginsLorn Potter2013-02-077-8/+7
| | | | | | | | | | Change-Id: I63fa985991653e4b8465a7fb88acab647d8546e8 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | BlackBerry: Remove outdated TODO commentThomas McGuire2013-02-101-3/+0
| | | | | | | | | | | | | | | | The proximity sensor has been tested in the meantime and works as expected. Change-Id: Ifd27055e36d58f860809d4a5c5dc3f4203094771 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>