Socket
Socket
Sign inDemoInstall

ifc-evolved

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ifc-evolved

A Javascript client for Infinite Flight simulator API


Version published
Weekly downloads
4
Maintainers
1
Created
Weekly downloads
 

Readme

Source

INTENDED FOR DEVELOPERS

Logo|200x200, 50%

IFC Evolved

https://github.com/Sam-Neale/ifc-evolved/

What is this?


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".

Where can I get this?


Using NPM: https://www.npmjs.com/package/ifc-evolved

Code Docs


Initialization

init(successCallback, errorCallback)

  • successCallback is the function to be executed after the connection has been established with Infinite Flight
  • errorCallback is the function to be executed in case of Error (20 seconds with no IF found, or data lacking an address)

Example:

const IFC = require('ifc-evolved');

IFC.init(
  function() {
    console.log("IFC connected");
    IFC.sendCommand({ "Command": "Commands.FlapsDown", "Parameters": []});
  },
  function() {
    IFC.log("IFC connection error");
  }
)

Sending a Command

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 } ] }

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 :

initForeFlight(onForeFlightDataReceived)

Received Data is formatted according to the official documentation : https://www.foreflight.com/support/network-gps/

Credits


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.

Projects


Projects that use IFC-Evolved

  • IFFMC Reborn

Add yours by making an issue with the project tag

Keywords

FAQs

Last updated on 21 Nov 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc