-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
None
-
5.1.1
-
None
-
Linux
Try to run the following code on linuxsysaccelerometer sensor backend (noticed this issue while implementing my own sensor backend) and observe that "minimum" and "maximum" values both return 100, when they are defined as:
LinuxSysAccelerometer::LinuxSysAccelerometer(QSensor *sensor)
: QSensorBackend(sensor)
, m_timerid(0)
, path(QString())
, divisor(0)
, delimiter(QString())
{
setReading<QAccelerometerReading>(&m_reading);
addDataRate(1, 100); // 100Hz
More serious issue is that it crashes when calling: console.log(acc1.availableDataRates.length)
Accelerometer { id : acc1 active: true Component.onCompleted: { console.log(acc1.availableDataRates[0].minimum) // 100 - should be 1 console.log(acc1.availableDataRates[0].maximum) // 100 console.log(acc1.availableDataRates.length) // crash } }
On my own sensor backend the crash is reproducible even when calling:
console.log(acc1.availableDataRates[0].minimum)
- relates to
-
QTBUG-27082 calling dataRate should give hardware rate
-
- Reported
-