Page 2 of 2

Re: Manipulate Joystick Data

Posted: Mon Jun 12, 2017 3:24 pm
by AND_1
Thanks Matlo.

I have a C-Funktion which prints first: The event type, afterwards the array length and finally the value of the axes. Does it work with the printf-statement, that GIMX can understand the report? Or do I need to have a send-function for the report? How can I get my bytes into the report?
Sorry for this many questions :lol:

Thanks in advance

AND_1

Re: Manipulate Joystick Data

Posted: Fri Jun 16, 2017 12:35 pm
by AND_1
Hi Matlo,

I have a function, which generates the byte array, but now I am not sure how to send this report to GIMX. Is there a specific function from GIMX to send it? Or how I am going to do this? Or do I need to write this function? Maybe you can give me an advice how to do that and what I need to take into account.

Thanks in advance.

AND_1

Re: Manipulate Joystick Data

Posted: Tue Jun 20, 2017 9:35 pm
by Matlo

Re: Manipulate Joystick Data

Posted: Wed Jun 21, 2017 5:38 pm
by AND_1
Hi Matlo,

until now I made a function which builds a String that contains the Linux commands (e.g. gimx --event "rel_axis_0(32767)" --dst 127.0.0.1:51914) and when I start this c-programm it executes the String as a terminal command using the execv-funktion. It works but I have massive latency issues or missing package issues. Is it a problem of the refresh period? Is it possible to get it work without these delays or that it works like using the physical device option instead of the networking option as input? Maybe I can avoid this issue by sending the byte array as you recommended?

Hopefully you can help me with this. Thanks for your help :)

AND_1

Re: Manipulate Joystick Data

Posted: Thu Jun 22, 2017 9:23 am
by Matlo
Hi,
Creating a new gimx process for each update adds a massive overhead, which is why you should send the updates over a UDP socket.
I'm sorry but I do not have much time to help on this matter, and helping you without seeing the source code will consume a lot of time.