Jump to content
The simFlight Network Forums

Recommended Posts

Posted

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.

Posted

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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.