Jump to content
The simFlight Network Forums
okansacli

Reading from SKALARI SDK to generate a keysend

Recommended Posts

Dear All,

I would like to read the status of the Audio Control Panel ACP RAD Key pressed via Skalarki's SDK toolset ( I have attached the support file showing all available items)

I can in the list that ACP1 files there is INTRAD field available, which can be coded in C# via (to read the status I assume, since it is readonly?)

public static readonly IEventDescriptor INTRAD

What I am trying to achieve is that if the RAD switch is pressed (it is not a latching type), I should send the key F12 to simulator via WideFS. (which will then trigger my vatsim client vpilot)

Since I know almost nothing about c#, I will realy appreciate if someone could guide me, even write a small exe file to achieve this.

the SDK folder of skalarki has many dll's within listed as follows;

image.png.eb21cc2839094262fc67ec6d58a4bc22.png

your support will be highly appreciated on this

Kindest Regards from Istanbul

Okan Sacli

www.okansacli.com

 

 

Documentation.chm

Share this post


Link to post
Share on other sites

Hi Okan,

I have written a C# application which I think does what you want. I can't test it because I don't have the hardware.

If you're a beginner at C# this is a very difficult first project.

1. Download and extract the attached C# project. Then open it in Visual Studio.

 

2. You will need to install my FSUIPC DLL into the project. Go here for instruction on how to do this:

http://fsuipc.paulhenty.com/#help

Under "Quick Installation Guide" see the instructions for "Installing the Library into an Existing Project". There is a video link if you prefer.

 

3. You will also need to add a 'reference' to the Skalarki SDK DLLs.

In the Solution Explorer pane, right-click the node called 'References' and then select 'Add Reference...'

Click the 'Browse' button at the bottom of the form.

Navigate to where the Skalarki SDK is installed on your machine and add the two DLLs called:
 

SkalarkiIO.SDK.dll
SkalarkiIO.SDK.Telemetry.dll

On my machine they are here:

C:\Program Files (x86)\SkalarkiIO Profiler 5.1\SDK

 

4. The project should now compile and run.

The status bar will show if the application is connected to FSUIPC and your hardware. When both are connected you should be able to press the INTRAD button and the application will send F12 to the FlightSim.

 

I don't know if I've got the Skalarki DLL code correct. I've no way of testing it and the documentation is quite sparse. You may need to get further help from their support.

The FSUIPC part is good though.

Let me know how it goes.

PaulSkalarkiFSUIPCExample.zip

Share this post


Link to post
Share on other sites

Dear Paul,

Thank you for the solution. I have already studied the documentation on your website and watched the videos, so compiling the solution ran without any issues. I can see P3D connected in green, however I couldn't get hardware connected (it remained red). I will try some other options to try to get the hardware connected. (How do you read if the hardware is connected or not ?)

Best Regards from Istanbul

Okan Sacli

 

Share this post


Link to post
Share on other sites

The hardware connection status is reported whenever the connection state changes. The event called 'eventClient_ConnectionStateChanged' is fired. The event arguments (e.Connected) tells you if it's connected or not.

I suggest you try the c# example included in the SDK.

  • Make a new C# Console Application project
  • add the Skalarki DLLs as references
  • copy the code over from:
C:\Program Files (x86)\SkalarkiIO Profiler 5.1\SDK\Samples\Program.cs

See if you can get that to connect.

Paul

Share this post


Link to post
Share on other sites

Hello Paul,

I changed the port number in 

 eventClient = new EventClient(localIP, 25253, (e, s) => { OnHardwareEvent(e, s); }, null);

Now I can see FSUIPC is connected, Skalarki Hardware is connected (both Green)

image.png.c1f026208a9f345c08a8c0ff88d5c15b.png

However, when I physicaly press the RAD button on my ACP panel, the F12 is not being sent to P3D. Any suggestions ?

Thanks

Okan 

Share this post


Link to post
Share on other sites

Hi Okan,

You will need to find out if the button press is being recognised, and if so, if the key is being sent.

In the code, find the OnHardwareEvent and put a breakpoint on the first line:

 switch (e.Source)

Then run the program and press the hardware switch again.

If the breakpoint is hit then it means the press is being captured which is good. You can then step through the code (F10) to see what happens after that. It should go to the line that sends the key press. If not, you can probably see where the problem is.

If the breakpoint is not hit then if means that the Skalarki SDK is not picking it up. We'll need to look into it further, but first you can check with the Skalarki example application that your key press is being recognised there. You'll need to change the switches it's looking for though:

Change the line:

// Register an event
var totalEvents = Switches.GLARE.All.Concat(Encoders.GLARE.All);

To

// Register an event
var totalEvents = Switches.PEDESTAL.ACP1.All;

When you get to the point where it says:

Quote

Press <ENTER> to turn on some LEDs

you can press your hardware button and it should report that on the screen.

Paul

Share this post


Link to post
Share on other sites

Hello Paul,

When I run the sample code from Skalarki, I only get to press ENTER's, nothing happens on the hardware side (no leds turn on or off, no switches are recognized etc.)

Thanks

Okan

image.png.9733665f3359239ec0a2ea792257c681.png

Share this post


Link to post
Share on other sites

Hello Paul ,

Correction, with skalarki example code I can see my RAD switch as I press and release. so I think we are getting somewhere.. slowly but safely

Thanks

Okan

 

image.png.b5ffc16ef123a8d87e1a9c2a0cb1c9c8.png

Share this post


Link to post
Share on other sites

That's good. At least we know the hardware and Skalarki SDK are working.

What about the C# project? With the breakpoint on the OnHardwareEvent() method, does it ever get executed or not?

Paul

Share this post


Link to post
Share on other sites

Helo Paul,

It worked when I run the SKALARKI profiler app in SDK mode. ( I have to select prosim as an aircraft) then with the small app running (for FSUIPC connected, Hardware connected)  I can send F12 to P3D. when I physically press down the RAD on the physical skalarki ACP1 panel 🙂 this is soo cool.

However I think SKALARKI SDK does not allow to use the SDK mode and JEEHELL at the same time so it is useless for me I guess, I am digging further what can be done.

Thanks for all your support

Okan

 

  • Like 1

Share this post


Link to post
Share on other sites

Hello Paul,

There is an other dll (JLFMGS.dll), when I add this as a reference to the solution, I can see in object browser (JLFMGS.dll) FUNCTION_ACP1_INT_RAD_SEL_RAD

Do you think is it possible to read the status of this (if it is 1 when pressed and 0 when released ? )

thank you

Okan

image.thumb.png.739ef2a6ae5822451b3bb5e7357b56c9.png

JLFMGS.dll

Share this post


Link to post
Share on other sites

This is referring to a function so I think it is only for setting the switch to the RAD position.

I've had a look through the DLL but can't see any way to read the position of the switch. The only reading seems to be reading if LEDs are on or off.

Paul

 

Share this post


Link to post
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...

×
×
  • 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.