Jump to content

Major Announcement: New software to to connect panels to DCS


FSFIan

Recommended Posts

Absolutely superb, my missing link. Learning up on it now Ian, going to simplify my build enormously. Many thanks.

 

weeb :thumbup:

Windows 7 64 Home Premium, i5 3570K (3.4 @ 4.4GHz), Asus P8Z77-V LX, 16GB dual channel 1600 ram, EVGA Nvidia GTX980ti, 240 GB OCZ SSD, 3 TB Raptor, Thrustmaster Warthog Hotas and Throttle, Saitek Pro Combat Rudder pedals.

Link to comment
Share on other sites

  • Replies 398
  • Created
  • Last Reply

Top Posters In This Topic

I have just added experimental UH-1H support to the development version.

You can download it by going to the GitHub repository and clicking the "Download ZIP" button.

 

I found some things in the UH-1H Lua files that I could not identify, which I put in the "WTF" category. They could be related to the civilian version for all I know.

 

It would be great if someone who is more familiar with the UH-1H would take a closer look at it using the interactive reference docs for testing.

Link to comment
Share on other sites

This is really incredible. Thank you so much for your hard work! Really time for me to get off my butt waiting for a solution to start hooking up my boards. A shame about the non-donation thing, but if you ever formalize a group, please accept something in return.

 

Seriously, again, thank you. Hope to get started today or tomorrow!

Buttons aren't toys! :smilewink:

 

My new Version 2 Pit: MacFevre A-10C SimPit V2

My first pit thread: A-10C Simulator Pit "The TARDIS."

Dzus Fastener tutorial, on the inexpensive side: DIY Dzus Fastener

Link to comment
Share on other sites

This is really incredible. Thank you so much for your hard work! Really time for me to get off my butt waiting for a solution to start hooking up my boards. A shame about the non-donation thing, but if you ever formalize a group, please accept something in return.

 

Seriously, again, thank you. Hope to get started today or tomorrow!

 

Think we got a group here buddy. Honestly I can't believe how welcome they made a noob like me. I have boards and shit all over the place but they have given me a place to start, they are not judgmental, stupid questions! hell they even answer them. You popped into my thread and worried about a hijack, I'm in your thread. I think now we gonna have some of the best a10-c pits. I wish other guys all the best with their f-18 pits and helicopter pits, because we are here to help each other. If I don't know how a switch speaks to DCS, someone does. :joystick:

Windows 7 64 Home Premium, i5 3570K (3.4 @ 4.4GHz), Asus P8Z77-V LX, 16GB dual channel 1600 ram, EVGA Nvidia GTX980ti, 240 GB OCZ SSD, 3 TB Raptor, Thrustmaster Warthog Hotas and Throttle, Saitek Pro Combat Rudder pedals.

Link to comment
Share on other sites

Thanks for doing this! I've just recently gotten an Arduino Uno and am looking forward to getting it connected to DCS. Really looking forward towards the UH1H support. I already see it is in experimental stage on GitHub!

Link to comment
Share on other sites

New video:

MAwGLaV48DI

 

slate: The UH-1H support is complete. It's considered experimental because it has not received much testing yet and because there are a few exported values that I could not correlate with an instrument.

Please give it a try and report any issues that you may encounter.

  • Like 1
Link to comment
Share on other sites

Will the UH1H be incorporated into the control-reference.html? I've tried skimming through the .lua located in Scripts/DCS-BIOS/lib but the code is not equivalent to how the control-reference outputs.

 

Other than that I was able to very easily get everything working on the A10C! This is extemely user friendly and I'm excited to start building. Thanks again.

Link to comment
Share on other sites

Ian this looks like excellent work. I'm definitely going to look into using this and getting Helios to work with it. One note on your cascading setup. RS-232 is not meant for multidrop like that, and you'll probably run into signaling problems on longer runs. Rs-485 is a better choice for that. I'm going to probably run a i2c and re-485 bus daisy chained between each panel.

Link to comment
Share on other sites

I'm definitely going to look into using this and getting Helios to work with it.

 

That would be awesome. One of the major goals of DCS-BIOS is to need only a single Export.lua file for everything. If Helios had DCS-BIOS support, that goal would probably be achieved for a lot of users.

 

Please take a closer look at issue #1.

I would like to encode enough information in the machine-readable reference documentation for Helios to set up bindings automatically.

The current code base contains the beginnings of this, but the information is not complete or reliable yet. I'd appreciate your input on how this feature should be designed.

 

Also take a look at the ProtocolParser class in the DCS-BIOS Arduino library for the state machine logic that parses the export protocol. That code should be simple enough to adapt. (There's also a JavaScript version in the control reference documentation.)

 

One note on your cascading setup. RS-232 is not meant for multidrop like that, and you'll probably run into signaling problems on longer runs. Rs-485 is a better choice for that. I'm going to probably run a i2c and re-485 bus daisy chained between each panel.

 

I don't expect the UART+I2C approach to scale up to a full cockpit. However, because it can be done without any external components, it is the most inexpensive method. As soon as signaling problems start to occur, one can add another $1.50 USB-to-Serial converter and start a new UART+I2C bus.

I did some theoretical calculations on the I2C bus and came to the conclusion that you start with about 8 meters of allowed wire length and lose 0.3m for each device you connect to the bus (assuming Cat5 cable with a capacitance of 50 pF/m). I expect the UART to perform better than I2C, because it does not rely on pull-up resistors for a logic high (but one might have to add a transistor in case the TX pin of the USB-to-serial module is not built for such a large fan-out).

 

I estimate that a full cockpit can be done with three USB-to-serial converters (left console, front dash, right console).

I am by no means an electrical engineer though (if I see a differential equation, I start to run in the opposite direction), so I might be full of crap here.


Edited by [FSF]Ian
Link to comment
Share on other sites

Hi all ? Im not a programming expert but perhaps it can be realised. When use a cuple moduls it could be better to use a can-bus system because you have one Interface to communicate with the PC ( Ethernet / USB) the other traffic between the modules works via can-bus http://en.wikipedia.org/wiki/CAN_bus

the MC are used for the modules are: 18F45K80

Link to comment
Share on other sites

The DCS-BIOS Arduino Library does not care how the controller is connected to DCS.

You have to feed the export data stream to a ProtocolParser instance one byte at a time (parser.processChar()) and provide an implementation of sendDcsBiosMessage() which sends a message to DCS.

 

The library includes template sketches that cover serial, ethernet and I2C communications; it is easy to adapt this to other bus systems like RS-485, CAN, ... take your pick.

 

The choice of inter-board communication method will be an individual trade-off that considers several factors, for example:

  • Cost
  • Complexity
  • Required robustness against electrical noise (e.g. from PWM-controlled backlighting or original aircraft parts that run on higher voltages)
  • Whether you build a full cockpit or just a few panels
  • Your prior experience

 

EDIT:

New video:

gp8maRS7XB0


Edited by [FSF]Ian
Link to comment
Share on other sites

Ian, this is some great stuff. Spent some time digging through your code, it feels like insides of my head are about to boil. I don't have to much problems working with my hands, but that stuff... Hats off to you!

 

Cant come up with the exact location where, but it looks like you are preparing to extract the contents of CDU in a text form . or was it my imagination?

 

The altimeter is awesome as well.

Anton.

 

My pit build thread .

Simple and cheap UFC project

Link to comment
Share on other sites

Cant come up with the exact location where, but it looks like you are preparing to extract the contents of CDU in a text form . or was it my imagination?

 

Not "preparing to", it's already working :)

The relevant Lua code starts at line 1036 of A-10C.lua and relies on data in the "CDU.json" file which was created from the game files by this python script.

 

Try to set up your reference documentation in live view (

), select the A-10C module and then the "CDU Display" category...
Link to comment
Share on other sites

I helped WarHog with a sketch for a TACAN panel that used a MAX7219 to control four 7-segment digits. We still have to make a few adjustments (it was written for an earlier development version of DCS-BIOS), but when that is done, we can add it as an example sketch to the Arduino library.

Link to comment
Share on other sites

Ian firstly great app, I am changing the way I have my pit setup and was setting the CMSC,

It all went really easy and I had no problems in getting the display up and running however the jammer display only shows sby, It should show sby air, sby sam1, sby sam2 or sby aaa. apart from that it shows chaff/flares and changes as used.

I will wait for a fix before doing anymore with that now onto the CMSP.

I am also very interested in the led digit displays for radio, tacan & ils.

Keep up the good work..

AMD A8-5600K @ 4GHz, Radeon 7970 6Gig, 16 Gig Ram, Win 10 , 250 gig SSD, 40" Screen + 22 inch below, Track Ir, TMWH, Saitek combat pedals & a loose nut behind the stick :thumbup:

Link to comment
Share on other sites

[FSF]Ian

 

THANK YOU.

 

 

After many years of unsuccessful attempts... within a couple of hours of running with this program testing with the arduino, my very first initial test with this program and some of my software, I was able to get my VRinsight CDU working IN GAME for the very first time!

 

THANK YOU.

 

There really needs to be a forum section for discussion of DCSBIOS.

 

Once the CDU is finalised, then the VRinsight Mode Control Panel II Boeing is on the agenda. Great days ahead!

 

Did I say THANK YOU?

Link to comment
Share on other sites

the jammer display only shows sby, It should show sby air, sby sam1, sby sam2 or sby aaa.

 

That was fixed in v0.2.0. If you update to the current version (and update your sketch because the CMSC display offsets have changed), it should work.

 

within a couple of hours of running with this program testing with the arduino, my very first initial test with this program and some of my software, I was able to get my VRinsight CDU working IN GAME for the very first time!

Thank you! This is the best kind of feedback I can wish for, because it means the documentation can be understood by people other than myself (thanks to WarHogs feedback and editing).

Please post your results on these boards when you are done!

 

There really needs to be a forum section for discussion of DCSBIOS.

For now, please post DCS-BIOS related questions in the "Input and Output" forum (or "Home Cockpits" if it is directly related to panel building). If the amount of DCS-BIOS-related discussion grows further, I will ask ED for a subforum.

 

I want to avoid a separate forum or mailing list (most people interested in DCS-BIOS already have an account on the ED boards).

 

I would also like to ask everyone to post to the public boards instead of sending me PMs if possible. This way, the answers I give may help other people too. I am subscribed to both "Input and Output" and "Home Cockpits", so if it appears there, I won't miss it.


Edited by [FSF]Ian
Link to comment
Share on other sites

Hi All, IAN great Stuff !

Any CAN BUS system works: http://www.simparts.de/ How did they do that ?

You need one controller and then you can connect every panel you want. A friend buildt a cockpit with these parts: http://www.a10-homecockpit.de/alle-alben/!/oa/6603752/ It have many benefits. 1. one USB/Ethernet connect to PC, other panels are plug and Play, reduced cabeling...... What i want is to start a disscussion, if it possible or not that the comunity to develop an equal system.


Edited by Ghostraider
Link to comment
Share on other sites

Hi All, IAN great Stuff !

Any CAN BUS system works: http://www.simparts.de/ How did they do that ?

You need one controller and then you can connect every panel you want. A friend buildt a cockpit with these parts: http://www.a10-homecockpit.de/alle-alben/!/oa/6603752/ It have many benefits. 1. one USB/Ethernet connect to PC, other panels are plug and Play, reduced cabeling...... What i want is to start a disscussion, if it possible or not that the comunity to develop an equal system.

 

Sorry, I don't understand what it is exactly that you are asking.

Do you want to build a CAN-bus-powered template sketch for DCS-BIOS?

Do you want to use DCS-BIOS-powered panels with the simparts stuff?

Are you already working on this or do you just hope that someone else will do the work?

 

In general:

 

To connect to a CAN bus, you need a CAN transceiver chip and either a microcontroller with CAN built-in (the ATMega328 does not have that) or an additional CAN controller chip.

Then you will need to adapt the DCS-BIOS import and export protocols to the CAN bus, which can only send 8-byte messages.

 

For the export protocol, this is fairly simple: use one CAN message for each two-byte write access. The CAN bus is fast enough that the additional overhead won't matter.

 

For the import protocol, you will need to convert the messages to a more efficient representation for the CAN bus.

The control identifier strings tend to be longer than 8 characters, so you will need to map them to, say, a 16-bit integer. You will also want to represent the argument in a more efficient manner, maybe as an "argument type" byte followed by a two-byte argument value.

The argument types you would need to cover currently are "<number>", "+<number>", "-<number>", "DEC", "INC", "TOGGLE", "OFF", "PUSH", "RELEASE".

 

If you are serious about starting a project for this, I suggest you open a new thread to discuss it further.

Link to comment
Share on other sites

Sorry about this, not everybody is programming expert like you !

my question, is it possible to connect your Panels or others to a can bus system like sim parts or whatever or do you think its to complicate. When you have an other forum who can talk about this, tell me.

 

THX for sharing your hard work, answers......

 

It could be easier when we have this in a german forum


Edited by Ghostraider
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...