Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[hybrisadaptor] Refactor sensor start/stop logic
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>
- Loading branch information