1. 28 Feb, 2019 2 commits
  2. 25 Feb, 2019 1 commit
  3. 22 Feb, 2019 1 commit
  4. 07 Feb, 2019 1 commit
  5. 15 Jan, 2019 2 commits
  6. 11 Jan, 2019 1 commit
  7. 08 Nov, 2018 2 commits
  8. 07 Nov, 2018 1 commit
  9. 01 Oct, 2018 6 commits
  10. 28 Sep, 2018 5 commits
  11. 27 Sep, 2018 3 commits
    • spiiroin's avatar
      [hybrisadaptor] Provide fallback values for select sensors. JB#43020 · a997710c
      spiiroin authored
      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: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
      a997710c
    • spiiroin's avatar
      [hybrisadaptor] Subject sensor type specific actions to common policy · ed38fb45
      spiiroin authored
      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: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
      ed38fb45
    • spiiroin's avatar
      [hybrisadaptor] Refactor sensor start/stop logic · 8fab5538
      spiiroin authored
      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: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
      8fab5538
  12. 26 Sep, 2018 1 commit
  13. 27 Jun, 2018 2 commits
  14. 26 Jun, 2018 2 commits
  15. 19 Jun, 2018 4 commits
  16. 01 Jun, 2018 2 commits
  17. 29 May, 2018 4 commits
    • spiiroin's avatar
      [nodebase] Emit debug logging if stub methods are reached · 4a34bdb3
      spiiroin authored
      Classes that inherit NodeBase should provide actual implementation
      for sensor specific setter/getter methods. To ease debugging make
      it visible when/if the default virtual stub methods get called.
      Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
      4a34bdb3
    • spiiroin's avatar
      [hybrisadaptor] Use pthreads for hybris reader · 38ed4f8e
      spiiroin authored
      An attempt is made to start/stop android sensor hal event reader during
      runtime based on whether at least one sensor is activated via hal or
      not - this which is a bit useless to start with (the thread would just
      block while all sensors are deactivated), the stopping does not actually
      work - which causes segfault during cleanup if orderly exit is attempted.
      
      Use posix thread API instead of QThread as it gives more fine grained
      control over asynchronous cancellation and posix signal blocking.
      
      Start thread on sensord startup, cancel it when sensord is exiting.
      Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
      38ed4f8e
    • spiiroin's avatar
      [sensord] Use pipe to trasfer posix signals to mainloop · d72f6f87
      spiiroin authored
      Sensord does async signal unsafe operations from posix signal handlers.
      
      Use pipe and QSocketNotifier() to transfer async signals from signal
      handler context to qt mainloop.
      Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
      d72f6f87
    • spiiroin's avatar
      [sensormanager] Add plugin availability config and D-Bus queries. JB#41369 · 8cf47d1f
      spiiroin authored
      Allow disabling / enabling sensors plugins via config entries like:
      
        [available]
        proximitysensor=True
        magnetometersensor=False
        lidsensor=Feature_CoverSensor
        orientationsensor=Feature_GyroSensor|Feature_AccelerationSensor
      
      Where:
      - "True" means that loading of the sensor plugin is made available
        via D-Bus interface and can be loaded.
      - "False" means the plugin will not be loaded and sensor is not
        made available via D-Bus
      - "Feature_*" means that sensor availability is checked from hw
        settings. If sensorfwd is compiled without ssu-sysinfo support
        these will be treated similarly to "True".
      - "" (or plugin that does not have config entry) is taken as "True",
        but a warning is logged in case of sensor plugins.
      
      If a plugin that is enabled in configuration fails to load, it is
      marked as not available until sensorfwd restart.
      
      Add new D-Bus method calls:
      - availablePlugins() lists all available plugins
      - availableSensorPlugins() lists available sensor plugins (which,
        when loaded, make new sensor objects and interfaces available)
      - pluginAvailable(name) can be used to check whether a named plugin
        is installed and available
      
      Package default sensor availability configuration file that disables
      all sensors except those that can be evaluated based on the hw
      settings configuration.
      
      Add example of device specific configuration file - these should be
      installed from hw adaptation packages and can override the defaults.
      Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
      8cf47d1f