Gyroscope isn't supported

Bug #1398806 reported by Michael Sheldon
46
This bug affects 10 people
Affects Status Importance Assigned to Milestone
qtubuntu-sensors
In Progress
Medium
Gerry Boland

Bug Description

The current back-end being used for QtSensors doesn't support the Gyroscope sensor found in most modern phones (including krillin and mako). Gyroscope readings are needed for most virtual reality and augmented reality applications, as well as being useful for games using device movement for input.

Steps to reproduce:

1) Run following QML:

import QtSensors 5.0
import Ubuntu.Components 1.1

MainView {
        Gyroscope {
            active: true
            onReadingChanged: {
                console.log("Reading: " + reading.x + ", " + reading.y + ", " + reading.z);
            }
        }
}

Expected result:

 Gyroscope readings should be output on the console

Actual result:

 No output.

Related branches

description: updated
Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

It might be worth looking at switching the backend to sensorfw as this has much better support than the generic backend (which only supports accelerometers and nothing else), Mer already has a hybris based sensorfw implementation: https://github.com/mer-hybris/sensorfw

Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Actually that link should probably be: https://github.com/mer-packages/sensorfw for the most recent version

Revision history for this message
Lorn Potter (lorn-potter) wrote :

Not just gyroscope is missing.

Since the android sensord is already running, I would agree that it makes more sense to switch to use sensorfw, but I am biased since I maintain it and wrote that hybris backend. :)
It's not perfect and has known bugs, but works for most android based sensors.

Sensorfw lacks debian packing at the moment.

Revision history for this message
Lorn Potter (lorn-potter) wrote :

https://github.com/mer-packages/sensorfw/pull/44

Re-adds debian packaging to sensorfw, and builds hybris support package.

Revision history for this message
Lorn Potter (lorn-potter) wrote :

Of course, sensord conflicts with lm-sensors daemon, so I changed the name of sensorfw daemon

https://github.com/mer-packages/sensorfw/pull/46

Revision history for this message
Lorn Potter (lorn-potter) wrote :

@Michael Having looked into sensors stack on Ubuntu more, for hybris platforms, the platform-api reads from androids SensorManager, which is a better way to read sensors than directly through libhardware, as SensorManager provides virtual sensors in addition to actual sensors.

This probably mainly effects the compass, which is actually a virtual sensor that includes magnetometer, accelerometer and/or gyroscope. The implementation of compass sensor in sensorfw works in a pinch, but the implementation in SensorManager is more robust.

I am ok with the current sensors stack in ubuntu. It simply lacks implentation of certain Qt sensors, and gyroscope is one of them.

Gerry Boland (gerboland)
Changed in qtubuntu-sensors:
assignee: nobody → Gerry Boland (gerboland)
importance: Undecided → Medium
status: New → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.