Sony Smartwatch SW2 - accelerometer output rate

微笑、不失礼 提交于 2019-12-10 00:30:33

问题


From the sample code of the SDK, I can read the accelerometer at 4-5Hz by using:

registerListener(listener, Sensor.SensorRates.SENSOR_DELAY_FASTEST, Sensor.SensorInterruptMode.SENSOR_INTERRUPT_ENABLED);

but it does not work when using registerFixedRateListener(). How to read accelerometer data from SW2 with higher rate? for example 10Hz, 20Hz...

Thanks.


回答1:


I'm able to read values on my SW 2 at 10Hz with disabled interrupts using

sensor.registerFixedRateListener(mListener, Sensor.SensorRates.SENSOR_DELAY_FASTEST);

However, 10 Hz seems to be the limit.



来源:https://stackoverflow.com/questions/19817072/sony-smartwatch-sw2-accelerometer-output-rate

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!