Manipulate Joystick Data

Talk about anything concerning the source code.
AND_1
Posts: 11
Joined: Wed May 31, 2017 8:20 am

Re: Manipulate Joystick Data

Post by AND_1 » Mon Jun 12, 2017 3:24 pm

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

AND_1
Posts: 11
Joined: Wed May 31, 2017 8:20 am

Re: Manipulate Joystick Data

Post by AND_1 » Fri Jun 16, 2017 12:35 pm

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

User avatar
Matlo
Posts: 4122
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: Manipulate Joystick Data

Post by Matlo » Tue Jun 20, 2017 9:35 pm

Donate Shop

AND_1
Posts: 11
Joined: Wed May 31, 2017 8:20 am

Re: Manipulate Joystick Data

Post by AND_1 » Wed Jun 21, 2017 5:38 pm

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

User avatar
Matlo
Posts: 4122
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: Manipulate Joystick Data

Post by Matlo » Thu Jun 22, 2017 9:23 am

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.
Donate Shop

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest