Jump to content

any interest for Saitek instrument panel tools


Gremlin77

Recommended Posts

Hi all,

 

two days ago decided to try out the Saitek Instrument panels for my cockpit. Ordered for a hundred bugs an was at first quite disappointed, cause of limitation to MS Flight Simulator. (as expected)

 

But the good thing: Found a SDK folder, where a .dll for the device is included.

 

After fighting night and day, managed to program that little beast.

 

What can it do?

 

Okay it has six switches and two rotaries you can access from software...... Wow....very impressive.....:mad:

 

But the fantastic thing about it? The TFT and the function SetImage. With this little function and a bit of c# code you can copy parts of your desktop to your device. And as we as DCS lovers all know, we can export nearly everything from the game to a screen.

 

So my idea was to just copy for example the RWR or any instruments to the Saitek. And it works fine!

 

So now I have this ugly programed tool for my purpose (RWR) and don't know if it's worth it to make it user friendly for more users.

 

If some people like to have such a tool, I'll start to work on it. Just let me know

visit my build thread Gremlin's A-10 :thumbup:

http://forums.eagle.ru/showthread.php?t=86916

Link to comment
Share on other sites

Hey gremlin, welcome to the club. Yes I would be interested in the tool. My attempts are finally coming together but , I am pretty much learning the ins and outs of lua..( I know , you are using C#)

Take a look at this.....http://forums.eagle.ru/showthread.php?t=94174

A few lua scripts in there to get the X52 pro and fips going .

[sIGPIC][/sIGPIC] CPIAS FOR Saitek:

Saitek Flight instrument panels and X-52 pro mfd scripts for Dcs

 

http://forums.eagle.ru/showthread.php?t=94174

Link to comment
Share on other sites

I read your thread. But didn't realize that your lua-script is able to export graphics.

 

For me it's more convenient to use a more complex programming lanquage with a debugger and so on. Using lua is not my thing at all. Had hard days writing my export function to connect to my interface software. This was enough lua for the rest of my life!!!!

visit my build thread Gremlin's A-10 :thumbup:

http://forums.eagle.ru/showthread.php?t=86916

Link to comment
Share on other sites

I'ma afraid that I can't export graphics with lua... Gd only works with everything but bmp files. I have to draw my own gauges.

I understand what you say about lua...driving me bonkers but, I have to admit I am at the learners stage of programming ...

Would you care to share your c# set up , I would like to see how to do it at that level , was trying to create an interface with C++ but they changed the callbacks on one of the functions and it kept me quite confused.

[sIGPIC][/sIGPIC] CPIAS FOR Saitek:

Saitek Flight instrument panels and X-52 pro mfd scripts for Dcs

 

http://forums.eagle.ru/showthread.php?t=94174

Link to comment
Share on other sites

I was sitting today and researching the forums for if there was anybody there got the Saitek or Vrinsight panels/gadgets to Work with DCS.. Was considering ordering some...

 

But didnt find anything until now, will be very interested to see whats possible with Saitek..?

 

So please continue the Work :-)

molon-labe-black-header.jpg

Link to comment
Share on other sites

Sorry for delay, always forget my photo in the office.

 

For c# coders:

 

started using the AstroMech (just google) code from Saitek forum and added the SetImage Funtion at the DirectOutputClass:

 

[DllImport("c:\\program files\\saitek\\directoutput\\DIRECTOUTPUT.DLL", EntryPoint = "DirectOutput_SetImage")]

unsafe public static extern int DirectOutput_SetImage(void* hDevice, int dwPage, int dwIndex, int cbValue, byte[] pbValue);

 

In project code added something like this:

 

public void button6_Click(object sender, EventArgs e)

{

int returnvar;

returnvar = AstroMech.DirectOutputClass.DirectOutput_AddPage(m_hDevice, 1, "Test", false);

Graphics graphics = Graphics.FromImage(img.Image);

byte[] buffer = newbyte[320 * 240 * 3];

Point upperLeftSouce = newPoint(100, 100);

Size blockRegionSize = newSize(385, 351);

Bitmap bitmap = newBitmap(blockRegionSize.Width, blockRegionSize.Height, PixelFormat.Format24bppRgb);

using (Graphics g = Graphics.FromImage(bitmap))

{

g.CopyFromScreen(upperLeftSouce, newPoint(0, 0), bitmap.Size);

}

 

for (int y = 0; y < 240; y++)

for (int x = 0; x < 320; x++)

{

Color color = bitmap.GetPixel(x, 239 - y);

buffer[(y * 320 + x) * 3] = color.B;

buffer[(y * 320 + x) * 3 + 1] = color.G;

buffer[(y * 320 + x) * 3 + 2] = color.R;

}

AstroMech.DirectOutputClass.DirectOutput_SetImage(m_hDevice, 1, 0, buffer.Length, buffer);

button6.Text = CurrentPage.ToString();

}

 

what it does:

it creates a new page on the Saitek an copies for demo a screenpart to the device when you hit the button. Also did it with a timer function, so ever 0,01 Seconds a screenpart is copied. Works quite fine.

 

You tune the prog for better user operation. Please give me some time.

visit my build thread Gremlin's A-10 :thumbup:

http://forums.eagle.ru/showthread.php?t=86916

Link to comment
Share on other sites

You re really the first guy to do this feat !!!!

Many have tryed and until now all had fallen, nice to know someone arise.

I always had found the saiteks stuff interesting but the company extremely lazy assed.

 

Depending of what you can do this could maybe a nice "replacement" for real deal stuff (living outside US) and working in tandem with GADROC program it could be very nice becuase you could have more space onto your monitor. (this could interest FLIM also)

 

What have you achieved ?

And what do you think you can achieve ?

 

Very interested.

HaF 922, Asus rampage extreme 3 gene, I7 950 with Noctua D14, MSI gtx 460 hawk, G skill 1600 8gb, 1.5 giga samsung HD.

Track IR 5, Hall sensed Cougar, Hall sensed TM RCS TM Warthog(2283), TM MFD, Saitek pro combat rudder, Cougar MFD.

Link to comment
Share on other sites

okay, better version now:

 

Conversion of Screenshot to byte array much faster without processor power and you can adjust the time for sending pics to the Saitek.

 

If any of you need more Instruments or anything else please let me know!

 

 

Download link:

 

ScreenToSaitek.rar

visit my build thread Gremlin's A-10 :thumbup:

http://forums.eagle.ru/showthread.php?t=86916

Link to comment
Share on other sites

So, finished to tool to get nice usability.

 

In this version you have:

* 4 instrument panels supported (didn't test yet, panels are still in delivery, but should work)

 

* A preview windows where you can see the captured pic on mouseposition

 

* you can store the preview coordinates to the desired instrument using key 1,2,3 and 4

 

* A trackbar to adjust export speed (1ms to 2000ms)

 

* A save function, to save coordinates of the four instruments and your Timer settings

 

So, hope you have fun with this little tool. If you like it, please donate on my software page: http://www.737ng-homecockpit.de/

 

DOWNLOAD HERE:

 

ScreenToSaitek.rar

visit my build thread Gremlin's A-10 :thumbup:

http://forums.eagle.ru/showthread.php?t=86916

Link to comment
Share on other sites

Oh, Saitek makes it useable, but the problem was to use their SDK with .net applications, cause the SDK is for c++, what I am not familiar with.

 

okay here the pics:

 

Software running:

ScreenToSaitek.JPG.ae3ef4f483707c71a198ee7d531df679.JPG

 

and the result (just used MFD and CDU for quick demo)

 

IMG_4848.JPG.b8180086b1f9860909797b9ba424d596.JPG

 

IMG_4849.JPG.b0d2ec7ba9b47ad29e18d1d583750797.JPG


Edited by Gremlin77

visit my build thread Gremlin's A-10 :thumbup:

http://forums.eagle.ru/showthread.php?t=86916

Link to comment
Share on other sites

wow that's cool Gremlin you have cracked the hard boiled egg nice job do you have any plans to get the switch panels to work like the radio panel and the others they do I hate having to look down and fumble for the mouse to change radio frequencys.

Eagles may soar high but weasel's don't get sucked into jet engines.

 

 

System Spec.

Monitors: Samsung 570DX & Rift CV1

Mobo: MSI Godlike gaming X-99A

CPU: Intel i7 5930K @ 3.50Ghz

RAM: 32gb

GPU: EVGA Nvidia GTX 980Ti VR Ready

Cooling: Predator 360

Power Supply: OCZ ZX Series 80 Plus Gold

Drives: Samsung SSD's 1tb, 500g plus others with OS Win10 64 bit

 

Link to comment
Share on other sites

Sorry don't have the switch panels. Just working on the buttons and rotaries of the FIB to get to work properly.

 

I bought my four Panels on ebay for 109€ each. Quite expensive, I know, but just think about buying an USB monitor (130€) or use a graphic card with small hdmi (vga) monitor, it's not so expensive at all.

 

The good thing about the FIPs is the size. Did just find TV screens in that size not very comfortable to use with the PC.

visit my build thread Gremlin's A-10 :thumbup:

http://forums.eagle.ru/showthread.php?t=86916

Link to comment
Share on other sites

Final version:

ScreenToSaitekV4.0.rar

 

-supports up to 4 instrument panels

- use the two rotaries to adjust screen capture position

- use S1 to chose between small and big steps of the rotaries

- use S6 to save

 

 

If you like it, PLEASE donate: http://www.737ng-homecockpit.de/

was a lot of work.....:lol:


Edited by Gremlin77

visit my build thread Gremlin's A-10 :thumbup:

http://forums.eagle.ru/showthread.php?t=86916

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...