ksgy / react-native-xplaneconnect

A react native library to connect to NASA's X-Plane Connect plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native-xplaneconnect

React Native X-Plane Connect (Android) A react native library to connect to NASA's X-Plane Connect plugin https://github.com/nasa/XPlaneConnect

iOS is not supported at the moment

Installation

npm install react-native-xplaneconnect

Usage

import {getDREF, sendDREF} from 'react-native-xplaneconnect';

// get dataref
const result = await getDREF('sim/cockpit2/clock_timer/local_time_seconds');

// result =>
// { isConnected: boolean, message: string, value: string }
// set dataref
sendDREF('sim/cockpit/autopilot/autopilot_mode', 2);

Running the Example project

yarn example android

Limitations

The library can only set/get float values.

At the moment only getDREF and setDREF functions are implemented.

The full list for all other functions X-Plane Connect supports natively: https://github.com/nasa/XPlaneConnect/wiki/XPC-Client-Reference

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

About

A react native library to connect to NASA's X-Plane Connect plugin

License:MIT License


Languages

Language:Java 76.5%Language:C++ 8.2%Language:Objective-C++ 5.2%Language:TypeScript 2.9%Language:Ruby 2.8%Language:JavaScript 1.9%Language:Makefile 1.8%Language:Objective-C 0.6%Language:C 0.1%Language:Swift 0.1%