I am working on a project which needs to monitor the sensor readings on the
I have a moto 360 (1st gen) and a samsung galaxy gear.
My code used to work well, reading the sensor readings (mostly the accelerometer
and gyrometer) from both the two watches. But all of a sudden, the moto 360
begins to malfunction by reporting very small values (10e-4 ~ 10e-7 rad/s),
which hardly change even if I shake or rotate the watch like crazy.
After a long time of debugging, or testing I'd rather say since the same code
works perfectly on the samsung gear, I found that the gyroscope will
malfunction when the sampling rate is set to be slower than (including)
SENSOR_DELAY_UI. The weird part is, other sensors such as the accelerometer
and rotation sensor work normally no matter what sampling rate is used.
The workaround is straightforward: set the sampling rate to be at least as fast
as SENSOR_DELAY_GAME. Here comes another weird part, setting the sampling rate
of the gyrometer alone to faster than SENSOR_DELAY_GAME will not solve the
problem, all the other registered sensors also have to use higher sampling rate.
Apparently, for many applications, this workaround leads to too much data
processing overhead, and you may have to manually downsample the data right
after they are reported (and yes, it is stupid).
Hope this helps if somebody is running into the same problem.
Some info about my moto 360:
Build number: MEC23I
Android Wear: 22.214.171.12480363
Google Play services: 8.7.03 (2645110-534)
Android OS: 6.0.1
23 Apr 2016
23 Apr 2016