This repository has been archived by the owner on May 3, 2022. It is now read-only.
Update to 0.11.8 & fix some sensor issues. #3
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use variadic macros to allow calls like: sensordLogT("foo=%d", bar); Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
Whether sensors should be started or stopped depends on a number of state variables. Using case specific conditionals at places where state variables might change makes the code fragile and hard to maintain. Separate sensor hal operations more clearly from logic and forms dictated by sensorfwd conventions. Use m_memberName naming convention for member variables, make all member data private and usable only via accessor functions. Use a single sensor start/stop policy evaluation function and call it from each place where relevant state variables might change. Use sensorfwd specific logging functions instead of qDebug etc. Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
Sensor specific adaptors derived from HybrisAdaptor class can be configured to enable/disable sensors directly via sysfs. While doing that they also bypass enable/disable policy that is implemented in HybrisAdaptor. Fix each HybrisXxxAdaptor class so that common policy logic is executed first, and direct sysfs manipulation is done based on policy decision. Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
It is possible that on-change type sensors are not reported by android hal until a change is actually detected. Sensorfwd is left using zero initialized default values like proximity=covered / light=darkness - which in turn can cause various issues after each bootup. As the initial state can't be queried, choose the lest harmful option and define fallback values during sensor hal probing: - proximity sensor = not covered - light sensor = 400 lux If no actual sensor data has been received in a situation where sensor state needs to be communicated to clients, apply the fallback value. Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
The code can't be compiled for devices that use older android hal versions that do not define all sensor types referred to in the code. Provide values for all sensor types that are not defined in the android header files. Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
Sensor maximum delay is available from sensors device API version 1.3 onwards. If development headers are too ancient, trying to access maxDelay member in sensor_t structure causes compilation failures. Use fallback value for maxDelay unless both development headers and sensors device exposed via hal indicate that sensors device API version 1.3 features are available. Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
It seems that in later android header versions sensor type values have been changed from #define constants into enumeration values. And while previously SENSOR_TYPE_MAGNETIC_FIELD was alias for SENSOR_TYPE_GEOMAGNETIC_FIELD, now it is the other way around. Which then has the net effect of: Attempt to provide fallback value for SENSOR_TYPE_MAGNETIC_FIELD with symbolic name results in compilation failures. Use hard-coded fallback values for both SENSOR_TYPE_GEOMAGNETIC_FIELD and SENSOR_TYPE_MAGNETIC_FIELD to break dependency on what types android header considers to be aliases vs not. Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
Sensorfwd crashes on exit in h3113 devices (Xperia XA2). This happens because of Config class related symbol name clash between sensorfwd and android dynamic loader / libhybris: Destructor from sensorfwd code base ends up used for cleaning up libhybris objects - which then leads to segfault. As runtime loader is what it is, rename "Config" class in sensorfwd to less generic "SensorFrameworkConfig". Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
… to JB#38578 Rename sensorfw-qt subpackage docs to doc and make packaging information more consistent with other packages. Signed-off-by: Tomi Leppänen <tomi.leppanen@jolla.com>
…es inside CompassFilter from int to qreal. Fixes MER#2016 Signed-off-by: Ivan Shchitov <ivan.shchitov@fruct.org>
Signed-off-by: Matti Kosola <matti.kosola@jolla.com>
Signed-off-by: Matti Kosola <matti.kosola@jolla.com>
Signed-off-by: Eugenio Paolantonio (g7) <me@medesimo.eu>
[iioadaptor] Allow overriding iioDevices' scaling factor. Fixes MER#2053
[packaging] Add missing debian build dependencies. Fixes MER#2060
As we try to build the hybris package (libsensorfw-qt5-hybris) bellow, we should also include the build dependencies that hybris requres.
…butes to JB#47166
…odel Integrate patches for dbus and systemd currently applied during build in LuneOS. As well as migration to webOS OSE's LS2 ACG model. Signed-off-by: Herman van Hazendonk <github.com@herrie.org>
This adds the missing iiosensorsadaptor plugin to the debian package
Remove not needed pro.user file. Fix a build warning. Add missing spec files to .pro file.
…ce. Fixes JB#48890 Fixes shutdown on some devices.
…mmon policy Sensor specific adaptors derived from HybrisAdaptor class can be configured to enable/disable sensors directly via sysfs. While doing that they also bypass enable/disable policy that is implemented in HybrisAdaptor. Fix each HybrisXxxAdaptor class so that common policy logic is executed first, and direct sysfs manipulation is done based on policy decision. Original patch from: https://git.sailfishos.org/mer-core/sensorfw/commit/ed38fb45ffe470dce63805909fb2ef0f38caaef6
Sensor specific adaptors derived from HybrisAdaptor class can be configured to enable/disable sensors directly via sysfs. While doing that they also bypass enable/disable policy that is implemented in HybrisAdaptor. Fix each HybrisXxxAdaptor class so that common policy logic is executed first, and direct sysfs manipulation is done based on policy decision. Original patch from: https://git.sailfishos.org/mer-core/sensorfw/commit/ed38fb45ffe470dce63805909fb2ef0f38caaef6
This fixes a problem on some platforms where when the wrist gesture sensor wouldn't fire when restarted.
This fixes a problem on some platforms where when the heart rate monitor wouldn't start reading when restarted.
Yay this is great :) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The hybris sensor manager was refactored in upstream. That fixes some potential issues (i.e. set delay based on min/max provided by Android, deactivates all sensors by default).
Also a 200ms delay is explicitly set for the heart rate sensor and the wrist gesture sensor (See: AsteroidOS/meta-sturgeon-hybris#6 and AsteroidOS/meta-sturgeon-hybris#7). This is needed for sturgeon. But I think it shouldn't break other platforms(hopefully).