Re: Handling of non-positional data through evdev
From: Roderick Colenbrander <hidden>
Date: 2016-03-16 20:32:45
On Wed, Mar 16, 2016 at 12:09 PM, Clément VUCHENER [off-list ref] wrote:
2016-03-16 16:26 GMT+01:00 David Herrmann [off-list ref]:quoted
Hi On Wed, Mar 16, 2016 at 4:10 PM, Bastien Nocera [off-list ref] wrote:quoted
On Tue, 2016-03-15 at 17:17 -0700, Roderick Colenbrander wrote:quoted
Hi Bastien, Thanks for providing this suggestion. I can see this approach work for situations like screen rotation on tablets. The device I'm involved with is an input device, which needs a high poll rate for acceleration / velocity and needs to be paired with the button / axes data. Evdev would be most appropriate.So more like a Wiimote than a builtin sensor. What will consume events in user-space? A specialised application?I really think evdev is the right place to put any of those devices. The real problem is that the current set of ABS types is very limited and strongly overloaded. We didn't do this for other types, but somehow ABS turned out that way. In general, Dmitry was ok with introducing new ABS types, properly representing those types. I sent an RFC some years ago, which also introduces gyro and accelerometer types (see patch #4): https://lists.freedesktop.org/archives/input-tools/2013-December/000612.html The problem is, however, that the current ABS_* namespace is exhausted. That is, we have to introduce some new way to add new ABS types (the series introduced ABS2 for that). No-one continued that effort so far, so we are stuck with the current ABS types. Feel free to pick this up. It might be a lengthy effort, though. You might be better off doing it the wiimote way: pick you ABS types and make user-space recognize them depending on the device name/etc.Hi. I am writing a user-space driver for the steam controller and I was wondering how that would fit. The steam controller reports its absolute gyro data as a quaternion instead of three angles. Although, in the case of the steam controller, this data is meant to emulate other kind of devices from the driver, if applications started to use such an interface, it would be nice that the steam controller supports it.quoted
Thanks David
I haven't with the SteamController yet. Based on iFixit it has a 3-axis gyro and 3-axis accelerometer. I guess the microcontroller could be doing the quaternion calculations. Are you sure it is gyro data and not maybe orientation data derived from gyro + accel? Try spinning it around an axis and integrate the output in a script (provided you knew the resolution in units per deg/s or rad/s). Some devices may use 1D or 2D sensors, so if for those just ABS_GYRO_X / _Y for them, for a 4th dimension _W would make sense I guess. -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html