Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
charlestytler committed Apr 13, 2020
1 parent ceaaa1b commit 585a690
Show file tree
Hide file tree
Showing 13 changed files with 747 additions and 172 deletions.
87 changes: 63 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,88 @@
<img src="Images/DCS_Interface_Banner.png" width=400>

**NOTE: Work in Progress**

`DCS Interface` is a plugin for the Streamdeck that allows communication with DCS via lua UDP sockets for both receiving udpates of the simulation state as well as sending commands to interact with the clickable cockpits.

`DCS Interface` is a plugin for the Streamdeck that allows communication with DCS via lua UDP sockets for both receiving updates of the simulation state as well as sending commands to interact with the clickable cockpits.

- [Description](#description)
- [Detailed Documentation](#detailed-documentation)
- [Demo of Operation](#demo-of-operation)
- [Installation](#installation)
- [Downloads](#downloads)
- [Initial Configuration](#initial-configuration)
- [Video Walkthrough](#video-walkthrough)
- [Source code](#source-code)
- [Build from source instructions](#build-from-source-instructions)

# Description

`DCS Interface` is a plugin that allows you to create buttons and interfaces that update with DCS events.
There are currently three settings for each Streamdeck button you create:
- DCS Command - Specify which button/switch you want to activate in game (similar to setting keybindings in game).
- DCS Function Monitor - Specify a function within the DCS simulation to monitor and change the display to the alternate image when value is either >, ==, or < a specified value.
- Examples: Lamps for Warnings/Modes, Switch states
- DCS Function Text Update - Specify a function in the DCS simulation which outputs a text string you want the Streamdeck button title to display.
- Examples: UFC text displays, scratchpads, radio displays
There are currently three settings for each Streamdeck button you create:

- DCS Command - Specify which button/switch you want to activate in game (allows setting of any clickable object in a cockpit).
- Streamdeck buttons support push-button, switch, and increment (dials, levers, etc.) input types.
- Image Change Settings - Specify a function within the DCS simulation to monitor and change the display of the Streamdeck image conditionally.
- Examples: Lamps for Warnings/Modes, Switch states
- Title Text Change Settings - Specify a function in the DCS simulation which will be monitored and its text is displayed as the Streamdeck button Title.
- Examples: UFC text displays, scratchpads, radio displays

Can also support multiple physical Streamdecks at once.

## Detailed Documentation

More detailed instructions can be found in:
### [Settings Help Documentation](Sources/com.ctytler.dcs.sdPlugin/helpDocs/helpContents.md).
More detailed instructions can be found in: [Settings Help Documentation](Sources/com.ctytler.dcs.sdPlugin/helpDocs/helpContents.md).

---

### Demo of Operation:
# Demo of Operation

![Stream Deck AV8BNA ODU Demo](Images/Streamdeck_AV8B_Demo.gif)

### Example of Settings to Display Master Caution Lamp:
**Example of Settings to Display Master Caution Lamp:**

<img src="Images/Configuration_AV8B_Screenshot.jpg" width=600>

# Installation

In the Release folder, you can find the file `com.ctytler.dcs.streamDeckPlugin`. If you double-click this file on your machine, Stream Deck will install the plugin.
### Downloads

- For the DCS plugin to work you will first need [DCS-ExportScripts](https://github.com/s-d-a/DCS-ExportScripts) installed, detailed instructions are on their [Wiki](https://github.com/s-d-a/DCS-ExportScripts/wiki). This is the backend that is relied on for communication with the DCS game.

- To install the DCS Interface Streamdeck plugin, you will need to download and run the installer `com.ctytler.dcs.streamDeckPlugin` from [Releases](https://github.com/charlestytler/streamdeck-dcs-interface/releases).

WIP: Will add DCS export instructions.
- Also within [Releases](https://github.com/charlestytler/streamdeck-dcs-interface/releases) is an optional `icon_library.zip` you can download for use with Streamdeck Profiles.

### Initial Configuration

If you plan to only use DCS Interface for Streamdeck with the DCS-ExportScript and not [Ikarus](https://github.com/s-d-a/Ikarus), you can modify the file `DCS-ExportScript\Config.lua` to have the following settings (where `IkarusPort` is changed from `1625` to `1725` for DCS Interface) to get everything connected:

```
-- Ikarus a Glass Cockpit Software
ExportScript.Config.IkarusExport = true -- false for not use
ExportScript.Config.IkarusHost = "127.0.0.1" -- IP for Ikarus
ExportScript.Config.IkarusPort = 1725 -- Port Ikarus (1625)
ExportScript.Config.IkarusSeparator = ":"
```

The export script is also capable of supporting both, instructions can be found in the [Settings Help Documentation - Enabling Both DCS Interface & Ikarus](Sources/com.ctytler.dcs.sdPlugin/helpDocs/helpContents.md#enabling-both-dcs-interface--ikarus).

### Video Walkthrough

A walkthrough of installation and configuration can be found at the below link, along with other instructional videos.
[DCS Interface for Streamdeck Video Instructions](https://www.youtube.com/playlist?list=PLcYO7a2ywThz7nIT4CjRTn737ZM26aqDq)

# Source code

The Sources folder contains the source code of the plugin. The primary components are as follows:
- `Sources/DcsInterface/MyStreamDeckPlugin.{cpp,h}` - StreamDeck C++ API (based on the Elgato streamdeck-cpu example)
- `Sources/DcsInterface/StreamdeckContext.{cpp,h}` - Class which stores each visible Streamdeck button's settings
- `Sources/DcsInterface/DcsInterface.{cpp,h}` - Interface between plugin and DCS
- `Sources/Test/*.cpp` - Contains unit tests for above classes and helps demonstrate their function
- `Sources/com.ctytler.dcs.sdPlugin/proprtyinspector` - Contains html and javascript for handling user settings
- `Sources/com.ctytler.dcs.sdPlugin/manifest.json` - Configuration for the Stream Deck plugin
The Sources folder contains the source code of the plugin. The primary components are as follows:

- `Sources/DcsInterface/MyStreamDeckPlugin.{cpp,h}` - StreamDeck C++ API (based on the Elgato streamdeck-cpu example)
- `Sources/DcsInterface/StreamdeckContext.{cpp,h}` - Class which stores each visible Streamdeck button's settings
- `Sources/DcsInterface/DcsInterface.{cpp,h}` - Interface between plugin and DCS
- `Sources/Test/*.cpp` - Contains unit tests for above classes and helps demonstrate their function
- `Sources/com.ctytler.dcs.sdPlugin/proprtyinspector` - Contains html and javascript for handling user settings
- `Sources/com.ctytler.dcs.sdPlugin/manifest.json` - Configuration for the Stream Deck plugin

# Build from source instructions
A build script is included which will build both the C++ executable which handles the communcation with DCS as well as the package for the Stream Deck plugin: `build_plugin.bat`

A build script is included which will build both the C++ executable which handles the communcation with DCS as well as the package for the Stream Deck plugin: `build_plugin.bat`

You must call this file from the [Developer Command Prompt for VS](https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs) in order for the Visual C++ target build step to work.

Expand Down
Binary file removed Release/AV8BNA.streamDeckProfile
Binary file not shown.
Binary file modified Release/com.ctytler.dcs.streamDeckPlugin
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 585a690

Please sign in to comment.