Infinite Flight Connect Evolved is a Javascript Client for the Infinite Flight Connect API. Infinite Flight Connect is a built-in API that allows you to send command to Infinite Flight. You must enable it in Infinite Flight Settings > General > "Enable Infinite Flight Connect".
To send a command to Infinite Flight, you may use the shortcut function IFC.cmd() or the full function for complex commands. You’ll find a full list of commands on the API Docs repo
Examples:
Flaps Down : IFC.cmd("FlapsDown") will lower the flaps down. (Full Command equivalent is: IFC.sendCommand({ "Command": "Commands.FlapsDown", "Parameters": []});
Camera Move : this one require params, so let’s call the full command call : "Command": "NetworkJoystick.SetPOVState", "Parameters": [ { "Name": "X", "Value": 0 }, { "Name": "Y", "Value": 0 } ] }
Connection to ForeFlight Link API
Fore Flight Link broadcasts various data about the player’s plane and traffic planes around him. ForeFlight Link must be enabled from Infinite Flight Settings > General > Enable ForeFlight Link
You can use IFC to listen to ForeFlight Link messages :
Almost all of the code is from Nicolas BARTHE-DEJEAN. I was unable to locate him on the IFC or by other means. If anyone knows how to contact him, please, please let me know so I can request ownership of the original. I am now maintaining this service due to 5 years of inactivity on Nicolas Barthe Dejean's part.
@anon78056611 … I’ve also been working on a Node module for Connect API v2 myself based on code I wrote for PanelNinja. I’m expecting to publish a first cut on Github in the next week or so and share it in the forums here.
How far along are you with your v2 support in ifc-evolved?
So … I went through a lot of pain getting the v2 API to work the way I wanted but seem to have it working reliably via Node but specifically for GetState only which is all I’ve used so far in my PanelNinja Electron app.
What I’ve done is externalise that now into an external node module which can do the following:
Detect a host via UDP and connect (or connect to an explicit API)
Retrieve the manifest
Send GetState commands – responses emit an event back to the calling script which can handle the response event a it wants
Allow the creation of a polling queue – i.e. define a list of commands which simply poll IF repeatedly in a looping sequence – useful for the type of instrument panel app I had built but I’m sure it has other use cases. In PanelNinja basically every time I get a response back from a command I fire off the next in the queue and loop back to the start of the list endlessly. The node module I’m building does for me now.
I’m extending the model right now to support SetState and RunCommand commands and I’m hopeful to crack that this side of Christmas.
Will do. I’ll post a proper announcement in the forums once I publish the first cut of the module.
Also, separately, last year (April 2020), I forked Velocity23’s fork of Nicolas BARTHE-DEJEAN’s IFC node module for Connect v1 and made some changes in case you’re interested: