On 13/09/16 18:50, Jonathan Cameron wrote: > On 13/09/16 18:30, Ritesh Raj Sarraf wrote: >> Hello Srinivas and Others, >> >> [Please CC me in replies. I'm not subscribed to the list] >> >> This email is in regard to an odd behavior, we seems to have discovered with >> iio-sensor-proxy version 1.2 and the iio driver in Linux, maybe particular to >> the following driver. >> >> >> rrs@learner:~$ lsusb >> Bus 003 Device 002: ID 8087:8000 Intel Corp. >> Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub >> Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub >> Bus 001 Device 006: ID 048d:8350 Integrated Technology Express, Inc. >> Bus 001 Device 005: ID 0bda:b728 Realtek Semiconductor Corp. >> Bus 001 Device 004: ID 04f2:b40f Chicony Electronics Co., Ltd >> Bus 001 Device 003: ID 04f3:0303 Elan Microelectronics Corp. >> Bus 001 Device 002: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader >> Controller >> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub >> 2016-09-13 / 22:56:58 ♒♒♒ ☺ >> >> >> rrs@learner:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-8/1- >> 8:1.0/0003:048D:8350.0002/HID-SENSOR-200073.4.auto$ find iio\:device2/ -iname >> "*scale*" -print -exec cat '{}' \; >> iio:device2/in_accel_scale >> 0.009806 > Looking at your bug report, raw readings are around magnitude 1000. > 1000*0.009806 = 9.81 > > Given accelerations in IIO are in m/s^2 I'm slightly confused... > > Guessing the iio-sensor-proxy might be getting it's idea of what counts > as orientation from the wrong place? > > I couldn't immediately see where it figures that out... Ah, found it. In orientation.c (obvious I guess) Too late in the day here for me to spot exactly why the rounding errors being introduced are resulting in this concluding that the orientation isn't changing significantly. Perhaps stick a line in the sensor proxy to spit out the computed 'rotation' value? Thanks, Jonathan > > Jonathan > >> 2016-09-13 / 22:37:29 ♒♒♒ ☺ >> >> >> Machine: Lenovo Yoga 2 13. >> >> >> For a background, please have a look at the github bug report. >> https://github.com/hadess/iio-sensor-proxy/issues/100 >> >> >> If you need any information, please let me know. I'm not sure what other >> information to provide upfront, that maybe be relevant. >> >> >> > -- > To unsubscribe from this list: send the line "unsubscribe linux-iio" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html