SensorApps / Sensors2OSC

Android app for sending sensor data via Open Sound Control (OSC).
http://sensors2.org/osc
Other
67 stars 19 forks source link

Most sensors listed twice #17

Closed mxa closed 6 years ago

mxa commented 7 years ago

It appears as all sensors are listed twice with Sensors2OSC 0.2.0. See screenshots and note the faint scrollbar position on the right.

photo_2017-07-12_18-14-46 photo_2017-07-12_18-13-28

residuum commented 7 years ago

It looks like only some sensors are reported twice. Do they appear twice in the help screen as well?

What is your device and Android version?

mxa commented 7 years ago

Here is the complete list. Phone is a Sony Xperia Z3+. Emphasis mine to show the double listed items.

nfc (only appears when switched on and app is launched afterwards) acceleration magneticfield magneticfielduncalibrated gyroscope gyroscopeuncalibrated proximity light pressure accelerometer magneticfield magneticfielduncalibrated gyroscope gyroscopeuncalibrated proximity light pressure gravity linearacceleration rotationvector georotationvector orientation tiltdetector gravity linearacceleration rotationvector georotationvector orientation stepcounter stepdetector significantmotion gamerotationvector stepcounter stepdetector gamerotationvector

In the help section it says my phone has 34 available sensors. The ones that are listed twice have the suffix -WAKEUP SECONDARY

residuum commented 7 years ago

OK, I have found this and will try to fix that:

The list of all sensors present on the device is reported by the HAL implementation.

  • There can be several sensors of the same type. For example, two proximity sensors or two accelerometers.
  • The vast majority of applications request only a single sensor of a given type. For example, an application requesting the default accelerometer will get the first accelerometer in the list.
  • Sensors are often defined by wake-up and non-wake-up pairs, both sensors sharing the same type, but differing by their wake-up characteristic.

https://source.android.com/devices/sensors/

residuum commented 6 years ago

I have no device with more than one sensor of a type, but it should be fixed now. Can you verify it?

mxa commented 6 years ago

I will test this as soon as an update propagates through f-droid, ok?

residuum commented 6 years ago

I'd rather have you test it before, as I am unable to test the fix. I will send you a test build.

mxa commented 6 years ago

Can confirm that sensors are now listed only once.