On 05/03/2016 12:51 AM, Dmitry Torokhov wrote:
Nowhere in the memoryless code we have "2 motor values".
But it simulates a few supported events with FF_RUMBLE events.
You are
basically designing an API for single device and that is not a good
idea.
Not for a single device, but for a big (if not the biggest) group of
game controllers.
Hmm, it should not, can you post some traces to show where it gets
stuck so we can fix it?
Some time ago, Elias Vanderstuyft sent me a link to this thread:
http://comments.gmane.org/gmane.linux.kernel.input/44528
Maybe this helps to track down this problem?
You should be able to take cues from the kernel code and create
userspace library providing similar features, but in the way that is
flexible and make sense in userspace.
Of course this should be possible. It just is far more difficult than
just using what is already there.
While searching for examples to learn from, I've collected a few
existing uinput projects using force feedback. 100% of them somehow try
to drive two motors and would profit from some API making this common
case more easy.
But if the recommended way is to do this in userspace, I will try to
understand how ff-memless works to port it 1:1 to userspace.
Unfortunately the kernel documentation
(https://www.kernel.org/doc/Documentation/input/ff.txt) says:
| Note: In most cases you should use FF_PERIODIC instead of FF_RUMBLE.
| *All* devices that support FF_RUMBLE support FF_PERIODIC
| (square, triangle, sine) and the other way around.
So I guess game developers will not just send FF_RUMBLE and so I have to
do some kind of simulation to get my rumble working.
If someone already has simple code which can be used from plain C, I
would be happy to get a link to the repository.
Manuel
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html