Jump to content

WIP - Frequency Scratchpad for X52pro MFD


Recommended Posts

I'm working on a small app that allows using the X52pro MFD to store mission important requency for reference.

 

Frequency Scratchpad for X52pro MFD

 

Usage:

Using the UI you can enter various misson critical frequencies.

 

attachment.php?attachmentid=48528&stc=1&d=1299320196

 

The entered frequencies are then stored to the MFD for the time the application is running.

You can use the MFD page scroll wheel (the left one below the MFD) to browse through the entered frequencies without the need of alt-tabing out of the sim.

 

Just note that the fq are there just for reference, you still need to enter them to the radios yourself ;)

 

Troubleshooting

The App is compiled using DirectOutput.dll version 6.2.2.4. If you run in any problems, check the version of your driver dll first. The dll can be found in your saitek install folder\DirectOutput (i.e. c:\Program Files\Saitek\DirectOutput\), and the version is listed in the properties.

 

The MFD SDK can have a mind of it's own. You can try to use the File->Restart Service to fix some weird behaviour the SDK has (i.e. the entered fq are not displaying on the MFD).

 

 

If you have any problems or questions, then write here right away. I've been working on the app only for a few hours, and I didn't know anything about the MFD SDK before I started working, so there might be some pesky hidden bugs. :)

fq.png.3bb36539913ee9bb0b0c4bd25d319979.png

Frequency ScratchPad.zip


Edited by winz
  • Like 5
Link to comment
Share on other sites

I tested it in a 64bit OS and it works like a charm. The MFD works perfectly. Nice job, rep inbound.

 

Edit: You could also include the function to be able to save/load the entries. That way we don't have to re-enter them each time and could just change the freq number if need be.


Edited by Innerloop
 

Intel i7 12700k / Corsair H150i Elite Capellix / Asus TUF Z690 Wifi D4 / Corsair Dominator 32GB 3200Mhz / Corsair HW1000W / 1x Samsung SSD 970 Evo Plus 500Gb + 1 Corsair MP600 1TB / ASUS ROG Strix RTX 3080 OC V2 / Fractal Design Meshify 2 / HOTAS Warthog / TFRP Rudder / TrackIR 5 / Dell U2515h 25" Monitor 1440p

Link to comment
Share on other sites

tested it in a 64bit OS and it works like a charm. The MFD works perfectly. Nice job, rep inbound.

 

Edit: You could also include the function to be able to save/load the entries. That way we don't have to re-enter them each time and could just change the freq number if need be.

 

That's great :) thanks

Save/Load will definitely be added.

 

How are you programming that?

 

I would love to do some MFD stuff, but don't know where to to start.

tbh, it was a lot easier than I expected and shouldn't a be problem for anyone familiar with c++ or C#.

With the drivers comes SDK that is located in "Saitek\DirectOutput\SDK\"

For C++ you just need to include header files in the include folder.

For C# I've used this wrapper http://www.saitekforum.com/showthread.php?t=18920

 

You can then use the methods provided by the API to manipulate the x52pro mfd and buttons.

  • Like 1
Link to comment
Share on other sites

Running W7 64 here, no joy.

 

I can open it (either whit or whitout admin rights doesn't seem to matter)

Fill out the fields, and that's all it will do.

Pressing any of the buttons doesn't do anything.

And when going to "file" "Restart Service" i get the following error;

 

Note, where ever my username was in the error message i changed it to "user".

 

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidOperationException: Cannot stop SaiDOutput service on computer '.'. ---> System.ComponentModel.Win32Exception: The service has not been started
  --- End of inner exception stack trace ---
  at System.ServiceProcess.ServiceController.Stop()
  at Frequency_Selector.MainForm.restartServiceToolStripMenuItem_Click(Object sender, EventArgs e)
  at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
  at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
  at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
  at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
  at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
  at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
  at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
  at System.Windows.Forms.Control.WndProc(Message& m)
  at System.Windows.Forms.ToolStrip.WndProc(Message& m)
  at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
  at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
   CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
Frequency ScratchPad
   Assembly Version: 1.0.0.0
   Win32 Version: 1.0.0.0
   CodeBase: file:///C:/Users/user/Downloads/Frequency%20ScratchPad/Frequency%20ScratchPad.exe
----------------------------------------
System.Windows.Forms
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
   CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
   CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
   CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.ServiceProcess
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
   CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.ServiceProcess/2.0.0.0__b03f5f7f11d50a3a/System.ServiceProcess.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
   <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


[sIGPIC][/sIGPIC]

The keeper of all mathematical knowledge and the oracle of flight modeling.:)
Link to comment
Share on other sites

Original issue still persists, but when opening the program i now get the following error, after pressing OK program still opens though.

---------------------------

---------------------------
Unable to initialize - System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.

  at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)

  at Frequency_Selector.MainForm.initializeDevice()
---------------------------
OK   
---------------------------

And the error code after i go to "file" "restart service" in case part of the error code has changed

 

---------------------------

---------------------------
Unable to initialize - System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.

  at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)

  at Frequency_Selector.MainForm.initializeDevice()
---------------------------
OK   
---------------------------

And under the details button of the error hides the following;

 

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidOperationException: Cannot start service SaiDOutput on computer '.'. ---> System.ComponentModel.Win32Exception: An instance of the service is already running
  --- End of inner exception stack trace ---
  at System.ServiceProcess.ServiceController.Start(String[] args)
  at Frequency_Selector.MainForm.restartServiceToolStripMenuItem_Click(Object sender, EventArgs e)
  at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
  at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
  at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
  at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
  at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
  at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
  at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
  at System.Windows.Forms.Control.WndProc(Message& m)
  at System.Windows.Forms.ToolStrip.WndProc(Message& m)
  at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
  at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
   CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
Frequency ScratchPad
   Assembly Version: 1.0.0.0
   Win32 Version: 1.0.0.0
   CodeBase: file:///C:/Users/user/Desktop/Frequency%20ScratchPad.exe
----------------------------------------
System.Windows.Forms
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
   CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
   CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
   CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.ServiceProcess
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
   CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.ServiceProcess/2.0.0.0__b03f5f7f11d50a3a/System.ServiceProcess.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
   <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


If theres anything specific i can try for you let me know, can you also confirm im doing everything correct and in correct order?

1. plug in X52pro

2. launch scratchpad

3. fill in fields

4. press "save as New" button (which doesn't do anything)

4. go to "file" "restart service" (which results in above error msg)

 

Unfortunately i know zip, nada nothing about programming.

Your effort is appreciated though.

[sIGPIC][/sIGPIC]

The keeper of all mathematical knowledge and the oracle of flight modeling.:)
Link to comment
Share on other sites

It looks like the program has problem finding your saitek drivers.

 

Can you see if you have the saitek service running? run->services.msc->there should be a service named 'Saitek DirectOutput'. It has to be running.

 

also check if the installation if the driver installation is ok. There should a file named DirectOutput.dll in c:\Program Files\Saitek\DirectOutput\

The file should be 6.2.2.4 (you can check this on the files properties)

 

Saitek drivers are acting weird for me if you plug the hotas as windows is running, or in a different port.

Link to comment
Share on other sites

winz - you're at genius :thumbup: thanks a lot for this very handy app. works for me on win 7 64bit.

"There are only 10 types of people in the world — those who understand binary, and those who don't."

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

a service named 'Saitek DirectOutput'. It has to be running.

Checked, says service is started. So that's OK

 

also check if the installation if the driver installation is ok. There should a file named DirectOutput.dll in c:\Program Files\Saitek\DirectOutput\

The file should be 6.2.2.4 (you can check this on the files properties)

Checked, file is there, version 6.2.2.4 Date Modified 4/4/2008

 

Saitek drivers are acting weird for me if you plug the hotas as windows is running, or in a different port.

Only have problems when plugging in a different port, when i do so doesn't matter though.

[sIGPIC][/sIGPIC]

The keeper of all mathematical knowledge and the oracle of flight modeling.:)
Link to comment
Share on other sites

It doesn't work for me after I rebooted. It just blank the MFD and the my stored frequencies did not save after reboot.

"There are only 10 types of people in the world — those who understand binary, and those who don't."

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

It doesn't work for me after I rebooted. It just blank the MFD and the my stored frequencies did not save after reboot.

 

 

I had the same issue.. you need to re-install Saitek drivers.

 

Intel i7 12700k / Corsair H150i Elite Capellix / Asus TUF Z690 Wifi D4 / Corsair Dominator 32GB 3200Mhz / Corsair HW1000W / 1x Samsung SSD 970 Evo Plus 500Gb + 1 Corsair MP600 1TB / ASUS ROG Strix RTX 3080 OC V2 / Fractal Design Meshify 2 / HOTAS Warthog / TFRP Rudder / TrackIR 5 / Dell U2515h 25" Monitor 1440p

Link to comment
Share on other sites

Updated first post with new version

 

-added save/load feature

-added the ability to stay allways-on-top of other windows.

-first text field will be selected when alt-tabing to the application

-pressing enter will move the caret to the next text field

-pressing enter at the 'remark' textfield will automatically save a new entry and focus the first text field

-another bug-fix for restart service

 

It doesn't work for me after I rebooted. It just blank the MFD and the my stored frequencies did not save after reboot.

I'm having this aswell. The MFD goes blank after I save a new value. Do not know what is the cause. But file->restart service does fix it for me. It's only doing it after reboot.

 

@159th_Falcon

I'm lost here, don't see any reason why it doesn't work :(. Do you have the SST sw, or anything else that interacts with the MFD installed?

  • Like 1
Link to comment
Share on other sites

I am using SST profiles yes, ill try without loading a profile and see how that goes.

Thanx for the help.

 

***EDIT***

Just tried latest version without a profile loaded and worked after restarting the service.

Loaded a profile and still worked.

Not sure what has changed but ya made a very need little app and great support

Rep inbound.


Edited by 159th_Falcon

[sIGPIC][/sIGPIC]

The keeper of all mathematical knowledge and the oracle of flight modeling.:)
Link to comment
Share on other sites

Yup, that's for sure.

 

Anyway, i made a file which includes every airport on the map and data will be displayed as follows;

Airport Name: Anapa

Frequency: 121.000

Call: URKA Civil

What one will see on the MFD will be;

Anapa

121.000

URKA Civil

 

Guduata

130.000

UG23 Military

 

Madok

137.000

XRMF Military

 

etc, etc etc for every airport on the map. Airports air listed in alphabetical order.

 

Download from attachments. Unpack .RAR file and place contents in same folder as the Frequency ScratchPad.exe

 

Open the Frequency ScratchPad and go to "file" "load" and select the Airport Frequencys.fcy file

 

Enjoy

Airport Frequencys.rar

  • Like 3

[sIGPIC][/sIGPIC]

The keeper of all mathematical knowledge and the oracle of flight modeling.:)
Link to comment
Share on other sites

This program sounds very promising but unfortunately I also get an error;

I start the program and input the data

I press save as new and display goes blank

If I press restart service, I get the following error:

 

errorj.jpg

 

Details in the attachment.

 

service 'Saitek DirectOutput' is running

File version is 6.2.2.4

No profiles running

 

EDIT: Solved- see my next post

error.txt


Edited by goldfinger35
Solved- see my next post

i7 920@4.0Ghz, 12 GB RAM, ATI 4890, LG L246WHX@1920x1200, Saitek X52 Pro, Saitek pro flight rudder pedals, TrackIR4, Audigy 2ZS, Logitech G9x, Vista 64bit.

Link to comment
Share on other sites

I have solved the problem:

Program must be run as administrator

After that, it usually takes one restart of the program followed by restart service and it's working ok!

 

rep inbound winz and 159th_falcon (I will change your file so it will include true runway headings and QFE).

i7 920@4.0Ghz, 12 GB RAM, ATI 4890, LG L246WHX@1920x1200, Saitek X52 Pro, Saitek pro flight rudder pedals, TrackIR4, Audigy 2ZS, Logitech G9x, Vista 64bit.

Link to comment
Share on other sites

Not sure how close to the same these hardware is, but would it be possible for you to adapt this to work on the Logitech G-19 keyboard LCD?

My PC:

OS: Windows 7 64 bit

CPU: Intel Core i7 950 Quad Core @ 3.07 GHz

RAM: 12GB Corsair Dominator DDR3

GPU: EVGA GTX 580 Black Ops Edition

HOTAS: Thrustmaster Cougar

Track IR v4

Link to comment
Share on other sites

Program must be run as administrator

Only the restart service should require admin rights. Tbh I've no idea why the restart service is necessary after reboot, even the saitek examples are having this issue.

Not sure how close to the same these hardware is, but would it be possible for you to adapt this to work on the Logitech G-19 keyboard LCD?

Without me having the keyboard there is no way it can be done. As it would require a complete rewrite.


Edited by winz
Link to comment
Share on other sites

Dunno what's changed but the app works again here now.

 

Thanks for the airport list 159th_Falcon.

 

winz, is there a way to have the app autoload fx. the airport list? So we don't have to manually load the .fcy file.

"There are only 10 types of people in the world — those who understand binary, and those who don't."

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

  • Recently Browsing   0 members

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