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
npm install react-native-xplaneconnect
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);
yarn example android
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
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library