Jump to content
The simFlight Network Forums

Reading from SKALARI SDK to generate a keysend


okansacli

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

Link to comment
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

Link to comment
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

 

Link to comment
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

Link to comment
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 

Link to comment
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

Link to comment
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
Link to comment
Share on other sites

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.