stelios2000 Posted March 14, 2016 Posted March 14, 2016 (edited) Hello all, first of all i wanted to thank Duckling http://forums.eagle.ru/member.php?u=13238 for his incredible help to my cockpit. this guy is fabulus...thank you. He managed to make SIOC "talk" with DCS Mir2000. But whatever we did we couldnt make the switch or push button function at the game. We tryed at A-10 and works just fine. look what we did and please tell me where is the error. From here : C:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\M-2000C\Cockpit and the file Devices.lua -----DEVICE ID------- devices = {} devices["FLIGHTINST"] = counter() -- 0 devices["NAVINST"] = counter() -- 1 devices["ENGINE"] = counter() -- 2 devices["INSTPANEL"] = counter() -- 3 devices["VTH_VTB"] = counter() -- 4 devices["PCA_PPA"] = counter() -- 5 devices["ENGPANEL"] = counter() -- 6 devices["PWRPNL"] = counter() -- 7 devices["PCN_NAV"] = counter() -- 8 devices["RADAR_RDI"] = counter() -- 9 devices["RADAR"] = counter() -- 10 devices["EW_RWR"] = counter() -- 11 devices["RWR"] = counter() -- 12 devices["SUBSYSTEMS"] = counter() -- 13 devices["MAGIC"] = counter() -- 14 devices["SYSLIGHTS"] = counter() -- 15 devices["AFCS"] = counter() -- 16 devices["ELECTRIC"] = counter() -- 17 devices["UVHF"] = counter() -- 18 devices["UHF"] = counter() -- 19 devices["INTERCOM"] = counter() -- 20 devices["MISCPANELS"] = counter() -- 21 devices["TACAN"] = counter() -- 22 devices["VORILS"] = counter() -- 23 and from clickabledata.lua --------------HUD/VTB----------------------------------------------------- elements["PTN_221"] = default_2_position_tumb(_("HDD Power Switch"), devices.VTH_VTB, device_commands.Button_221, 221) ------------- Engine Start Panel------------------------------- elements["PTN_645"] = default_2_position_tumb(_("Engine Start Switch Cover"), devices.ENGPANEL, device_commands.Button_645, 645) --------------Miscelaneous--------------------------------------- elements["PTN_191"] = default_button(_("Audio Warning Reset"), devices.SYSLIGHTS, Keys.PlaneResetMasterWarning, 191, 0, 1) so from here C:\Eagle Dynamics\DCS World OpenBeta\Config\export\SIOCConfig we edit the siocconfing.lua inputsTable = { [2]= {TwoPositionSwitch, 4, 221, 1}, [5] = {TwoPositionSwitch, 6, 645, 1}, [10]= {TwoPositionSwitch, 15, 191, 1}, } none of them worked... we tested the hardware(physical) connections with sioc console and they are correct wired. thanks in advanced. Edited March 14, 2016 by stelios2000
FSFIan Posted March 14, 2016 Posted March 14, 2016 I can't be sure because you did not post the complete devices.lua and I don't have access to my DCS computer to check right now, but I'd bet $10 you are using the wrong device IDs. Don't trust the comments, read the code! IIRC the counter() function is defined like this at the top of devices.lua: local count = 0 local function counter() count = count + 1 return count end That means that the first device ID will be 1, not 0. You should also watch out for places where the numbering in the comments skips one or two digits. Doesn't happen in the M-2000 devices.lua, but I have seen it for other aircraft (e.g. UH-1H). The Lua interpreter does not care about misleading comments, the truth is in the code :) If you add one to all the device IDs you have tried, it should work. DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua
stelios2000 Posted March 14, 2016 Author Posted March 14, 2016 i discovered it just a little after i posted this thread...:music_whistling::music_whistling: while THIS is at openBETA.... the correct is at DCS WORLD..... and you are right....at dcs world is +1 from the openBETA :thumbup::thumbup::thumbup: Ian;2711465']I can't be sure because you did not post the complete devices.lua and I don't have access to my DCS computer to check right now, but I'd bet $10 you are using the wrong device IDs. Don't trust the comments, read the code! IIRC the counter() function is defined like this at the top of devices.lua: local count = 0 local function counter() count = count + 1 return count end That means that the first device ID will be 1, not 0. You should also watch out for places where the numbering in the comments skips one or two digits. Doesn't happen in the M-2000 devices.lua, but I have seen it for other aircraft (e.g. UH-1H). The Lua interpreter does not care about misleading comments, the truth is in the code :) If you add one to all the device IDs you have tried, it should work.
Duckling Posted March 18, 2016 Posted March 18, 2016 this guy is fabulus... ehurrmm, thanks Stelios. Now you make my blush (in true green NVIS light) @Ian: Thanks, can't beat that time to resolve, missed that totaly Cheers Gus - - - -
stelios2000 Posted April 1, 2016 Author Posted April 1, 2016 (edited) According to this post http://forums.eagle.ru/showpost.php?p=2626815&postcount=181 i created a new var at sioc.ssi Var 0006, name caution_light, Link IOCARD_OUT, Device 0, Output 11 // caution light i test it through sioc_monitor and the led turns on when i press the 11 port then i edit sioc_config to myIndicators = { [6] = {0,525}, -- caution light } gIndicatorTables = {myIndicators} and run Mirage2000. But whatever i do nothing happens :cry::cry: I also sent email to Razbam and wrote to their FaceBook wall asking for the cockpit argument table for lights/leds 7segments etc etc.....some weeks now and NO RESPONSE.....pity also here is the mainpanel_init http://www.filedropper.com/mainpanelinit Edited April 1, 2016 by stelios2000
Recommended Posts