Giter Site home page Giter Site logo

edwardandrew / xplane-illuminate Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 36 KB

XPlane-Illuminate is an XPlane Plugin that aims to provide functionality for users to add their own colour mappings to their RGB keyboards, powered by XPlane DataRefs.

Home Page: https://illuminate.edwardandrew.co.uk

License: GNU General Public License v3.0

CMake 12.46% C++ 87.54%
xplane-flight-simulator xplane plugin corsair-rgb corsair-rgb-keyboards rgb-keyboard

xplane-illuminate's Introduction

XPlane-Illuminate

XPlane-Illuminate is an XPlane Plugin that aims to provide functionality for users to add their own colour mappings to their RGB keyboards, powered by XPlane DataRefs.

Compatibility

Keyboards:

  • At the moment, only Corsair RGB keyboards are supported, however in the future I would also like to add more brands.

Operating Systems:

  • Currently supported only on Windows and tested only on Windows 10.

Getting Started

NOTE: You need to put the CUESDK.x64_2013.dll file into your XPlane installation folder (Where XPlane.exe is) for the plugin to work.

Binary

Download from Google Drive

From Source

You will need Visual Studio 2017 with Windows SDK.

If you're unfamiliar with generating project files from CMakeLists.txt I suggest you use cmake-gui.

You will need the following dependencies:

Set the following key values in CMake:

  • CUESDK_PATH
  • XPlane_11_SDK_PATH
  • NLOHMANN/JSON PATH

Select Configure and chose Visual Studio 15 2017 Win64. Then select Generate.

Navigate to the folder where you built the solution file to, and open the solution file with Visual Studio.

Select from the top Menu Build -> Build Solution.

Copy the generated plugins folder to your XPlane installation Resources/ folder.

Configuration

I appreciate the configuration may be a little tedious at the moment, and I'd love to hear feedback for improving it. I would also like to make a nice widget for configuring the plugin directly from XPlane.

When X-Plane is launched, Illuminate will look inside it's folder at Resources/plugins/XPlane-Illuminate for file named illuminate.json. This file is needed and contains all the information for the plugin.

Here is an example configuration file.

This file must be valid json, so I recommend using a JSON validator just to make sure it's okay before attempting to load it once you've finished editing it.

As the plugin is still in development, this file is likely to change from time to time.

Currently there are 3 main parts to the configuration file:

  • colors
  • conditions
  • keys

Colors

This is an array.

Colors should be written as objects with the following format:

{
  "name": text,
  "r": number,
  "g": number,
  "b": number
}

A color with the name background is expected, this is used as a background color for the rest of the keyboard, any other colors names you like can be added here and used later in the file.

Conditions

This is is an array.

A conditon will have one of the following syntax depending on it's DataRef Type. If the dataRef type is an Array it will need to know which index to use the value from:

{
 "name": text,
 "dataRef": text,
 "index": integer,
 "match": "exactly" or "less_than" or "greater_than",
 "value": number
}

or if the dataRef is not an array we do not need the index:

{
  "name": text,
  "dataRef": text,
  "match": "exactly" or "less_than" or "greater_than",
  "value": number
}

You can find out more about XPlane DataRefs including which ones are Arrays here

Keys

This is an Array

Keys currently use the following format:

{
   "conditions": [
    text     // Condition name you gave the condition in the Condition's array
   ],
   "key": text or integer, // eg, "w" or 93
   "color": text // Color name you specifed in the Colors  section, eg "red"
}

You can enter either the single character of the key you wish to use and the plugin will attempt to locate the correct key, or use a number to more explicity state the key.

Here is the full list of CorsairKeyCodes which this file uses for the time being

xplane-illuminate's People

Contributors

edwardandrew avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.