Inverted Posted July 12, 2017 Share Posted July 12, 2017 (edited) Does BIOS noob here again: Is it possible to use the same hardware for multiple aircraft? As I'm looking at making a generic panel to be used with multiple aircraft. Could I for example use the same LED like this and then it will work depending on which aircraft I am flying: // Master Cuation LED for MiG-21 DcsBios::LED masterCaution(0x22a0, 0x0400, 13); // Master Cuation LED for A-10C DcsBios::LED masterCaution(0x1012, 0x0800, PIN); Edited July 12, 2017 by Inverted Link to comment Share on other sites More sharing options...
jrsteensen Posted July 12, 2017 Share Posted July 12, 2017 I don't know, but I imagine there could be some sort of case statement to do so. I also want to take it one farther and convert a number of items to a HID controller for non-DCS games. Looking forward to a real answer. 1 OpenHornet F/A-18C 1:1 SimPit Website :: DCS Thread Link :: Discord :: Github :: Link to comment Share on other sites More sharing options...
Inverted Posted July 13, 2017 Author Share Posted July 13, 2017 I managed to get this code to work for my first DCS BIOS test: // Master Caution LED for MiG-21 DcsBios::LED masterCaution(0x22a0, 0x0400, 13); // Master Caution LED for A-10C //DcsBios::LED masterCaution(0x1012, 0x0800, 13); // MiG-21 Gun Loaded light DcsBios::LED gunGotovn(0x22b8, 0x4000, 13); // Huey Master Caution Light DcsBios::LED masterCautionInd(0x1416, 0x0100, 13); Note the commented out Master Caution LED for A-10C; as this has the same variable name as the MiG-21 LED it won't compile. If the DCS BIOS code is changed to make each one unique it should work fine. Thanks again to Ian for making DCS BIOS! :) Link to comment Share on other sites More sharing options...
Warhog Posted July 13, 2017 Share Posted July 13, 2017 The code available in the control reference documents is airframe specific. Ian would like to create a system that would allow you to control different airframes with the same hardware but it's not possible using the present version of DCSBIOS. 1 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 Link to comment Share on other sites More sharing options...
Schredder Posted July 16, 2017 Share Posted July 16, 2017 The code available in the control reference documents is airframe specific. Ian would like to create a system that would allow you to control different airframes with the same hardware but it's not possible using the present version of DCSBIOS. I believe that if there's enough memory on the arduino to hold several configurations - its tottaly possible. Upon initialization of the device - one of the pushbuttons of selected profiles need to be held down. Case statement(s) in the early stages of the program will then determine to which configuration to go within the entire code and loop it on the specific determined module. After the module has been selected - these buttons should now be usable for the module itself and not be wasted, since they were redifined in the module specific part of the program. An arduino reset button will allow to choose a different module in a breeze (Hold reset. press and hold selected module while releasing the reset). It's up to you "arduino wizard guys" to make the coding. and I'm conviced it's possible. What do you think ?! 1 Nir Bar "Schredder" "In the warrior code there's no surrender, though his body says stop,his spirit cries... NEVER !!!" Link to comment Share on other sites More sharing options...
Warhog Posted July 17, 2017 Share Posted July 17, 2017 I agree with you completely Shredder...it is possible. It's just not possible with the present version of DCSBIOS. Nor is it as simple a task as you might think. Otherwise it would have already been done. I know for a fact that Ian wants to incorporate this kind of multifunctional integration with all airframes in DCSBIOS 2.0. But that's a big job and Ian has many things on his plate to deal with. In other words I would suggest we all make the best with what's available now. 2.0 is going to take a good amount of time to finish. 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 Link to comment Share on other sites More sharing options...
Inverted Posted July 17, 2017 Author Share Posted July 17, 2017 Thanks for all the info everyone :thumbup: Link to comment Share on other sites More sharing options...
Ranma13 Posted July 17, 2017 Share Posted July 17, 2017 The DCS BIOS Arduino library is just a thin wrapper that sets up the pins and reads/writes the correct serial message. Theoretically, you should be able to just do: // Master Caution LED for MiG-21 DcsBios::LED migMasterCaution(0x22a0, 0x0400, 13); // Master Caution LED for A-10C //DcsBios::LED a10CMasterCaution(0x1012, 0x0800, 13); And it should work. The name doesn't matter, it can be anything you want. 1 Link to comment Share on other sites More sharing options...
FSFIan Posted July 18, 2017 Share Posted July 18, 2017 The current version of DCS-BIOS does not officially support multi-function panels. That does not mean that they are impossible to get working though (i.e. it doesn't actively prevent you from building one either). Adding several controls to the Arduino sketch that reference the same pin numbers but listen to data from different planes will work for LEDs and the generic StringBuffer and IntegerBuffer examples because currently, the address space used by different aircraft modules do not overlap. Things might break if you try to use this approach with ServoOutput though. For inputs, the same approach will work in most cases (the Arduino board will simply send both commands). It might have side effects if several aircraft use the same command names (I haven't checked, but there is no guarantee that they won't). In general, this method wastes CPU cycles and time on the serial bus. It might work for two or maybe three aircraft, but add more and you'll probably run into issues at some point. I do have plans to implement remapping of commands on the PC side in the future. 1 DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
Recommended Posts