Giter Club home page Giter Club logo

touchdcs's Introduction

TouchDCS

.NET 5 CI build GitHub Discord

TouchDCS logo - a vector outline of a hand tapping a surface, with ripples emanating from the tapped location

TouchDCS is an interface between OSC applications (in this case, TouchOSC) and DCS (using DCS-BIOS). It allows you to take custom-built OSC layouts, and use them to control your plane in DCS!

Features

  • Build custom control panels to use on your phone or tablet (all major operating systems supported!)
  • Two-way communication with DCS-BIOS
  • Multi-device support

Getting Started

What you'll need:

  1. DCS-BIOS Flightpanels fork
  2. TouchOSC on your phone/tablet
    • editor recommended as well for creating custom layouts
    • at this time, TouchOSC is $10 on the Google Play store and I have no affiliation with the app or its creators
  3. .NET 6 Runtime (SDK/AspNetCore Runtimes not required)

Download the latest version of TouchDCS

You can get the latest version here. Unzip wherever you wish to run - no install required. I recommend unzipping into a folder just for TouchDCS, since it also requires a configuration file located in the same directory.

Launch TouchDCS

When launching for the first time:

  • a modal may pop up saying Windows protected your PC. Click More info, then click Run anyway. Don't worry, TouchDCS is guaranteed to be 99.9% virus free!
  • you may see another dialog requesting network permissions. Click Allow access (99.9%, remember?)
  • after granting all these permissions, you'll likely have to relaunch in order to actually be able to use your device with TouchDCS. Sorry about that :/
  • TouchDCS will create a default config file for you, config.json, in the same folder as the TouchDCS exe. Open this up, we're going to edit it

Configure TouchDCS to talk to your device

TouchDCS sends and receives commands from your device with TouchOSC installed. Open up the config.json file that TouchDCS created, and edit the settings under osc -> endpoint to match the settings you see in TouchOSC -> Settings -> OSC. You'll also need to add the IP address of the machine running TouchDCS to TouchOSC.

Your default settings in TouchOSC will probably have the ports as 8000/9000 - that's fine. Just make sure they match in your config.json.

screenshot of example configuration

Configure TouchDCS to talk to DCS-BIOS

Unless you have an abnormal configuration, you shouldn't have to do anything here. If your network configuration is different (e.g., DCS-BIOS is running elsewhere on the network and exporting to a non-default IP/port combination), you'll need to edit the settings under dcsBios -> endpoint to match your network configuration.

The default configuration is set up for Open Beta. If you are on the release version of DCS and you are using the FlightPanels fork of DCS-BIOS, modify dcsBios -> configLocations to %userprofile%/Saved Games/DCS/Scripts/DCS-BIOS/doc/json/. The default config has multiple paths depending on the version you're using - but if you have multiple versions of DCS-BIOS or DCS installed, you may need to pick just one in your config file.

Adding a layout

You can find out more about creating layouts and adding existing layouts here. Make sure to change your configuration path under osc -> configLocations to wherever you end up putting your *.json osc configuration files.

That's it!

Now when you run TouchDCS, you should be good to go. Load up a mission and test your layout - when you press the sync button in the layout, the sync light should light up. If it doesn't, check the console to see if your aircraft has been identified. If not, there might be an issue with your DCS-BIOS setup; verify that's working property first. You might also try restarting both TouchOSC and TouchDCS. The applications don't have to be launched in any specific order, but the first run can be a bit funky.

Going Further

Using the TouchOSC Editor on your computer, you can create your own layouts.

Found a bug?

Probably. This thing needs a lot of work. Open an issue in the Issues section and let's get it fixed.

Acknowledgements

Troubleshooting

  • Check that you are using the DCS BIOS fork not the original.
  • In the config file the send port should be the same as the TouchOSC receive port and the config file receive port should be the same as the TouchOSC send port.
  • If you can send but not receive check that the ipadress for whatever is running TouchOSC is set in the config file.
  • To get the layout from your computer to a tablet one way is to download TouchOSC to your computer and import the layout to TouchOSC running on your computer, map it as a server and then connect to it from your tablet. (A better explanation might be needed).

touchdcs's People

Contributors

charliefoxtwo avatar jansvensson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

touchdcs's Issues

DCS-BIOS 2.7.16 breaks console app?

I can post more detailed logs later, time permitting, but in lieu of that:
The console app raises an exception when starting up, about a duplicate key being added.
Dropping into a debugger it looks like it happens when the Mirage F-1 is discovered.
I ran a tweaked codebase that skips that aircraft and the exception is avoided.

2.7.16 adds the Mirage F-1.

The previous DCS-BIOS release (2.7.14) does not exhibit the problem.

Remove default config from config.json

Right now all configuration is loaded from config.json. This is great, except when a user modifies their config file and later attempts to update to the latest version of TouchDCS which might have different default configuration set. It results in an awkward attempt to merge json configuration files which is sure to end in disaster.

If we can either split this into two separate config files or, more likely, just move the default configuration into code rather than config.json, it will put us in a position where we don't need to worry about an update overwriting a user's config settings (especially when things like osc devices are saved in that file as well).

Add zeroconf support

TouchOSC uses zeroconf for a lot of setup. It would be nice if we could use it as well in order to simplify adding new devices.

It looks like the key TouchOSC uses is _osc._udp.local

Getting Started information is lacking

The readme offers pretty weak support for new users. The Wiki can be used to document exactly how a new user should get started, and the next steps they might take.

Adding multiple OSC devices to the config.json

I am having trouble adding more devices to the config.json. My programing skills are 0, sorry. How could I add a second device here? I tried various things but always results in crashing and errors.

"osc": {
    "devices": [
      {
        "ipAddress": "192.168.3.78",
        "sendPort": 9000,
        "receivePort": 8000
      }
	      ]

Thank you, awesome software :D already creating my second template and I love it.

Mosquito not recognized

Hi,

first, I want to say “good job”. You had a great idea and I love what we can do with touchosc and dcs.

I would also like to bump the issue mentionned here #4 (comment)

Now that the mosquito has been released, I downloaded the newest dcs-bios but touchdcs says that it cannot see the “mosquito”, and I believe it is because of the issue above.

Or maybe I am missing something?! Has anyone been able to make it work?

from the different config files I read from dcs-bios, the naming is different (from file: https://github.com/DCSFlightpanels/dcs-bios/blob/master/Scripts/DCS-BIOS/lib/Mosquito.lua ):
BIOS.protocol.beginModule("Mosquito", 0x7000)
BIOS.protocol.setExportModuleAircrafts({"MosquitoFBMkVI"})

Project documentation is lacking

Each C# project should have its own readme outlining what its purpose is, and the top level readme should also cover this at a high level. This will make it easier for new contributors to get up to speed.

Export.lua integration

It would be nice to have TouchDCS autorun through Export.lua like other DCS addons do. I'm not sure what this entails, but SRS has done this with a C# application so it must be doable.

Auto-updater

It would be nice if the application could check for updates on startup, and prompt the user to update if a new version is available.

Default configuration is created with `aliases` section

This section should not be present in the default configuration. Additionally, it is being written with casing issues causing commands for aliased aircraft to not work. This section should not be saved to the default configuration.

Add aliasing for aircraft names

Some aircraft have multiple models which output different ACFT_NAME values in dcs-bios, but use the same json file (e.g. A-10C and A-10C_2 both use a-10c.json. We'll need a way to associate multiple aircraft with the same dcs-bios json file.

Aircraft that have multiple models: A-10C, C-101CC, F-14B (soon?), all FC3 aircraft, P-47D, P-51D, SA-342M, Spitfire LF Mk IX.

This list does not include modded aircraft, or aircraft that share config files with mods (F/A-18C and UH-1H). The easiest way I've found to check is to look at the lua files in dcs-bios and check for a line like BIOS.protocol.setExportModuleAircrafts({"A-10C", "A-10C_2"}). If there are multiple exports specified, then we'll need to account for that.

I think we can add this to the config.json file. This will allow people to add their own mods fairly quickly for testing too, and update their config if we're behind on a patch. From there, we can build an alias dictionary in BiosOscTranslator and reference that when determining the active aircraft or active json file to consider.

Installer/updater

SRS has a really cool one-click installer that will put everything in the right place and even append a line to your Exports.lua if necessary. It would be cool to do something like this for TouchDCS.

Keyboard input

Hey, I was wondering if it was possible to send keyboard input through touchdcs?

I would love to have a page on TouchOSC with F1-F10, ESC, and a combination of keys (eg: CTRL+L, RIGHT SHIFT+RIGHT CTRL+L).

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.