Messages in this thread | | | Date | Thu, 15 Aug 2013 17:18:52 +0100 | From | Nick Dyer <> | Subject | Re: [PATCH 37/51] Input: atmel_mxt_ts - Implement vector/orientation support |
| |
rydberg@euromail.se wrote: > On Thu, Jun 27, 2013 at 01:49:12PM +0100, Nick Dyer wrote: >> The atmel touch messages contain orientation information as a byte in a packed >> format which can be passed straight on to Android if the input device >> configuration is correct, see >> http://source.android.com/tech/input/touch-devices.html#touchorientationcalibration
Except they've changed the URL, should be: https://source.android.com/devices/tech/input/touch-devices.html#touchorientationcalibration
The Atmel format is two 4-bit signed values packed into 1 byte, you use inverse tan to work out the angle, and pythagoras theorem to work out the magnitude of the vector (giving a confidence level)
>> This requires vector reports to be enabled in maXTouch config (zero DISVECT >> bit in T9 CTRL field) >> >> Android converts the format in frameworks/base/services/input/Input.cpp, >> search for ORIENTATION_CALIBRATION_VECTOR. > > How does this compare to the input mt documentation?
http://lxr.free-electrons.com/source/Documentation/input/multi-touch-protocol.txt#L263
So yes, we don't meet the documented format. Options: 1. Leave out this patch entirely and support out of tree 2. Update multi-touch-protocol.txt to include the Atmel format 3. Convert in driver to match documented protocol. Presumably via a LUT of the 256 possible values. Although this loses the confidence level that is implied. 4. Getting the firmware changed is not a valid option I'm afraid (too many devices already out there).
Which do you prefer (I suspect 3) ?
| |