summaryrefslogtreecommitdiffstats
path: root/src/plugins/sensors/sensorfw
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Use renamed qt6_add_plugin PLUGIN_TYPE optionAlexandru Croitor2021-08-101-1/+1
| | | | | | | | 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>
* Rename subclass static variable which shadowed baseclass methodJuha Vuolle2021-05-191-4/+3
| | | | | | | | | | | 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>
* QtSensors initial cmake supportLorn Potter2021-04-193-17/+37
| | | | | | | | | | | | | | | | | 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>
* 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>
* 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>
* Add missing override and remove redundant virtualAlexander Volkov2017-11-141-2/+2
| | | | | Change-Id: I51c0fc424f44ae68c3c1c4cf6377e7701ee5a0dd 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>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-1215-44/+42
|\ | | | | | | | | | | | | Conflicts: src/plugins/sensors/ios/ios.pro Change-Id: I8d9ca692713c8ba5d8c243371474b0e61630b05e
| * Replace Q_DECL_OVERRIDE by overrideAlexander Volkov2016-12-0212-38/+38
| | | | | | | | | | | | | | '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-262-2/+2
| |\ | | | | | | | | | Change-Id: I912756c6bbecf7c55acd60d136ea6ce490118ebb
| | * 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-071-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | [ChangeLog][QtSensors][QSensor] Add new sensor: lidsensorLorn Potter2016-11-215-1/+168
|/ / | | | | | | | | Change-Id: I57123eed34ee4618f1cba643c2ce49c8c621a6cd 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-071-4/+4
|\ | | | | | | | | | | | | Conflicts: src/sensors/doc/src/compatmap.qdoc Change-Id: I7bd464cbd506f630798091fef3896050ade7b3f8
| * consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-02-251-4/+4
| | | | | | | | | | | | | | | | 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>
* | Updated license headersAntti Kokko2016-01-2025-350/+500
|/ | | | | | | | | | 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>
* Only register plugins that sensorfw plugin can instantiateLorn Potter2015-09-071-1/+2
| | | | | | | | This makes it possible to use Tilt sensor from generic plugin. Task-number: QTBUG-47854 Change-Id: I14883e8d4a18a56c52845a4a5172c8c46bfe385f Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-05-291-0/+1
|\ | | | | | | Change-Id: Icc01abe0bc7368455527b5f4b5299b4cb9f2b177
| * Fix clients starting sensors when sensorfw restarts.5.4Lorn Potter2015-05-281-0/+1
| | | | | | | | | | | | Task-number: QTBUG-45516 Change-Id: I45215714e8f5e4693e43d022a3ca313576c85d79 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-04-152-4/+5
|\| | | | | | | Change-Id: I06a505894844bfd17eb07106bed0c07ca2f9f79c
| * Fix double negative values, sensorfw already transforms the accel values.Lorn Potter2015-04-131-3/+3
| | | | | | | | | | | | | | | | No need to use a double negative in the chain of data to arrive at the correct values. Change-Id: I694037bb7f83083d3d281ec9544d7fa300861f1a Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * Fix crash in QtSensors client, when sensorfwd is not running.Lorn Potter2015-04-021-1/+2
| | | | | | | | | | Change-Id: Iecb6fe8637001d3005aa04c58d1d888f534c5082 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Merge remote-tracking branch 'gerrit/5.4' into 5.5Alex Blasche2015-04-012-0/+29
|\| | | | | | | Change-Id: If6f44fe2cd69bae92cddd4682e952f2528b85184
| * add dynamic alwaysOn support for sensorfw backendLorn Potter2015-03-192-0/+29
| | | | | | | | | | Change-Id: Ibb4d335ff43a91f84f346ab32847ab376830ed35 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5v5.5.0-alpha1Frederik Gladhorn2015-02-241-3/+3
|\| | | | | | | Change-Id: I7b64e129ef941420378cda207f5fdf90efe4c463
| * Make sensorfw als values the common standard for QtSensors pluginsLorn Potter2015-02-241-3/+3
| | | | | | | | | | Change-Id: I69d15c8af9b6e5acde9d86e185395590369baab6 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Update copyright headersJani Heikkinen2015-02-1725-175/+175
|/ | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I141862df4ed2475c05ebbeb8fe447c4a6e736849 Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
* Update license headers and add new licensesJani Heikkinen2014-08-2425-475/+275
| | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I99c601a398559886c2900f3e04833acfceba8263 Reviewed-by: Antti Kokko <antti.kokko@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-08-1219-72/+160
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/sensors/sensorfw/sensorfwproximitysensor.cpp src/sensors/qcompass.cpp Change-Id: Idfcbbfe1757a4b827663453abc27f4026cd3d752
| * Restore setting of sensors interface.Robin Burchell2014-07-171-0/+4
| | | | | | | | | | | | | | | | Change I5c1bf3999ad2268c0dba9b3fe511d999c2e63fd9's forward porting from Qt 5.1 removed this, thus the interface was never set, thus sensors all broke. Change-Id: If3b14b5ebd20e6cb64bc2000b23a2c1e37d36b05 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * Series of crash fixes from Mer, squashedLorn Potter2014-07-1013-76/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1)tracing plugin loading 2)m_remoteSensorManager can be nullptr But it seems it does not solve incorrect initialization in the case manager interface is nullptr: init() for different sensors does not check initDone 3)split initSensor() to template function and function most of initSensor() does not depend on template param, so it is better to split it -> less code should be generated 4)do not use sensor manager if it is invalid 5)correct class members initialization order 6)assert sensor interface is not null From what I saw according to logic it should not happen so using Q_ASSERT for better maintainability 7)check local interface pointer in SensorfwTapSensor::start() Signed-off-by: Denis Zalevskiy <denis.zalevskiy@jolla.com> Change-Id: I5c1bf3999ad2268c0dba9b3fe511d999c2e63fd9 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * [sensorfw] need to run init after sensord has been restartedLorn Potter2014-07-1019-0/+63
| | | | | | | | | | | | | | This ensures things are setup and work properly. Change-Id: I23c8b53e760d49695c5ae207eed77a2e7d2be3a4 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | send first proximity signal even when it's "closed".Lorn Potter2014-05-202-10/+7
|/ | | | | | | | This fixes a bug where the proximity sensor would send the initial signal only when it was not closed. This will send it regardless. Change-Id: I5f388e671091ae2a7719f700a049cea41bfaa0db Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* 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>
* Normalize signal & slot signatures in connectionThiago Macieira2014-02-0311-24/+24
| | | | | | | Profiling shows Qt Creator spends 2% of its load time normalizing Change-Id: I462d0e0b603ab644e57c5b804015508abeebdc6e Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Use correct method signature for slots.old/5.2Michael Brasser2014-01-161-2/+2
| | | | | | Change-Id: I09b5df218ad22afefe8a615c80585aa3fb46006f Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Make QtSensors use Q_DECL_OVERRIDESamuel Gaist2013-11-1912-43/+43
| | | | | | | | | This patch aims to make QtSensors uses Q_DECL_OVERRIDE uniformly across the module Task-number: QTBUG-27392 Change-Id: I5f814f93307159175f92e29a9990587c03cce96f Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* make sensorfw plugin handle the sensord restarting.Lorn Potter2013-10-2325-74/+182
| | | | | | | | | | This way, clients that are connected will continue to receive updates after the sensord has restarted, without the need to restart the sensor. Task-number: QTBUG-34050 Change-Id: I4a8fbca189764cf23a1453feae5c1fd9ed6911e7 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* 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>
* 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>
* add sensorfw based sensor pluginLorn Potter2013-03-0529-0/+2335
ported from qtmobility. Change-Id: Ia4ee6e2b7ecbc441c5f6605f1bbabfec22ddcd09 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>