summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-beta3Qt Forward Merge Bot2019-04-1333-1225/+906
|\ | | | | | | Change-Id: Iff501d1162491fafeb9aaf0a68927ade79b3b6e7
| * Say hello to Qt Android Sensors based on NDK APIBogDan Vatra2019-04-1133-1225/+906
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until Qt 5.9, we had to use JNI way because the NDK sensors API was introduced in API-16. Starting with Qt 5.9 we can safely use the NDK API as API_16 is the minimum API supported by Qt. Using the NDK API instead of JNI boost the performance a lot! The CPU usage dropped 2 to 4 times, from over 60% using the JNI to less than 20%. [ChangeLog][Android] Rewrite Qt Android Sensors using NDK API. Change-Id: If3e3f1e56973e2a189662912b2a6ebfbd71dee14 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | ios: silence warning (-Wobjc-interface-ivars)Richard Moe Gustavsen2018-11-151-2/+3
|/ | | | | | | | | Move the variable to the implementation section to silence: "warning: declaration of instance variables in the interface is deprecated" Change-Id: I2381995d4fdaea83e0af6687faa140b249da3e3d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Android: Implement calibrationLevel for QCompassReadingAndy Shaw2018-10-311-6/+10
| | | | | | | | | [ChangeLog][Platform Specific Changes][Android] QCompassReading::calibrationLevel now returns a valid value when possible. Change-Id: Ia7b6af9fc14d4edc4ce04af251eb29c84f08b957 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* sensorfw: Fix initial proximity sensor state evaluationSimo Piiroinen2018-09-042-8/+21
| | | | | | | | | | | | | | | | | | | | | | 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>
* Fix device orientation angles provided by QTiltSensorAndre de la Rocha2017-12-271-24/+5
| | | | | | | | | | | | | | | The device orientation angles provided by QTiltSensor were being incorrectly calculated from the accelerator sensor measurements, in all supported devices. This resulted in a restricted range of values reported for the roll angle, thus making non-equivalent device orientations, like a tablet lying horizontally with the screen up, and the flipped configuration with the screen down, report equivalent orientation angles, making it impossible to distinguish between them. Task-number: QTBUG-57898 Change-Id: I82c1d4d2c1eab435f389b89dbb537fa7b349cbf1 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-201-1/+1
|\ | | | | | | Change-Id: I11b81861a0dcd8380374060161550690812ff96d
| * Update to new QRandomGenerator APIv5.10.0-beta4Thiago Macieira2017-11-031-1/+1
| | | | | | | | | | Change-Id: I69f37f9304f24709a823fffd14e676c097712329 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Add missing override and remove redundant virtualAlexander Volkov2017-11-1410-21/+21
| | | | | | | | | | Change-Id: I51c0fc424f44ae68c3c1c4cf6377e7701ee5a0dd Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | add sensor plugin for TI sensortagLorn Potter2017-10-0224-0/+2189
| | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QSensorBackend] Support for TI Sensortag sensor board. Introduce env var QT_SENSORTAG_ID for specifying a specific sensor tag. On mac, this is the sensortag uuid, on linux it is the sensor tag's bluetooth address. Change-Id: I7c5db8dac15ddbfdb0709bd6462759b4a70d32b7 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-211-3/+3
| | | | | | | | | | Change-Id: Ib258bbc787f43e563fff8af8151ceae87471c672 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | Android: remove support for local/debug deploymentJake Petroules2017-09-064-20/+14
|/ | | | | | | | | | | | | | This removes the pre-dexed JAR files activated by the absence of the bundled_jar_file CONFIG option, as versions of Android >= 5 no longer support this deployment mechanism. Now, the "bundled" JARs simply become normal JARs containing class files, and are neither activated by a bundled_jar_file CONFIG entry nor do they have a -bundled suffix in the file's base name. Task-number: QTBUG-62995 Change-Id: I23fe81254efee5517453f73b1938026257ddb7a6 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Merge remote-tracking branch 'origin/5.9' into devv5.10.0-beta3v5.10.0-beta2v5.10.0-beta1v5.10.0-alpha1Liang Qi2017-08-161-77/+2
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ib23a0c24c0ec5758dd0799a443c5e43ce7c5f35b
| * Use QDeadlineTimer to greatly simplify dummy plugin implementationJake Petroules2017-07-111-77/+2
| | | | | | | | | | Change-Id: Ibda65cd63dcf277730044da04ee30b68513f95ee Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Use QRandomGenerator instead of q?randThiago Macieira2017-06-301-2/+2
| | | | | | | | | | Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-0715-180/+225
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Iac052b07a815ed6bcaea42109895e323342c5d71
| * Fix licensingJani Heikkinen2017-05-1015-180/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove unused old license files - Update BSD and FDL license headers - Unify licensing * Examples are nowdays licensed under BSD, update correct license header to there * Tools and tests are nowdays licensed under GPL-EXCEPT, update correct license header to those * Src is nowdays licensed under LGPL, update correct license header to there Task-number: QTBUG-57147 Change-Id: I5d9d7a3bc5e360f01ec73fb6a2a873f3173b5918 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | Use qRadiansToDegrees() and qDegreesToRadians() more widelyEdward Welbourne2017-03-068-37/+27
|/ | | | | | | | | They document intent more clearly than arithmetic with pi does. Also eliminate some hand-rolled RADIANS_TO_DEGREES constants in favor of calling qRadiansToDegrees(). Change-Id: I7ca5e876b3591433bf681b56ad51c4cb409ac59f Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-1277-227/+287
|\ | | | | | | | | | | | | Conflicts: src/plugins/sensors/ios/ios.pro Change-Id: I8d9ca692713c8ba5d8c243371474b0e61630b05e
| * Replace Q_DECL_OVERRIDE by overrideAlexander Volkov2016-12-0265-188/+188
| | | | | | | | | | | | | | 'override' keyword can be used directly since Qt 5.7. Change-Id: Ibf0fc590f7e247a310a833a22ece700ec75199bb Reviewed-by: Lorn Potter <lorn.potter@canonical.com>
| * Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-263-3/+17
| |\ | | | | | | | | | Change-Id: I912756c6bbecf7c55acd60d136ea6ce490118ebb
| | * Merge remote-tracking branch 'origin/5.6' into 5.75.7Liang Qi2016-11-241-1/+15
| | |\ | | | | | | | | | | | | Change-Id: I77e9c7f825716af5ab4a1c04551f89e22099696e
| | | * Android: Fix incorrect accuracy levelsChristian Strømme2016-11-221-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android reports accuracy in four different levels (0, 1, 2 and 3), these values were used directly in Qt, so the reported values would be outside Qt documented range, which is a floating point number between 0 and 1. Task-number: QTBUG-57184 Change-Id: I912a76bffd3e205689103b0352ea4c480d660d63 Reviewed-by: Lorn Potter <lorn.potter@canonical.com>
| | * | Fix lux value in sensorfw backendLorn Potter2016-11-142-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make light sensor value consistent with timestamp Change-Id: If6d5f15e2c645e86852a5b66cf0894a1e2ca3f1c Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * | | Port qtsensors to the new configure frameworkJake Petroules2016-11-072-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't invoke pkg-config at build time, automatically check for sensorfw and compile the correct plugin if found. Change-Id: I30dcd41cdebd7cf082cec66f3122c24fbab5c893 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| * | | Port the iOS sensors plugin to the other UIKit platformsv5.8.0-beta1Jake Petroules2016-10-0512-31/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | watchOS supports accelerometer, gyroscope, and magnetometer. tvOS supports only the proximity sensor. No sensors are available on macOS yet, but the plugin is still built there because many of the underlying APIs are available cross platform and so some macOS sensors can appear here in the future. Change-Id: I1668d81f09c745e60c1906be621a74f969841566 Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | | [ChangeLog][QtSensors][QSensor] Add new sensor: lidsensorLorn Potter2016-11-215-1/+168
| | | | | | | | | | | | | | | | | | | | Change-Id: I57123eed34ee4618f1cba643c2ce49c8c621a6cd Reviewed-by: Lorn Potter <lorn.potter@canonical.com>
* | | | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-09-219-16/+71
|\| | | | | | | | | | | | | | | Change-Id: Iaeb7c9f62b50d68e0cedb95c523aebcceb9128c0
| * | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-199-16/+71
| |\| | | | | | | | | | | | | | Change-Id: I35021aba57d8acc6b6e27e9800c6a244cb0e99da
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-179-16/+71
| | |\| | | | | | | | | | | | | Change-Id: I14345192d06a8a0ac9000feab6daea0f11b41f72
| | | * iOS: protect OS sensors from being stopped when shared by several Qt sensorsRichard Moe Gustavsen2016-08-258-14/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a Qt sensor is told to stop, it automatically stops the underlying OS sensor as well. This caused a problem when several Qt sensors were running, since stopping one would stop them all. This patch will add a ref count for each affected sensor, so that we keep track of when it's safe to start and stop the underlying OS sensor. Task-number: QTBUG-54977 Change-Id: If06c4daac22916feef2f4c7bd521363d74f342a6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lorn Potter <lorn.potter@canonical.com>
| | | * IOSCompass: calculate correct calibration levelRichard Moe Gustavsen2016-08-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A compass has 360 degrees, not 365. Change-Id: I2f0628fa0151434b1b529fbefd1a4bab9de99a8a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | Fix iOS sensor plugin linking as shared libraryJake Petroules2016-08-231-1/+1
|/ / / | | | | | | | | | | | | | | | | | | Static linking was hiding the Foundation.framework dependency. Change-Id: I7c038488196d31d18c5174020c69dd03f15fa6f3 Reviewed-by: Lorn Potter <lorn.potter@canonical.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-0212-17/+23
|\| | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I4be6cbe9e4ac981f46b3c45d271cac5c7fc677cb
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-014-7/+13
| |\| | | | | | | | | | Change-Id: I53d801a88bda3a8b8519b6002e1d37053c03e103
| | * Make sure JNI_OnLoad is not called more than onceBogDan Vatra2016-07-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Android 5.0 Google introduce a nasty bug[1] which calls JNI_OnLoad more than once. Basically every time when a library is loaded JNI_OnLoad is called if found, but it calls *again* JNI_OnLoad of its .so dependencies! [1] Workaround https://code.google.com/p/android/issues/detail?id=215069 Change-Id: I34728572bc279581b8c95c42c206ed104bfc09a5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * OpenBSD: librt.so is not available on systemRalf Nolden2016-05-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | OpenBSD does not provide librt.so for the sensors module, which leads to linker errors in this case. Disable linking to librt.so by adding !openbsd to the list of OSes not having it. Change-Id: If7b33eb33b4027be79bce4bb3272bef3a5b7d832 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * QCoverSensorGestureRecognizer: sanitize initialization.Edward Welbourne2016-05-302-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coverity noticed uninitialized members (CID 22309). Eliminate members handler (never accessed or set; the code always uses QtSensorGestureSensorHandler::instance() instead) and lastTs (set but never accessed). Initialized timer (to 0; it'll be set more sensibly as long as create() gets called). Reformatted constructor. Change-Id: I41738ec51db94fb35e068af509e9a34bf9221770 Reviewed-by: Lorn Potter <lorn.potter@canonical.com>
| * | This module doesn't need an Activity to work, a Context object is enoughBogDan Vatra2016-07-261-3/+3
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-54506 Change-Id: I83576e79f12556479a43aac95123edcacd50c63c Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * | Use QDateTime::currentMSecsSinceEpoch() instead of currentDateTimeThiago Macieira2016-06-277-7/+7
| | | | | | | | | | | | | | | | | | | | | More efficient if all you want is the number of seconds. Change-Id: Ib57b52598e2f452985e9fffd145a371003ede342 Reviewed-by: Lorn Potter <lorn.potter@canonical.com>
* | | Retry failed sensor start once DBus service becomes availableJoona Petrell2016-07-282-3/+10
|/ / | | | | | | | | | | | | | | | | When sensorfw is restarting/recovering DBus service is momentarily not available. Give it another change once the service becomes registered. Change-Id: I6fd3e5985ac60cfffbc84ff86aabe9cebe110ab6 Reviewed-by: Lorn Potter <lorn.potter@canonical.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-0710-42/+41
|\| | | | | | | | | | | | | Conflicts: src/sensors/doc/src/compatmap.qdoc Change-Id: I7bd464cbd506f630798091fef3896050ade7b3f8
| * consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-02-2510-42/+41
| | | | | | | | | | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: Ia3c3f69505650fd35982fc76e385e744b877e4df Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7v5.7.0-alpha1Liang Qi2016-02-198-102/+158
|\| | | | | | | | | | | | | | | Conflicts: .qmake.conf src/sensors/doc/src/compatmap.qdoc Change-Id: I4049bc3c335a8a9db5c935032207d0bcfba78480
| * Make GenericTiltSensor::calibrate known to QMetaObjectv5.6.0-beta1Oliver Wolff2015-12-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | When using qml calibrating the tilt sensor does not work on WinRT and Windows Phone without this change. QmlTiltsensor::calibrate calls QTiltSensor::calibrate which calls QMetaObject::invokeMethod with "calibrate" on its backend. That causes the message "No such method QSensorBackend::calibrate()" without this change. Thus the meta system has to be made aware of that function. Change-Id: I539c0fb44e20fffb78bf515ba3767dafa3ce4ed6 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
| * winrt: Fix application hang on sensor start/stopOliver Wolff2015-12-037-101/+156
| | | | | | | | | | | | | | | | | | | | If addition and removal are not done in the Xaml thread, the functions might not return at all. Task-number: QTBUG-49741 Change-Id: Iabdea2c7ee18bf851ab70adfeb28b09781b8b609 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* | Updated license headersAntti Kokko2016-01-20136-1920/+2736
| | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Id129b1497aa9d61fd16332e3b324f28dcf7bdd5b Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-10-142-9/+14
|\| | | | | | | Change-Id: I4286dcb9262bf38960ff3852932012718aaa5d65
| * Fix registration of the ambient light sensor in the generic pluginAlexander Volkov2015-10-081-8/+12
| | | | | | | | | | | | | | | | | | | | | | It should be registered/unregistered depending on the availability of the default light sensor rather than the default accelerometer. Also mark the ambient light sensor as supported by the generic plugin in the documentation. Change-Id: Iff3828140b9549d994563fb736014091e568e867 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-021-1/+2
| |\ | | | | | | | | | Change-Id: Ic4c5a95a53ff695b879314cd2d6092bcbe427d94