Sony SmartWatch 3 (SWR50) no longer returns Sensor.TYPE_LINEAR_ACCELERATION

你说的曾经没有我的故事 提交于 2019-12-24 03:14:57

问题


I am writing an application which uses the Sensor.TYPE_LINEAR_ACCELERATION.

mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_LINEAR_ACCELERATION);

This was working up until recently however each SensorEvent now returns a values float array containing: NaN, NaN, NaN.

I have tried the same code on an LG watch and it is returning values as I would expect.

The versions of software on the SWR50 are:

Android Wear 1.1.1.1929530

Google Play services 7.5.71 (1955121-534)

Android OS 5.1.1

Note that the Sensor.TYPE_ACCELEROMETER returns values (which was confirmed in the Manufacturer (Menu-Launcher) app in the developer options) so the accelerometer doesn't appear to be broken.

Can anyone from Sony confirm this issue? Otherwise maybe I need to get a new watch if it is broken.


回答1:


Sounds strange that it would just stop working all of a sudden.

  1. Did you install any firmware updates recently?
  2. Have you tried power cycling the watch?
  3. Have you tried doing a factory reset?



回答2:


So it looks like the Sensor.TYPE_GRAVITY is the issue. It returns valid results after a reboot and then the next time I run the app it returns NaNs. Presumably LINEAR_ACCELERATION is using the gravity vector to calculate this.

If I had to guess I would say some spurious value is being put into the low pass filter that is calculating the gravity vector and once that happens it will never recover.

I guess if it is a random value that is being added then occasionally it might be valid which is why occasionally it seems to work.

I guess the work-around is to read the Sensor.TYPE_ACCELEROMETER values instead and do the low pass filtering to work out gravity.




回答3:


I upgraded my Sony smart-watch-3 SWR50 firmware to following and my application is no more getting callbacks from Sensor.TYPE_LINEAR_ACCELERATION.

Android Wear 1.4.0.2715035

Google Play services 8.7.02 (2624717-534)

Android OS 6.0.1

Build Number: MEC24H



来源:https://stackoverflow.com/questions/30855269/sony-smartwatch-3-swr50-no-longer-returns-sensor-type-linear-acceleration

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