Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-70830

setting QSensors data rate for Android has no effect

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.15.3
    • 5.12.0 Alpha
    • Sensors
    • None
    • Android

    Description

      Setting the data rate of a sensor has no effect for Android.

      According to this: https://developer.android.com/reference/android/hardware/SensorManager.html#registerListener(android.hardware.SensorEventListener,%20android.hardware.Sensor,%20int,%20int)

      Android expects the data rate to be in microseconds.

      I believe the reason for this bug is that QtSensors expects dataRate to be in Hz, and there is no conversion between the two.

      So, setting the dataRate of 2 Hz (2 times a second), actually sets the android sensor to 2 microseconds, where as it should be set to 500000 microseconds.

       

      This is probably a long standing bug that no one has reported.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lpotter Lorn Potter
            lpotter Lorn Potter
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes