Aginor Posted June 3, 2014 Posted June 3, 2014 I suggest to make 127.0.0.1 the standard value, I guess most people will use it locally. Ok, I added A2DCS to my firewall exceptions and checked the port, it is already the same as in the config.xml file. I _think_ my problems are related to the communication between A2DCS and DCSW, I don't get any indication that something is working at all. Can you do some kind of debug build I could test, so I can see whether there is communication at all? So it isn't working yet, but I'll give it another try tomorrow. :) DCSW weapons cheat sheet speed cheat sheet
Boltz Posted June 3, 2014 Author Posted June 3, 2014 I will have a think about this tomorrow and then give it a fresh test on a 64 bit machine. There is a debug mode in the arduino sketch but that is for arduino to A2DCS comms. I don't understand it since I did a final test before releasing the code. You could check the generated logs to check if the file is run but I don't remember where they are and I am not near my pit. I will look at it again and create a simple config file for a 2x2 matrix. A-10C Cockpit Build Thread My YouTube Channel
Stevos758 Posted June 3, 2014 Posted June 3, 2014 Yes a detailed example would be great for us not so code savvy! Thanks for all the hard work! Facebook Ripp's Garage Tech LLC
Warhog Posted June 6, 2014 Posted June 6, 2014 I just started to try things out and no I haven't made a connection between my two machines yet but after I did get the export.lua file updated. I looked at the switch commands in the config file and realised that I have no clue on how to alter that to make anything work. :dunno: Way over my head. I was wondering though, what is the role of Helios with A2DCS and what does it do to the export.lua file during the initial setup you wrote about. Regards John W aka WarHog. My Cockpit Build Pictures... My Arduino Sketches ... https://drive.google.com/drive/folders/1-Dc0Wd9C5l3uY-cPj1iQD3iAEHY6EuHg?usp=sharing WIN 10 Pro, i8-8700k @ 5.0ghz, ASUS Maximus x Code, 16GB Corsair Dominator Platinum Ram, AIO Water Cooler, M.2 512GB NVMe, 500gb SSD, EVGA GTX 1080 ti (11gb), Sony 65” 4K Display VPC MongoosT-50, TM Warthog Throttle, TRK IR 5.0, Slaw Viper Pedals
Aginor Posted June 6, 2014 Posted June 6, 2014 I was wondering though, what is the role of Helios with A2DCS I'd like to know that, too. The only thing I can see is that Helios adds one line to the bottom of the export.lua in Saved Games/DCS/Scripts/ which seems to be an include for the Arduino.lua. This is the line: dofile(".\\A2DCS\\Arduino.lua") Oh, and before I forget it: @Boltz I suggest a version of A2DCS that gives some more information about what is working or not (perhaps writes a log file?), and I want to say: GIEEEV NAAOOOOO!!! No, seriously, I want to continue testing, what should I do now, Boltz? :) DCSW weapons cheat sheet speed cheat sheet
Boltz Posted June 6, 2014 Author Posted June 6, 2014 Helios is only used to create the export.lua. I thought it would be simpler to use it rather than try to create file structures from scratch. It works well so we may as well use it. Helios does nothing else other than setup an export.lua. If you already have an export.lua then you could just insert the dofile line yourself but that will probably complicate matters. I have been busy at work recently but I will write a debug script for you to try. As for what to do next, I think you should wait for me to recreate your setup and find a fix. Should be able to do that tomorrow evening. If you haven't already noticed I have not been near the software for a while so I have forgotten a lot about the formats and exact procedures but I will get back to it. It is amazing when you think something is done just how much more there is to do to finish anything. I just wanted to release A2DCS since I could have kept working on the first release for months more. My niche certainly is not in writing instructions and I certainly see why a lot of freeware, and some payware, has very little instructions. You have to be prepared to do some tweaking, searching and figuring stuff out to get this sort of software running. It may look like a lot to start with but just take a break and go back a few times and quickly it will make a lot of sense. I will look over everything to make it easier to understand but again that will only happen when i have time. Boltz A-10C Cockpit Build Thread My YouTube Channel
Aginor Posted June 6, 2014 Posted June 6, 2014 That's cool, no need to hurry. You did an awesome work already. :) 1 DCSW weapons cheat sheet speed cheat sheet
Warhog Posted June 7, 2014 Posted June 7, 2014 Thanks Boltz. That's what I was hoping. When my new cockpit is finished I want to remove Helios from my PC. It's been a constant source of problems and frustration. And if I may reiterate Aginors comment...well done. This looks to be an awesome piece of work.:thumbup: Regards John W aka WarHog. My Cockpit Build Pictures... My Arduino Sketches ... https://drive.google.com/drive/folders/1-Dc0Wd9C5l3uY-cPj1iQD3iAEHY6EuHg?usp=sharing WIN 10 Pro, i8-8700k @ 5.0ghz, ASUS Maximus x Code, 16GB Corsair Dominator Platinum Ram, AIO Water Cooler, M.2 512GB NVMe, 500gb SSD, EVGA GTX 1080 ti (11gb), Sony 65” 4K Display VPC MongoosT-50, TM Warthog Throttle, TRK IR 5.0, Slaw Viper Pedals
Boltz Posted June 8, 2014 Author Posted June 8, 2014 I found a couple of small problems in the Arduino.lua. It seems the released version was not the current version I was running. Very strange indeed. I now have confirmation that it works so I will update the folders tonight with an updated Arduino.lua. Thank you everyone for your patience with this small technical problem :) A-10C Cockpit Build Thread My YouTube Channel
Aginor Posted June 11, 2014 Posted June 11, 2014 I think I found a problem with A2DCS: Whenever I include the "dofile" line for A2DCS in my Export.lua, my normal Helios profile for my two touch screens stops working. I mean it doesn't stop working internally, Helios still works and stuff. It just stops communicating with DCSW. So at the moment it is either use my touch screens for the MFCDs and CDU, OR use A2DCS. :( Any idea? DCSW weapons cheat sheet speed cheat sheet
Boltz Posted June 11, 2014 Author Posted June 11, 2014 Works fine for me. I can run a Helios profile and A2DCS with no problems. Don't know what the problem is for you. A-10C Cockpit Build Thread My YouTube Channel
mr.john_doe Posted June 11, 2014 Posted June 11, 2014 Maybe you can post your export.lua ... Can you give me some advices for finding the right commands in the dcs-files for my panel? Maybe a tipp where I can search or which scheme is behind the commands? Greetings ...
tofarley Posted June 29, 2014 Posted June 29, 2014 (edited) Amazing work. I have a few questions though. I was hoping I could get some help. First time poster here. I used to do a lot of arduino tinkering some 4-5 years ago, thus my arduino devices are a bit older. I am using the Boarduino v1.0 from Ada Fruit industries. It is an older ATMega 168 board, based off (I believe) the arduino NG. I hooked up the board and tested it with a blinky LED sketch to make sure everything was working. I compiled your sketch, which was too large for my older device, so I yanked out your code for seven segment displays, and the switch statement that calls it. The sketch compiled, so I presume I haven't broken anything there. In my config.xml, I just uncommented the two example inputs: <add key="I[0,D2,0]" value="123,0" desc="AHCP Panel.Master Train"/> <add key="I[0,D2,1]" value="123,1" desc="AHCP Panel.Master Safe"/> and updated the "controllers" section like so: <add id="00" type="arduino ng" name="AHCP Panel" port="3" baud="9600" init="A2DCS[iD:0;DI:pin1,pin2;DO:pin1,pin2;AI:pin1,pin2;RE:pin1,pin2,0,2,-2;MI:row1,row2,col1,col2;]"/> I am presuming here that "type" is a sort of irrelevant plain text field, and that "port" should correspond to the COM port which my arduino is attached (in my case, COM3). My primary question is, how do I identify the physical pins on the arduino from that code above? I have pins labeled D2 on the board itself, so I thought maybe that was the pin to use, but I'm not getting anything in game, and I'm not sure how to test it aside from that. Also, the documentation gives those few examples, but how can I get a list of all the different DCS-related functions that are available to assign? Thanks again for working so hard on this awesome tool. It will be amazing when I figure out what I'm missing! <add id="00" type="arduino ng" name="AHCP Panel" port="3" baud="9600" init="A2DCS[iD:0;DI:pin1,pin2;DO:pin1,pin2;AI:pin1,pin2;RE:pin1,pin2,0,2,-2;MI:row1,row2,col1,col2;]"/> Edited June 29, 2014 by tofarley
ClayM Posted July 9, 2014 Posted July 9, 2014 Boltz IT WORKS I have managed to get the UFC working! I have been waiting for someone to come up with a program like this for a long time. Currently using Gadrocs EOS bus with multiple Arduinos using multiplexers. However, I have reached its limitations. Your software will finally enable me to move to the next step. The prospect of a working WLP is pretty exciting. Looking forward to anything more you could possibly add especially some kind of solution for the radios. That being said I now have to rewire/reconfigure my entire pit(and buy a batch of diodes). I would sure to like fly this thing one day! Thanks Boltz
mr.john_doe Posted July 9, 2014 Posted July 9, 2014 Hello, which buttons do you use for the UFC? Are you using normal push buttons? Greetings and Congratulations I want to build an costum panel with some important switches such as weapon controlls or gear and power panel but have problems getting the correct names for the functions in the scripts such as desc="AHCP Panel.Master Train" for all functions.
Boltz Posted July 9, 2014 Author Posted July 9, 2014 I have been away for a while so looks like I missed some stuff here. Got a small update to add in soon. When I get some time I will answer some questions and put in the update. Good to hear it is working ClayM and I hope you get flying with your pit soon :) A-10C Cockpit Build Thread My YouTube Channel
ClayM Posted July 9, 2014 Posted July 9, 2014 Boltz Looking forward to an update. At this stage I have not changed any wiring (yet). Do you think I should wait until further software development or start changing things now. I'm not trying to put pressure on you about this and I'm pretty happy with what you have done already just curious on your current thoughts. Although with no further EOS updates I need to change things anyways. Thanks again for your contribution to the madness of Pitbuilding.
Boltz Posted July 12, 2014 Author Posted July 12, 2014 Hi ClayM, If you are changing switches to matrices then you can change your wiring whenever. That code will not change. As for anything else, you should probably wait till I have final code for that part. Currently everything described in the release is final. Boltz A-10C Cockpit Build Thread My YouTube Channel
ClayM Posted July 12, 2014 Posted July 12, 2014 Boltz Could you please clarify something for me. As we speak I am now putting the finishing touches on my fully functional UFC. I commented out the other controllers in the config file and the output for the Master Caution light would always show up in the third slot of the A2DCS screen. So I uncommented other controllers so my UFC arduino would end up in the third slot and everything works great. Does this come from the arduino.lua file or am I doing something wrong with the output string. I have not changed anything from your original config file expect the com port number? Thanks again for your help Clay
Boltz Posted July 21, 2014 Author Posted July 21, 2014 New Arduino.lua file posted up in the "Fix - Pre 21st July 2014" and also inserted into the new downloads to fix any problems you guys were having. I will look at shooting a video of my UFC working soon so stay tuned for more. A-10C Cockpit Build Thread My YouTube Channel
Boltz Posted July 21, 2014 Author Posted July 21, 2014 Boltz Could you please clarify something for me. As we speak I am now putting the finishing touches on my fully functional UFC. I commented out the other controllers in the config file and the output for the Master Caution light would always show up in the third slot of the A2DCS screen. So I uncommented other controllers so my UFC arduino would end up in the third slot and everything works great. Does this come from the arduino.lua file or am I doing something wrong with the output string. I have not changed anything from your original config file expect the com port number? Thanks again for your help Clay To have the Master Caution in the first slot just find the line of code in your config.xml file: <add key="UFC" value="O[2,1,2,v]" desc="UFC Master Caution Panel" /> Change it to: <add key="UFC" value="O[0,1,2,v]" desc="UFC Master Caution Panel" /> Hope it helps, Boltz A-10C Cockpit Build Thread My YouTube Channel
smirkza Posted July 22, 2014 Posted July 22, 2014 Hi Boltz, Amazing work! I'm stuck somewhere between A2DCS extracting the info and it sending to my arduino. I am simply trying to have pin 13 flash in time with the master warning light. I have set up the config.xml file and A2DCS shows that it is receiving the info form DCS. However, my arduino just sits there,staring at me, not doing anything. Did I need to change the arduino sketch at all for it to pick up what I want it to do? My config file looks like this now - <?xml version="1.0" encoding="utf-8" ?> <A2DCS> <!-- serial port controllers --> <controllers> <!-- <add id="00" type="arduino uno" name="AHCP Panel" port="5" baud="9600" init="A2DCS[iD:0;DI:pin1,pin2;DO:pin1,pin2;AI:pin1,pin2;RE:pin1,pin2,0,2,-2;MI:row1,row2,col1,col2;]"/> --> </controllers> <profiles> <profile id="DCS World Warthog A-10C"> <inputs> <!-- input definitions from arduino controllers key : arduino input string for processing formatted I[controller id, control id,,, value] value : input string sent to dcs world for processing desc : textual description of input --> <!-- an example of simple switch input events: <add key="I[0,D2,0]" value="123,0" desc="AHCP Panel.Master Train"/> <add key="I[0,D2,1]" value="123,1" desc="AHCP Panel.Master Safe"/> <add key="I[0,M1,1,1]" value="124,1" desc="Matrix 1, Switch 1, Value 1 mapped to DCSWorld Command 124 Args 1"/> --> </inputs> <outputs> <!-- output definitions from dcs world key : acronym for the output as specified in dcs world arduino.lua script value : output string sent to the arduino for processing formatted O[controller id, output type, pin configuration,,, value] desc : textual description of output --> <add key="UFC" value="O[0,1,13,v]" desc="UFC Master Caution Panel"/> <!-- an example of a single led output on arduino pin 13: <add key="UFC" value="O[0,1,13,v]" desc="UFC Master Caution Panel"/> an exmaple of a matrix led output on arduino pins 6, 7 and 8: <add key="WLP" value="O[1,2,6,7,8,v]" desc="Warning Light Panel"/> --> </outputs> <interps> <!-- polynomial spline interpolations used by input devices such as potentiometers key : key of input device comprising controller id, pin id value : dcs world command and value arguement definition mask : output mask to apply to splined value interp : pin min, output min, pin max, output max min : absolute minimum output value max : absolute maximum output value desc : textual description of interpolation --> <!-- an example: <add key="0,A0" value="123,v" mask="0.000000" interp="0,0;1023,1" min="0" max="1" desc="Analog Input Interpolation Curve - Potentiometer"/> --> </interps> </profile> </profiles> </A2DCS> Thanks for any help you can give, Smirks Cheers, Smirkza
smirkza Posted July 22, 2014 Posted July 22, 2014 Ugh, I see that I hadn't uncommented the device type in the config.xml I have now done that, and the Rx and Tx on the arduino flash away showing (I think) a good connection. However, the master caution light still doesn't flash. The two uncommented lines I now have are - <controllers> <!-- --> <add id="00" type="arduino uno" name="UFC Master Caution Panel" port="3" baud="9600" init="A2DCS[iD:0;DI:pin1,pin2;DO:pin1,pin2;AI:pin1,pin2;RE:pin1,pin2,0,2,-2;MI:row1,row2,col1,col2;]"/> </controllers> and... <outputs> <add key="UFC" value="O[0,1,13,v]" desc="UFC Master Caution Panel"/> --> </outputs> I'm sure I'm missing something here but I can't see what it is. Stumped and can't move forwards... Blast! Smirks Cheers, Smirkza
Boltz Posted July 22, 2014 Author Posted July 22, 2014 (edited) Change the "init" string in the controllers section to: A2DCS[iD:0;DO:13;] That sets pin 13 as a digital output and should then work. Edited July 22, 2014 by Boltz 1 A-10C Cockpit Build Thread My YouTube Channel
smirkza Posted July 22, 2014 Posted July 22, 2014 Change the "init" string in the controllers section to: A2DCS[iD:0;DO:13;] That sets pin 13 as a digital output and should then work. You, sir, are a legend! Top work! (Honestly, thank you - I've been pottering away with Arduino in the hopes of finally getting my head around how to connect it to DCS, then you came along and gave us this fantastic ap!) :thumbup::thumbup: Cheers, Smirkza
Recommended Posts