Jump to content
The simFlight Network Forums

How to know the handle of an opened HID ?


Recommended Posts

I am using Linda which opens auomatically all USB connected HID devices.

How can I found the handle returned by the function com.openhid(VID, PID, unit, repno) ?

 

Not sure what you mean. As you say, the handle is returned, so your Lua program has it.  It is merely a pointer into an internal FSUIPC or WideClient structure. It has no use outside of the context in which it applies. What are you wanting it for?

 

Pete

Link to comment
Share on other sites

Hi Pete

I am using Linda

Linda is a nice tool as long as buttons are concerned

The problem is the displays of my Saitek Pro Flight Radio and Multi Panel

How can I command these displays ?

with your function com.write(handle, "string") of course

My concern : how can I found the handles of the HIDs open by LINDA

The HID must be opened because the buttons are reacting

I really appreciate your help

Michel

RASMIB

Link to comment
Share on other sites

My concern : how can I found the handles of the HIDs open by LINDA

The HID must be opened because the buttons are reacting

 

Does LINDA use the comhid functions or simply the normal joystick button detection?

 

In any case the handle is local to the thread which created it -- you'd either need to put you code into the Lua being run by LINDA, or get it to run call your Lua functions as an external module.

 

Easier to simply use openhid in your own Lua code. With USB devices several programs can have them open at the same time, it isn't like the old serial port system.

 

Regards

Pete

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.