UNPKG

infiniteflightjs

Version:

A JavaScript Module for V1 of the Infinite Flight Connect API

12 lines (11 loc) 401 B
const InfiniteFlight = require('../InfiniteFlight'); InfiniteFlight.init(function() { InfiniteFlight.onMessage(function(msg) { console.log(msg); }); InfiniteFlight.sendCmd('Airplane.GetState', []); InfiniteFlight.sendCmd('Commands.ParkingBrakes', []); console.log("Commands Sent"); }, function() { throw new Error('Error Connecting to Infinite Flight'); });