Jump to content
The simFlight Network Forums

Saitek Switch Panel Leds : com.writefeature(dev, s, wrf) ?


Recommended Posts

Hi,

 

I've found this topic about Saitek Switch Panel Leds :

 

http://forum.simflight.com/topic/71786-programming-of-the-saitek-pro-flight-panels-with-fsuipc-and-lua/

 

Indeed, i'm looking for explanations or samples about this command : 

 

com.writefeature(dev, s, wrf)

 

The goal of my request is to switch on (red or green) leds on Saitek Switch Panel.

 

May someone help me ? 

 

Best regards,

Oliver.

Link to comment
Share on other sites

I got it !   :razz:

 

A very special thanks to Pat_59 And Dreambox ...  :cool:

 

  • In the "HID.LUA" file , add these two lines :

 

ipc.set("dev",dev)
ipc.set("wrfr",wrf)
 
below this one :
 
dev, rd, wrf, wr, init = com.openhid(Vendor, Product, Device, Report)
 
This part of your file should be like this :
 

 

-- opening HID device Saitek Switch panel
Vendor = 0x06A3
Product = 0x0D67
Device = 0
Report = 0
dev, rd, wrf, wr, init = com.openhid(Vendor, Product, Device, Report)
ipc.set("dev",dev)
ipc.set("wrf",wrf)

 

  • In your "Radio.lua" file, add these lines to switch on green leds :

 

dev = ipc.get("dev")

wrf = ipc.get("wrf")
 
s = string.char(0,07) -- 07 will light red leds
com.writefeature (dev, s, wrf)

 

  • In your "Radio.lua" file, add these lines to switch on red leds :

 

dev = ipc.get("dev")

wrf = ipc.get("wrf")
 
s = string.char(0,56) -- 56 will light red leds
com.writefeature (dev, s, wrf)

 

That's all ... Let's play !  :razz:

 

Hope it will help ...

 

Regards.

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.