Orientation sensor's reading invalid until device is rotated

Bug #1429865 reported by Florian Boucault
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
qtubuntu-sensors
New
Undecided
Unassigned

Bug Description

OrientationSensor.reading.orientation returns an invalid value until the device is rotated.

Sample program:

OrientationSensor {
    id: orientationSensor
    active: true
    onReadingChanged: {
        print("ORIENTATION SENSOR READING CHANGED", reading.orientation)
    }
    Component.onCompleted: print("ORIENTATION SENSOR COMPLETED", orientationSensor.reading.orientation)
}

Output at startup:
qml: ORIENTATION SENSOR COMPLETED 1701602659

Output after rotating the device back and forth:
qml: ORIENTATION SENSOR READING CHANGED 4
qml: ORIENTATION SENSOR READING CHANGED 1

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.