summaryrefslogtreecommitdiffstats
path: root/src/plugins/sensors/blackberry
Commit message (Collapse)AuthorAgeFilesLines
* add PLUGIN_CLASS_NAME declarations to plugin projectsOswald Buddenhagen2014-04-091-0/+1
| | | | | | | | | | | needed for automatic static linking (and later deployment). the gesture plugins are excluded from the automation based on the assumption that they are usually not needed. the example and the test plugin are also excluded for obvious reasons. Change-Id: I7645aa0daf216ce430989e13d4380dbe6dd2bbd1 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* BlackBerry: update plugin keyAndrew Inwood2014-04-071-1/+1
| | | | | | | | | | | | | | The plugin key for both the Generic backend and the BlackBerry backend were set to "notused". This ultimately caused the Generic backend not to be loaded, which is why QTiltSensor wasn't being exposed. The duplicate keys caused a collision in a QMap in QFactoryLoader, making it look like the generic backend had been created, when it hadn't. Tested on a BlackBerry Z10. Change-Id: Ie5e40586751e7c3b9683a94a39b07efd4fc7fc82 Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* BlackBerry: Update threshold for close detectionAndrew Inwood2014-03-111-1/+5
| | | | | | | | | | The current algorithm for close detection in QProximitySensor will not work for sensors whose output is not binary (ie, close/far). The new algorithm will use the threshold of 8cm when the output is not binary. Change-Id: I2173e9afae0a2d29434e092e1afc09d1c6f5647c Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Fix some typos in comments and documentationSergio Ahumada2014-03-043-4/+4
| | | | | Change-Id: I8541601c0bfe2b7c80e88b4617e8215b266fb0bd Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* BlackBerry: Disabled "returnGeoValues" featureBernd Weimer2013-10-282-36/+15
| | | | | | | | Elimination of interference is not supported on BlackBerry, so returnGeoValues property will be ignored. Change-Id: I5c6e3a80ec18f9e0d349d3c4040bfb8067a72291 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* BlackBerry: Ensured that proper sensor.h file is usedBernd Weimer2013-09-192-3/+7
| | | | | Change-Id: I746cbf971b88cdffcfc5d675d27d0dda5bac95ad Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-05-231-3/+1
|\ | | | | | | Change-Id: I497c153fe555fbfbbd5fbb40f65f614ee33b065d
| * 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>
* | 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>
* | 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>
* 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-251-1/+1
|\ | | | | | | | | | | | | | | | | 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-071-1/+1
| | | | | | | | | | 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>
* | 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>
* | 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>
* | 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>
* 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-021-5/+1
| | | | | | | | | | | 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>
* 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>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2434-795/+795
| | | | | | | | | | 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>
* centralize load(qt_build_config)s in .qmake.confOswald Buddenhagen2012-09-131-2/+0
| | | | | Change-Id: Ieaa07fcaf28f754c14774dee61697624d33cabf8 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.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>
* Port configure tests to the new style to make them work againThomas McGuire2012-08-081-1/+3
| | | | | Change-Id: Ia7a284fc407a28a3cfae14358a8286864ad0c25a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Blackberry: Improve detecting whether the application is activeThomas McGuire2012-07-252-8/+49
| | | | | | | | | | | | Previously, we simply assumed to be active. Now, we read the state from the navigator PPS file instead. Also move reading of the orientation into its own function for consistency. Change-Id: Icc1789bd942e8fa5a9d5451de4c2ab9f3ffb54e4 Reviewed-by: Lorn Potter <lorn.potter@nokia.com> Reviewed-by: Kevin Ottens <kevin.ottens.qnx@kdab.com>
* Blackberry: Affirm that QSensor::Buffering is supported now.Thomas McGuire2012-07-241-2/+3
| | | | | | | | | | | | The patch adding QSensor::Feature support was developed before buffering was implemented on Blackberry, so update this to reflect the current situation. Also fix compile warning about missing Reserved value. Change-Id: I085afeefc6c2dc7f520c9ef93d90a93f3e8a03e7 Reviewed-by: Adam Parco <aparco@rim.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Blackberry: Implement axes remapping for all axes-based sensorsThomas McGuire2012-07-248-76/+113
| | | | | | | The remapping code was moved to BbSensorBackend. Change-Id: I6ede875594a2aaa3745b7deb4aa0ed64c2d9b855 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Blackberry: Remove QtGui dependencyThomas McGuire2012-07-249-62/+239
| | | | | | | | | | | | | In the Blackberry backend, we can't depend on QtGui and especially not on the Blackberry QPA plugin, as Cascades uses QCoreApplication, not QGuiApplication. All QtGui functions are replaced with a new GuiHelper class, that internally uses BPS. Change-Id: Ia508e8b397050676c68612340d33cdbf57041076 Reviewed-by: Adam Parco <aparco@rim.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Blackberry: Remove custom BbProximityReadingThomas McGuire2012-07-242-85/+4
| | | | | | | | | | BbProximityReading extended QProximityReading with a distance and a reflectance property. Reflectance is already available in the IR proximity sensor, while distance isn't supported on any device. Change-Id: I413d3e35b0ccae29592dc11c287c3af6d5133ecc Reviewed-by: Adam Parco <aparco@rim.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Blackberry: Use the rotation matrix as the compass sourceThomas McGuire2012-07-236-39/+107
| | | | | | | | | | This fixes the direction flipping over when holding the device upside-down. Change-Id: I57bac63208d475d4091b47593b9768613eea30b0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Adam Parco <aparco@rim.com> Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
* Add QSensor::isFeatureSupported()Thomas McGuire2012-07-232-0/+15
| | | | | | | | | | | | Now it is possible to check if a backend supports a specific feature. During reviews of features like acceleration mode or duplicate skipping, the issue was raised how to check if these features are actually supported. The same is true for existing features like QMagnetometer::returnGeoValues. Change-Id: I47115d6c487bbcbb668a9021cdc7085e6780a67c Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
* Introduce QRotationReading::setFromEuler() in favor of set{X/Y/Z}()Thomas McGuire2012-07-181-3/+3
| | | | | | | | | | | | | In preparation of adding new representations to the reading (QTBUG-25840), the setX(), setY() and setZ() setters were removed, as these don't set the representation atomically, and don't provide a single point where a conversion to matrix or quaternion can occur. These setters were only supposed to be used by the backends, and all backends are ported in this commit. Change-Id: Ib652520578d293687fc8515d226f1f61aa2f2def Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com> Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
* Blackberry: Implement bufferingThomas McGuire2012-07-121-0/+23
| | | | | | | | | | | The API provided by QSensor does not fit nicely for what the OS service API provides. Instead of adding yet another buffer-related property to QSensor, I added documentation to QSensor describing the differences in behaviour. Change-Id: I2d81d9c62ce7e8b50c27631a28aa7fbcaca70373 Reviewed-by: Adam Parco <aparco@rim.com> Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
* Blackberry: Remove rotation property from orientation readingThomas McGuire2012-07-032-65/+5
| | | | | | | | | The rotation property is redundant, as it can be deduced from the orientation. Furthermore, for FaceUp and FaceDown orientations, the rotation is always 0, further confusing the issue. Change-Id: I4348cd56fe713358d388a09829224159eab8b6b8 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Blackberry: Add Q_DECL_OVERRIDE keywordsThomas McGuire2012-07-0213-25/+25
| | | | | | | | Change-Id: Iae2c29ac040d32623ec49976cf4df0a7a492d28b Reviewed-by: Adam Parco <aparco@rim.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lorn Potter <lorn.potter@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Blackberry: Add ambient light sensor supportThomas McGuire2012-07-024-0/+137
| | | | | | | Change-Id: I119c5864599e206795522be485c4c218f983cfb9 Reviewed-by: Adam Parco <aparco@rim.com> Reviewed-by: Lorn Potter <lorn.potter@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Blackberry: Don't use hardcoded sensor IDsThomas McGuire2012-06-291-10/+10
| | | | | | | Change-Id: I8a5e6995e735cd7d80e24c9462f144b75a177d5a Reviewed-by: Kevin Ottens <kevin.ottens.qnx@kdab.com> Reviewed-by: Adam Parco <aparco@rim.com> Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
* build system cleanupsOswald Buddenhagen2012-06-261-1/+1
| | | | | | | | | | | | | | | | | - load(qt_module) => load(qt_build_config) - remove: - CONFIG+=module (obsolete) - code relating to module version headers (automated now) - %mastercontent assignment (automated now) - QT_BUILD_*_LIB defines (automated now) - pointless QPRO_PWD assignments - pointless DEFINES+=QT_MAKEDLL - pointless include and depend paths Change-Id: I2c5062c238c6948f99d72f7c5544095cd30c988d Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com> Reviewed-by: Alex <alex.blasche@nokia.com>
* BlackBerry backend: Automatic Axis RemappingKevin Ottens2012-06-193-3/+78
| | | | | | | | | | | | | | | | Add a backend specific property named "automaticAxisRemapping" to force the sensor to modify its coordinate system based on the device native orientation. So usable from C++ using 'setProperty("automaticAxisRemapping", true)' or from QML using 'property var automaticAxisRemapping: true'. Note it requires QPlatformScreen::nativeOrientation() private API to find out the device native orientation. Change-Id: If4c5622fd42c74a55fe6d36966d7f589e612c117 Reviewed-by: Adam Parco <aparco@rim.com> Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
* Prefer to use the BBNDK sensor.h if presentThomas McGuire2012-05-112-0/+12
| | | | | Change-Id: Ife482d8acb5a533f61e009bf65ec37215a7af595 Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
* Add support for the compass sensorKevin Ottens2012-05-044-0/+147
| | | | | | Change-Id: Ia3c49b6d991439eba06537938198ed682f23065d Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>