All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: rrs@researchut.com, linux-iio@vger.kernel.org,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Bastien Nocera <hadess@hadess.net>
Subject: Re: possible odd acceleration scaling
Date: Tue, 13 Sep 2016 19:01:31 +0100	[thread overview]
Message-ID: <d275ff67-4335-a6f4-b60b-c4227a59b34c@kernel.org> (raw)
In-Reply-To: <a9078c9f-0d07-35bc-e449-2cfeee7b7987@kernel.org>

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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


  reply	other threads:[~2016-09-13 18:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-13 17:30 possible odd acceleration scaling Ritesh Raj Sarraf
2016-09-13 17:50 ` Jonathan Cameron
2016-09-13 18:01   ` Jonathan Cameron [this message]
2016-09-13 19:06     ` Srinivas Pandruvada
2016-09-14  9:05       ` Ritesh Raj Sarraf
2016-09-14  9:28         ` Ritesh Raj Sarraf
2016-09-14 13:50           ` Ritesh Raj Sarraf
2016-09-14 15:28             ` Srinivas Pandruvada
2016-09-14 15:44               ` Bastien Nocera
2016-09-14 16:00                 ` Ritesh Raj Sarraf
2016-09-16 17:43                   ` Srinivas Pandruvada
2016-09-16 18:26                     ` Ritesh Raj Sarraf
2016-09-16 18:35                       ` Ritesh Raj Sarraf
2016-09-16 19:31                         ` Srinivas Pandruvada
2016-09-16 19:40                           ` Pandruvada, Srinivas
2016-09-16 21:19                             ` Bastien Nocera
2016-09-16 22:30                               ` Pandruvada, Srinivas
2016-09-16 22:51                                 ` Bastien Nocera
2016-09-14 11:34   ` Bastien Nocera

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d275ff67-4335-a6f4-b60b-c4227a59b34c@kernel.org \
    --to=jic23@kernel.org \
    --cc=hadess@hadess.net \
    --cc=linux-iio@vger.kernel.org \
    --cc=rrs@researchut.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.