{"action":"created","issue":{"url":"https://api.github.com/repos/OSVR/OSVR-Leap-Motion/issues/9","labels_url":"https://api.github.com/repos/OSVR/OSVR-Leap-Motion/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/OSVR/OSVR-Leap-Motion/issues/9/comments","events_url":"https://api.github.com/repos/OSVR/OSVR-Leap-Motion/issues/9/events","html_url":"https://github.com/OSVR/OSVR-Leap-Motion/issues/9","id":109189803,"number":9,"title":"Incorrect analog values","user":{"login":"zachkinstner","id":3940764,"avatar_url":"https://avatars.githubusercontent.com/u/3940764?v=3","gravatar_id":"","url":"https://api.github.com/users/zachkinstner","html_url":"https://github.com/zachkinstner","followers_url":"https://api.github.com/users/zachkinstner/followers","following_url":"https://api.github.com/users/zachkinstner/following{/other_user}","gists_url":"https://api.github.com/users/zachkinstner/gists{/gist_id}","starred_url":"https://api.github.com/users/zachkinstner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zachkinstner/subscriptions","organizations_url":"https://api.github.com/users/zachkinstner/orgs","repos_url":"https://api.github.com/users/zachkinstner/repos","events_url":"https://api.github.com/users/zachkinstner/events{/privacy}","received_events_url":"https://api.github.com/users/zachkinstner/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OSVR/OSVR-Leap-Motion/labels/external%20dependency","name":"external dependency","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-30T22:07:50Z","updated_at":"2015-09-30T22:16:19Z","closed_at":null,"body":"The analog values being sent through OSVR to Unity are incorrect. The behavior that I see is that all analog channels report the same value. My test Unity client [obtains analog values](https://github.com/OSVR/OSVR-Leap-Motion/blob/master/TestUnityClient/LeapAnalogs.cs#L64) each frame via `AnalogInterface.GetState().Value`. \r\n\r\nFortunately, there's a good clue. The _last_ value in the device plugin's analog list happens to be a rather distinct/recognizable number (a \"palm width\" value). It's this value that all analog channels report in Unity.\r\n\r\nI can reproduce this, to a certain extent, with `AnalogCallback_cpp.exe`. In my local build, I have mapped `semantic/arms/right/hand/grabStrength` to the `/controller/left/trigger` alias. I would expect to _only_ see that \"grabStrength\" value in the `AnalogCallback_cpp.exe` output. However, the output shows _all_ the analog values. I suspect that, somehow, all the analog values are being sent to each channel, and the last value (the \"palm width\" in this scenario) is the one that gets sent to Unity.\r\n\r\nI'm currently using `OSVR-Core-Snapshot-v0.2-772-gdf65c03-build155-vs12-32bit` and `OSVR-Unity-v0.2-122-g2ff3c40-with-core-v0.2-772-gdf65c03-build193`. The device plugin [sends the list of analog values](https://github.com/OSVR/OSVR-Leap-Motion/blob/master/Analog.cpp#L60) via `osvrDeviceAnalogSetValues()`.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/OSVR/OSVR-Leap-Motion/issues/comments/144559813","html_url":"https://github.com/OSVR/OSVR-Leap-Motion/issues/9#issuecomment-144559813","issue_url":"https://api.github.com/repos/OSVR/OSVR-Leap-Motion/issues/9","id":144559813,"user":{"login":"zachkinstner","id":3940764,"avatar_url":"https://avatars.githubusercontent.com/u/3940764?v=3","gravatar_id":"","url":"https://api.github.com/users/zachkinstner","html_url":"https://github.com/zachkinstner","followers_url":"https://api.github.com/users/zachkinstner/followers","following_url":"https://api.github.com/users/zachkinstner/following{/other_user}","gists_url":"https://api.github.com/users/zachkinstner/gists{/gist_id}","starred_url":"https://api.github.com/users/zachkinstner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zachkinstner/subscriptions","organizations_url":"https://api.github.com/users/zachkinstner/orgs","repos_url":"https://api.github.com/users/zachkinstner/repos","events_url":"https://api.github.com/users/zachkinstner/events{/privacy}","received_events_url":"https://api.github.com/users/zachkinstner/received_events","type":"User","site_admin":false},"created_at":"2015-09-30T22:16:19Z","updated_at":"2015-09-30T22:16:19Z","body":"The behavior is the same if the device plugin sends the analog values individually ([in a loop](https://github.com/OSVR/OSVR-Leap-Motion/blob/master/Analog.cpp#L62)) using `osvrDeviceAnalogSetValue()`.\r\n\r\nWithin the device plugin, I can confirm the list of analog values is correct within via [this debugging output](https://github.com/OSVR/OSVR-Leap-Motion/blob/master/Analog.cpp#L45).\r\n\r\nThe analog values were working correctly prior to my latest OSVR upgrade. I was previously using `OSVR-Core-Snapshot-v0.2-705-g533991b-build147-vs12-32bit` and the corresponding Unity client. My test client was successfully using/testing the analog values by connecting the \"grabStrength\" value to the [scale of the boxes](https://github.com/OSVR/OSVR-Leap-Motion/blob/master/TestUnityClient/LeapBones.cs#L77) in the scene."}}