charliefoxtwo / TouchDCS

An application for interfacing with DCS-BIOS using TouchOSC (or potentially other OSC applications).
GNU General Public License v3.0
36 stars 2 forks source link

Mosquito not recognized #15

Closed TipToe08 closed 3 years ago

TipToe08 commented 3 years ago

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 https://github.com/charliefoxtwo/TouchDCS/issues/4#issue-871338879

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"})

charliefoxtwo commented 3 years ago

On mobile and will take a closer look later when on pc but this seems like a dcs-bios bug, so I'll ask them about it (checked with them, not a bug). In the meantime, as part of the solution to #4 I did add a configuration option (undocumented) to map when the names are different. You could try adding this to your config.json and let me know if it resolves the issue (at least temporarily). I want to look into a better way to handle this permanently (I have an idea or two).

"aliases": {
    "Mosquito": ["MosquitoFBMkVI"] 
}
charliefoxtwo commented 3 years ago

When you say "and others" not recognized, are you saying there are also other planes that aren't being recognized too? Because that should have been fixed for all existing modules in #4.

TipToe08 commented 3 years ago

I will try the alias today and let you know if it works.

By "other airplanes" I meant that if the names have aliases they might not work. It was a bad naming where I meant "might not work with other airplanes". I renamed the title to be more accurate

charliefoxtwo commented 3 years ago

Ah, yeah the other ones should definitely work, and I'm working on a permanent fix for the Mossie so this won't be a problem in the future - in the upcoming update, any plane that dcs-bios supports will automatically be good to go.

TipToe08 commented 3 years ago

Again, awesome idea that you had, I love what TouchOSC can offer us for dcs

TipToe08 commented 3 years ago

I confirm, the alias works! Thanks

charliefoxtwo commented 3 years ago

Excellent! I'll leave this issue open so it's more visible to anybody else with the same issue until I roll out the proper fix.

charliefoxtwo commented 3 years ago

@TipToe08 would you be able to test and confirm this new permanent fix works for you?

  1. Update to the most recent version of DCS-BIOS (i.e. clone the master branch again)
  2. Download this new prerelease version of TouchDCS
  3. Remove that aliases section from your config
  4. Start TouchDCS

If you didn't also copy the json files, you'll need to load into a mission first, then start TouchDCS.

Let me know if this fix works for you. Hopefully it does!

TipToe08 commented 3 years ago

I didn't have a lot of time to test it but it throws me an error: (sorry for the picture, I was on another machine) Unhandeled exception. System.InvalidOperationException: Sequence contains no element

image

I started dcs, started a mission and started touchdcs once in the mission and I got the error.

charliefoxtwo commented 3 years ago

Well that's... Interesting. Thanks for testing. I didn't see that on my end so I'll have to investigate further.

charliefoxtwo commented 3 years ago

So this needs to be fixed on my end, but did you update DCS-BIOS? It seems like this is throwing because it can't find an AircraftAliases.json file in Saved Games/DCS.openbeta/Scripts/DCS-BIOS/docs/json (I think is the path?). That file will only get generated in the latest version of DCS-BIOS (just released 2 hours ago).

It shouldn't throw anyway (that's my fault), but I'd say that's what the issue seems like to me.

TipToe08 commented 3 years ago

I have dcs-bios version from 2 days ago. I will try with the latest version and let you know.

I confirm, it works with the latest version of dcs-bios! Great job!

charliefoxtwo commented 3 years ago

Excellent! I'll have to get that exception fixed.

charliefoxtwo commented 3 years ago

Alright, this should be fixed fixed in the new latest version. Closing this issue now, but let me know if you have troubles with any other aircraft (notably those with variants, e.g. A-10C, P-51D, spitfire, etc)