summaryrefslogtreecommitdiffstats
path: root/src/plugins/sensors
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Use renamed qt6_add_plugin PLUGIN_TYPE optionAlexandru Croitor2021-08-107-7/+7
| | | | | | | | Task-number: QTBUG-95170 Change-Id: Ic988e041d899c3c50c72404c5511a0cb19932dfd Reviewed-by: Kai Koehne <kai.koehne@qt.io> (cherry picked from commit 00c295786711829ef2dcd821e22e17c9a731a670) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Don't give plugins PUBLIC usage requirementsCraig Scott2021-08-054-4/+4
| | | | | | | | Task-number: QTBUG-90819 Change-Id: I6390d42881e1038904d551f3d1db871eae303575 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 4686bb97ee8a7159f889e8957537f59d255937c2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove TI Sensor tag supportJuha Vuolle2021-06-2924-2203/+0
| | | | | | | | | | | | | | | | | The TI Sensor tag support is specific to a firmware version, and while it could be updated on an ongoing basis, there has not been expressed use for it beyond its initial use cases. As with Qt sensors in general, sensors and platforms can be later reintroduced without compatibility issues should such needs emerge. [ChangeLog][TI Sensor tag] Remove support Task-number: QTBUG-92512 Change-Id: I70c8514701787cc1d21195546a48b38d8009434f Reviewed-by: Lorn Potter <lorn.potter@gmail.com> (cherry picked from commit acd80292bb9a62105204f012cf70d56d8c4b9ada) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix compilation errors on sensortagsJuha Vuolle2021-06-041-7/+7
| | | | | | | | | | Additionally add find_package() for bluetooth to the top CMakeLists.txt Task-number: QTBUG-94209 Task-number: QTBUG-92502 Task-number: QTBUG-92509 Change-Id: Ied1730e6c3758b2734d8a25d1dcbc43236b997d2 Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
* Add Co(Un)Initialize call to windows backendJuha Vuolle2021-06-041-0/+10
| | | | | | | | | The sensors are accessed through the COM library which requires that the initialization routines are done. Task-number: QTBUG-92510 Change-Id: Idf65b0076432bebbab0de9f24b5e9711d471d193 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Add missed override markers to the SensorTag pluginAlexey Edelev2021-05-251-2/+2
| | | | | Change-Id: Iaf6367a8605a244762422da2d35011598c05f144 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Rename subclass static variable which shadowed baseclass methodJuha Vuolle2021-05-199-69/+67
| | | | | | | | | | | The 'type' static variable shadowed the 'QSensors::type()' method of the baseclass. While this is easy to workaround it is better to remove such naming clash. Task-number: QTBUG-60246 Change-Id: Id0ddae978377ea4d4d0202a572c554c2541f9364 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Android rotation sensor value and datarate fixJuha Vuolle2021-05-172-7/+37
| | | | | | | | | | | | | | There was a breaking change in Android rotation sensor handling in Qt 5.12.4 when migrating to NDK usage: -The unit conversion logic was not transferred as part of the migration. This task reintroduces the unit conversion part. -The datarate interval was misinterpreted as usec, whereas it is Hz Fixes: QTBUG-77423 Change-Id: Ibe51b3dea393e1cbe1502b5611c07f32024daf57 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit edf82b1d6dc7572da93bbdcd5b4ce46fa1dab2ad) Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Android: use new public jni apisAssam Boudjelthia2021-05-102-21/+28
| | | | | | | | | Replace use of QJNIObjectPrivate with QJniObject. Get context() and sdkVersion() from QNativeInterface::QAndroidApplication. Fixes: QTBUG-92550 Change-Id: I625b2269ef253e1a1f76f82edebac236de184c2c Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Disable PCH on iOS pluginJuha Vuolle2021-04-201-0/+5
| | | | | | | | | | | If a target inherits precompile headers from a different target that has more languages enabled (CXX, OBJCXX), the target will depend on PCH artifacts for a language that is not actually present. Task-number: QTBUG-92502 Change-Id: Ib8d27a63d3f6e0afeb55f4ce3988edd6c0b8ce81 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Compile-config test for winrtJuha Vuolle2021-04-202-2/+6
| | | | | | | | | | | | | While winrt as a "windows phone" is not supported anymore, the APIs are available on windows and can be supported where applicable (bluetooth, positioning, sensors, ...). This commit adds a configuration tests for the presence of these headers and libraries. Task-number: QTBUG-92502 Change-Id: Ia6dcb0a6b8ecdbcf1d1bcf79e42f95ace75f6657 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QtSensors initial cmake supportLorn Potter2021-04-1942-2004/+336
| | | | | | | | | | | | | | | | | This commit introduces the bare minimum cmake support that should unblock the CI and allow further verification and development on most platforms: macOS, Linux, Win, iOS and Android. Some clarifications: * The support for sensorfw backend is very preliminary and can be enabled later if needed (no Qt6 version of the sensorfw). * The simulator backend is dropped as obsolete / unnecessary. * Three examples are currently commented out and shall be ported with a later commit. Task-number: QTBUG-92502 Change-Id: Id523d43ed3ef177010dc73afc5812ed374cff0dd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Base commit to make QtSensors runnable on WindowsJuha Vuolle2021-04-1912-148/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | Fair amount of work remains after the commit still, but this should allow further development as a compilable baseline: code compiles, autotests pass, and most example applications at least start. The changes: -Change examples to use QtQuickControls 2 as per removal of v1 -Fix ambiguous conditional expression compilation error -Link against runtimeobject library (previously part of winrt QPA?) -Change the .pro file rule to win32 as winrt moniker does not exist anymore -Remove references to deleted winrt event dispatcher -Fix error handling: getdefault may be successful even if there is no default sensor -Fix QCOMPARE failure output (toString has changed in Qt6) -Remove qtimestamp alias which was deprecated already in Qt5 -Remove unit test hook that does not seem to be used anywhere -From typedef to ‘using’ for readability -Q_ENUMS -> Q_ENUM as the former has been obsoleted by the latter -Add qt6 changes qdoc page Task-number: QTBUG-88616 Change-Id: I92c168228ba76106b2c636c88f54331c76c3d2e6 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QAtomicInt load() and store() are removed in Qt6, change to *Relaxed()Juha Vuolle2020-12-171-2/+2
| | | | | | Change-Id: I719afb5243a6e4e8d54a7f82a74a0c6bf0207c98 Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Use QList instead of QVectorJarek Kobus2020-06-258-20/+19
| | | | | | | Task-number: QTBUG-84469 Change-Id: I4ef3c22412f5978b3474c0ccd90bae08fd7f1297 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-223-10/+21
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ia190d8f7448766e964472599dc1adf5c6f0eabd7
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-111-3/+9
| |\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ic691e11af371acfb7706ee218665fb5a9f96a9c3
| | * Android: Don't crash for unsupported accelerometer modeKai Pastor2019-07-031-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | According to documentation, changing the mode shall have no effect when the device does not support a particular mode. Task-number: QTBUG-76862 Change-Id: I805daa3a3f659e8aed25e4b7b6531f804dd654b2 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-271-1/+1
| |\ \ | | |/ | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ib6ec0928ab14e075b35648ce0da4efc293be9c94
| | * fix typo that breaks android buildLorn Potter2019-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-76384 Change-Id: Ib1977ea1371e3a82ca14d1c7c450984fa40cd71d Reviewed-by: Vyacheslav Koscheev <vok1980@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-111-6/+11
| |\ \ | | |/ | | | | | | Change-Id: I71deece5315cb9b29bd9bc72c3198c80c9d14442
| | * Do not register iio sensors if the dbus service is not foundLorn Potter2019-05-081-6/+11
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-74905 Change-Id: I78ca045d2723fa47dc2d0f9cc559320be84e5f32 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | Remove usages of deprecated APIs from QDateTimeSona Kurazyan2019-06-277-14/+14
|/ / | | | | | | | | | | | | | | | | | | | | | | - Replaced QTime by QElapsedTimer, because of the usage of QTime::start() and QTime::elapsed() methods, which are deprecated. - Replaced the deprecated QDateTime::toTime_t() with QDateTime::toSecsSinceEpoch(). Task-number: QTBUG-76491 Change-Id: I625ce6bbc2718cd3c1b4905fecef9d75fdbab618 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | 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-066-31/+23
|/ | | | | | | | | 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-1264-166/+226
|\ | | | | | | | | | | | | Conflicts: src/plugins/sensors/ios/ios.pro Change-Id: I8d9ca692713c8ba5d8c243371474b0e61630b05e
| * Replace Q_DECL_OVERRIDE by overrideAlexander Volkov2016-12-0252-127/+127
| | | | | | | | | | | | | | '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>