summaryrefslogtreecommitdiffstats
path: root/src/plugins/sensors
Commit message (Collapse)AuthorAgeFilesLines
...
| * 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>
* | Use real properties for QSensor::bufferSize & coThomas McGuire2013-02-082-21/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The #ifdef Q_DOC hack is not really needed and was confusing. In addition, expose those properties to the QML API. As a result, the backends can now listen to the bufferSizeChanged() signal to update the buffering while the sensor is running. This has been implemented for the BlackBerry platform. Change-Id: I5239ba2a4b791cfc9f684b44ff2bc103a7b5b0da Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* | Repair duplicate skipping for the tilt sensorThomas McGuire2013-02-082-15/+17
| | | | | | | | | | | | | | | | Found because the compiler was warning about an unused "change" variable. Change-Id: Iac968685ba8da7a4d38a00427d22d1e01e31b25f Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* | Add a QAmbientTemperatureSensor class.Thomas McGuire2013-02-083-40/+6
| | | | | | | | | | | | | | Port the Blackberry backend to use it. Change-Id: I6d4395f5ab9e0ce3fb6f76c47282929103929557 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* | Convert QMagnetometer::returnGeoValues to a proper propertyThomas McGuire2013-02-081-1/+3
| | | | | | | | | | Change-Id: I39cde0046e8a3fc77edbcf5c9510e2dcf6c731c7 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* | genericrotationsensor: Remove unused magnetometer memberThomas McGuire2013-02-081-1/+0
| | | | | | | | | | Change-Id: I29a3736537b0b2602f4b5ef1a3ba74e55331d24e Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* | Convert QRotationSensor::hasZ to a proper propertyThomas McGuire2013-02-081-1/+3
| | | | | | | | | | Change-Id: I32edf761653fbe9d08710703b02fb1c0183aba3e Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* | Add a QAltimeter class.Thomas McGuire2013-02-083-40/+6
| | | | | | | | | | | | | | Port the Blackberry backend to use it. Change-Id: I3d3bc1d6fa8b42d3d0d64bcd3245050b67a37dc7 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-281-2/+0
| | | | | | | | | | | | | | | | | | The macro was made empty in qtbase/ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: If3f1040766e1c7de05bb8e90cd8a8a2a349bd096 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | Add QHolsterSensorThomas McGuire2013-01-234-0/+141
| | | | | | | | | | | | | | | | | | | | This adds a new QHolsterSensor plus the assorted reading and filter classes, as well as a QML API. Also implement the Blackberry backend for it. Change-Id: I42e76c21ee74a39a65629e7ab6d9a18f23eae4d4 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | Add a axes remapping featureThomas McGuire2013-01-233-11/+41
| | | | | | | | | | | | | | | | | | | | | | This allows orientable sensors like accelerometer or compass to change to adapt the reading values based on the current screen orientation. Add support for the BlackBerry backend. Change-Id: If7cfde8f20da4f677fdd13c38f7e11f2ed96bedd Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | Add API for duplicate skippingThomas McGuire2013-01-233-14/+14
| | | | | | | | | | | | | | | | | | | | | | Duplicate skipping enables omitting reading values that are very similar to the previous one, thus saving processing power. Implement this for the Blackberry backend. Change-Id: Ic608d8ca795b5a2e0bca5a75a62e8005c283c620 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | Add QPressureSensorThomas McGuire2013-01-233-42/+8
| | | | | | | | | | | | | | | | | | | | This adds a new QPressureSensor plus the assorted reading and filter classes, as well as a QML API. The Blackberry backend is ported to use the new reading class. Change-Id: Ifc86a2ae955a9337a67fd9a86ceabab908917cb3 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | QAccelerometer: Add AccelerationMode propertyThomas McGuire2013-01-234-0/+61
| | | | | | | | | | | | | | | | | | | | | | Add a new property to be able to toggle effects of gravity on or off. Implement the Blackberry backend side of this as well. QTBUG-25842 Change-Id: I15c4cae72373f48b0153b83c6aa3d27b66538c87 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com> Reviewed-by: Sérgio Martins <sergio.martins.qnx@kdab.com>
* | Generic plugin: Remove debug message noise.Thomas McGuire2013-01-151-1/+0
| | | | | | | | | | Change-Id: I33e43f0846197cbb47609af249e54769e17920b8 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* | Actually enable loading of the generic tilt sensorThomas McGuire2013-01-153-12/+29
| | | | | | | | | | | | | | | | | | Also, disable loading of all other generic plugins on the BlackBerry platform. Change-Id: I7c969fdb224daf1016162ad597edac81e967105e Reviewed-by: Sérgio Martins <sergio.martins.qnx@kdab.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* | Generic Tilt sensor: Use degree rather than radiansThomas McGuire2013-01-151-0/+9
| | | | | | | | | | | | | | | | This is stated in the docs and it is also more consistent with all other sensors. Change-Id: I5d1d074630f9efa7371a42d10196984549769e24 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* | Do not link librt on Android platformsRainer Keller2013-01-152-2/+2
|/ | | | | | | | Android platform does not need to have librt linked separately. Change-Id: Iab35d5f44bde439ca83a1d4664a7e10bae6cb0da Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Register only the sensors the emulator knows aboutLincoln Ramsay2012-11-133-1/+47
| | | | | | | | | Unfortunately, this involves a (long) round-trip so we start by registering all the types we know about then unregister and re-register the ones we're notified about. Change-Id: I8ae8b4a9037eeb21a65454519945c3c307979a14 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Removal last references to QtMobilityThomas McGuire2012-11-022-2/+2
| | | | | | | Change-Id: Ia92de27ec25451b64a2e584507ca44485b94745a Reviewed-by: Kevin Ottens <kevin.ottens.qnx@kdab.com> Reviewed-by: Bernd Weimer <bweimer@rim.com> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* adjust to qt_plugin.prf and qml_plugin.prf changesOswald Buddenhagen2012-11-025-25/+6
| | | | | | | | | | | DESTDIR and INSTALLS+=target are set up automatically now, but PLUGIN_TYPE needs to be defined. this contains a nasty hack for examples, as we don't want users to use the internal prf files. Change-Id: I9e854e7ff6183e19801998ff7157a279b97b2be4 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* make compile with -no-guiTasuku Suzuki2012-10-151-1/+1
| | | | | Change-Id: Ia5c93a26ce2d56d0844aea1c0c5ddd1be2ae3c5a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Blackberry: Avoid expensive close() and open() just to get informationThomas McGuire2012-10-042-14/+29
| | | | | | | | | Instead, open the device to get information, but then just pause it until start() is called. Change-Id: I3002bee07807d3956e74e8fd82425b16cdb61001 Reviewed-by: Adam Parco <aparco@rim.com> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Add TiltSensor to QtMobility.sensors 1.3Lincoln Ramsay2012-10-034-2/+270
| | | | | | | | | | | This has been adapted from the TiltSensor type in QtSensors 5.0 import but the code there has been split into multiple pieces. There's a C++ class, a generic backend and a QML interface. Change-Id: Ic09465a5f76250a02a13938abe4789958137376f Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2470-1668/+1668
| | | | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I85014238e262cb59d8d92b0d708851e82e5633da Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Fix the compilation issue on Linux (Harmattan)Laszlo Papp2012-09-151-0/+1
| | | | | | | | errno is used for constructing a warning message meanwhile the errno.h is not included. This is causing a build issue at least on Harmattan. Change-Id: Ia2697ecdcb893102c16d054a555a3e71fe4aa009 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* centralize load(qt_build_config)s in .qmake.confOswald Buddenhagen2012-09-135-10/+0
| | | | | Change-Id: Ieaa07fcaf28f754c14774dee61697624d33cabf8 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* remove vestiges of unistd-based file accessOswald Buddenhagen2012-09-052-7/+1
| | | | | | | it's all done with QFile now Change-Id: I0f8147bcedc1514ed7685fb6f8b42f7fbe65a4aa Reviewed-by: L Potter <lorn.potter@gmail.com>
* use a float not an int.Lorn Potter2012-09-021-1/+1
| | | | | Change-Id: Ib569e9436cef4ba32721f8f8db97e9eaf43959dd Reviewed-by: L Potter <lorn.potter@gmail.com>
* Pass through invalid data rates to the backend instead of ignoring themThomas McGuire2012-08-281-0/+6
| | | | | | | | | This gives the backend the chance to do something sensible with it, at the expense of the data rate not being reported correctly in those cases. Change-Id: Iadf72b4448145f2454bc9422dde094ad799cb17a Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
* Blackberry: Use real compass sensor if availableThomas McGuire2012-08-282-0/+15
| | | | | | Change-Id: Iecae90f4c315668d7ac16923ccdfcacf6153d0e8 Reviewed-by: Adam Parco <aparco@rim.com> Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
* Blackberry: Fix potential division by zero.Thomas McGuire2012-08-241-3/+5
| | | | | | | | | | | | Some users reported a division by zero problem when connecting to the backend, I suspect this is the reason for it. The sensor service seems to report either the min or the max delay as zero. Change-Id: I8b7e8f7c3243d7016c0c4472713c4c116471015d Reviewed-by: Tobias Koenig Reviewed-by: Kevin Ottens <kevin.ottens.qnx@kdab.com> Reviewed-by: Adam Parco <aparco@rim.com> Reviewed-by: Lorn Potter <lorn.potter@nokia.com>