Moburma Posted May 8, 2013 Share Posted May 8, 2013 Hi there, Well I think I have to take a look at this now. I already worked on some changes to have a better handling of multithreading but stopped the work since the problem seemed to occur in Flight Simulator only. I'll go back to work and give you a new DLL. Unfortunately I cannot work on it before mid-next week :( Hey, don't worry! You've already done pretty damned amazing work to get this going as well it does now, there's no rush! I'm actually trying some other tests now that have had some interesting results. I'll try and make some different test.luas and post them on here to see what happens on different computers. I'm still not totally sure it is your dll at all, I just found one situation where it would not crash no matter what (with no code to change ingame dials etc, however). Link to comment Share on other sites More sharing options...
Moburma Posted May 8, 2013 Share Posted May 8, 2013 Ok, I made a series of test lua files that enable/disable different parts of the bitwise/outcome/etc code. In the end I think the most useful is the one I have attached. This is what I at first thought was "uncrashable" but I found it will crash - sometimes sooner than others. To "use" it, just save it as export.lua in the scripts folder. It does nothing except show one static page on the MFD, and also to receive state changes from Chrillith's dll and pass them to a function with nothing in it (no bitwise ops etc). Even with this I can get it to crash 100% of the time by spinning the rotary about. It seems somewhat random when this happens, it can take a while (up to about 30 seconds), but I've had it crash in around 5 or so. My other experiments with more complete export luas suggested that the more that was going on (and this was stuff completely unrelated to the rotay, reporting info to the screens, etc), the greater the likelihood of crashing as you touched the dial. However as you can see here, just getting info from the dll and nothing else can crash DCS World. I'm not technical enough to know if this is actually the dll's fault though, or just the way we are trying to use it, as algerad3 says.saiteka10c - crash4.lua Link to comment Share on other sites More sharing options...
algerad3 Posted May 9, 2013 Author Share Posted May 9, 2013 O.k a little patience here.... I am going to figure out how to use the lua socket and try from another angle. The hard part was done by Moburma with the module selector code , Now it is my turn to get it in the right directions. I have a lot going on over here so might take some time. (per usual lately). [sIGPIC][/sIGPIC] CPIAS FOR Saitek: Saitek Flight instrument panels and X-52 pro mfd scripts for Dcs http://forums.eagle.ru/showthread.php?t=94174 Link to comment Share on other sites More sharing options...
chrilith Posted May 9, 2013 Share Posted May 9, 2013 Chrillith, Currently we have questions in regards to control of the Rotaries. What kind of output are they giving us? Is it a rotary type value or button type? I.e mouse wheel vs. mouse click? Not sure if you have time to look at the lua export maybe you can clarify thing as far as command inputs. Trying to tackle this in between other pressing matters. It is a button event, clockwise or anticlockwise. No time right know to look at it sorry but I will ASAP. Still have o figure out we DCS sims are working so bad on my laptop. Hopefully the newer version will work better. Link to comment Share on other sites More sharing options...
chrilith Posted May 9, 2013 Share Posted May 9, 2013 About sockets, this is a way took by another guy with FS to try to workaround this kind of problem. The problem is to know where is the lock: DCS, LUA module of saitek drivers itself. The modules provided by Saitek to play with FSX are directly linked to the FS engine without LUA beetween them. Another solution may be to use polling instead of live events. I will think about it too. Link to comment Share on other sites More sharing options...
TimeKilla Posted May 9, 2013 Share Posted May 9, 2013 At the moment there's a'lot of hoop's to jump threw to get it running hopefully once you's guys are done there will be an easier install process for all the dependency's only thing that's holding me back when I get my stick in the next few days. Understand this is very much a WIP and you's are working in a grey area getting this working for DCS. Good luck to everyone great to see people trying to add this support. :thumbup: :joystick: YouTube :pilotfly: TimeKilla on Flight Sims over at YouTube. Link to comment Share on other sites More sharing options...
Moburma Posted May 9, 2013 Share Posted May 9, 2013 Another solution may be to use polling instead of live events. I will think about it too. Yeah, I thought of this as well, I might try and code something up in the lua file to see if checking for changes less frequently makes it behave better. Timekilla: It's actually not THAT hard to get going, the worst bit is the initial installation which involves downloading and extracting stuff. It's pretty solid otherwise, the only problem we're having is getting the extra rotary dial on the stick (which normally does nothing) working without crashing DCS World randomly. All the other features of the stick/dll work great. I probably will try and stick up some kind of blog post/guide on these things though. Link to comment Share on other sites More sharing options...
algerad3 Posted May 12, 2013 Author Share Posted May 12, 2013 I am still here . After a couple of false starts I am now able to immerse myself into this again. I managed to get some info to print to console using lua sockets, and I was able to get something to the x52 for landing lights but, I must be doing something wrong as it does not work properly yet. As soon as I get the lights to work, I will see what happens on the radio end of things . Expect an update within the next 36 hrs. wish me luck. [sIGPIC][/sIGPIC] CPIAS FOR Saitek: Saitek Flight instrument panels and X-52 pro mfd scripts for Dcs http://forums.eagle.ru/showthread.php?t=94174 Link to comment Share on other sites More sharing options...
Moburma Posted May 12, 2013 Share Posted May 12, 2013 (edited) God speed! If you're talking about working on the A-10C, then take a look at my exporter attached to this post. I didn't want to release it until I got more stuff working, but I just got completely stuck. What DOES work: A-10c Exporter 0.1 -- Auto profile loading -- Landing lights state reflected by toggle lights -- Gun arm switch state reflected on Fire button on stick -- All radios frequencies displayed on screen. What DOESN'T work right: -- Airspeed and altitude. These are commented out in the attached file as they crash the MFD. This means the game is sending back null values for this devices. I don't know WHY the hell this is the case. I guess they need to be printed to console to see what it is spitting out. No other module has done something like this to me so far. I tried using the old lock on commands instead (like I saw you did for the radar alt on the KA-50), but they don't work right either. -- ILS dial info. The FIRST (Mhz) dial works fine, but like with airspeed, the second Khz dial outputs junk that crashes the MFD. ARGHH! -- Rotary control. This "works" with the usual caveat that checking the dial state randomly causes DCS world to crash as in all the exporters. However, it also causes other weird stuff to happen - it causes the dials to move to numbers that are normally impossible, and does not step through them in proper order either. Basically completely broken! I got totally stumped by the A-10 and just gave up to be honest. The Huey is a complete piece of cake in comparison. Still, see if my file helps you at all, as the lights are already done. It also uses the shorter bitwise AND code I found on the net, but like I said it makes no difference to stability using the rotary..saiteka10c.lua Edited May 12, 2013 by Moburma Link to comment Share on other sites More sharing options...
algerad3 Posted May 13, 2013 Author Share Posted May 13, 2013 Sometimes life sucks like that .... So close yet so far...I will take a look and see where you are at and maybe we can get at least half a step closer. [sIGPIC][/sIGPIC] CPIAS FOR Saitek: Saitek Flight instrument panels and X-52 pro mfd scripts for Dcs http://forums.eagle.ru/showthread.php?t=94174 Link to comment Share on other sites More sharing options...
TimeKilla Posted May 14, 2013 Share Posted May 14, 2013 Guys have any of yous experience BSOD when using the saitek programming software on X64 windows using the X64 version? If so is there a work around? :joystick: YouTube :pilotfly: TimeKilla on Flight Sims over at YouTube. Link to comment Share on other sites More sharing options...
algerad3 Posted May 14, 2013 Author Share Posted May 14, 2013 I have never experienced the dreaded bsod with the Saitek S.S.T program. I had used it with , Falcon 4, apache /havoc back in the day...not with MSfx or Dcs . I do know that there have been many complaints about the bsod's with Dcs products.They do not play nice with each other.. What I did read pretty much says that you do not need s.s.t, you can create shift states in the input options menu when you assign your inputs. the drawback of course is that you can not use the mode buttons. [sIGPIC][/sIGPIC] CPIAS FOR Saitek: Saitek Flight instrument panels and X-52 pro mfd scripts for Dcs http://forums.eagle.ru/showthread.php?t=94174 Link to comment Share on other sites More sharing options...
algerad3 Posted May 14, 2013 Author Share Posted May 14, 2013 O.k, had to double check... yes you can create shift states within Dcs. also if you open the saitek control panel( the one where you can test your buttons and what not ) and leave it open when you get into the sim , you will have access to every button on the controller. On a side note, I had to verify if the buttons worked with control panel open and assigned the rotary to the radio dial in b.s.2 it worked without crashing the sim. My new thought is to scrap the current form of the radio callback using get command and see if I can connect with the keyboard equivalent command... will have to dig deeper. I totally forgot about all this until now ....Thanks Time Killa you may have saved some hours and frustrations. [sIGPIC][/sIGPIC] CPIAS FOR Saitek: Saitek Flight instrument panels and X-52 pro mfd scripts for Dcs http://forums.eagle.ru/showthread.php?t=94174 Link to comment Share on other sites More sharing options...
Moburma Posted May 14, 2013 Share Posted May 14, 2013 Guys have any of yous experience BSOD when using the saitek programming software on X64 windows using the X64 version? If so is there a work around? Nope, never happened to me. What version of the software are you using? Don't use ones that came on the CD, they are ancient, download the latest ones from their site. They actually just released a new version the other day, although it doesn't seem to change much, it just rebrands it all as MadCats, and annoyingly moves the default .pro folder location Link to comment Share on other sites More sharing options...
TimeKilla Posted May 14, 2013 Share Posted May 14, 2013 Thanks for the reply's guys glad might have saved you some time. :thumbup: Got the latest driver already, I was not even running DCS when it crashed just programming inside the app. I'll just work with shift keys only thing I had trouble with was the knobs you turn where not showing up in DCS when assigning inside it but ill try leaving the driver software open like said. Thanks again. :joystick: YouTube :pilotfly: TimeKilla on Flight Sims over at YouTube. Link to comment Share on other sites More sharing options...
algerad3 Posted May 14, 2013 Author Share Posted May 14, 2013 Are you talking about the roller knobs under the mfd? If so, the only way to get dcs to see them is with the panel control thingy page open. Same for the two push buttons in between and the mod button. Give it a go and we will help where ever we can. [sIGPIC][/sIGPIC] CPIAS FOR Saitek: Saitek Flight instrument panels and X-52 pro mfd scripts for Dcs http://forums.eagle.ru/showthread.php?t=94174 Link to comment Share on other sites More sharing options...
TimeKilla Posted May 14, 2013 Share Posted May 14, 2013 Yep that's them thanks good find, I don't mind leaving it open no big deal. :thumbup: :joystick: YouTube :pilotfly: TimeKilla on Flight Sims over at YouTube. Link to comment Share on other sites More sharing options...
chrilith Posted May 17, 2013 Share Posted May 17, 2013 OK guys, here is a new version of the DLL with (hopefully) better locking/threading support. Let me know if the rotary bug remains. edit: Don't forget to rename the DLL as I forgot to do it :)Lua_SaitekLib.zip Link to comment Share on other sites More sharing options...
algerad3 Posted May 17, 2013 Author Share Posted May 17, 2013 Sweet , I'll give it a go real soon and let you know. [sIGPIC][/sIGPIC] CPIAS FOR Saitek: Saitek Flight instrument panels and X-52 pro mfd scripts for Dcs http://forums.eagle.ru/showthread.php?t=94174 Link to comment Share on other sites More sharing options...
Moburma Posted May 17, 2013 Share Posted May 17, 2013 Well, sorry to be the bearer of bad news, but this version seems to crash a LOT more. Using my A-10c exporter it crashes literally EVERY time I touch the right rotary, whether it be moving the dial or pushing in the button. I've also had a lot of crashes just turning the left dial, which was very rare before (did occasionally happen though). I'll try it with the Ka-50 exporter. Thanks for the effort, though. Link to comment Share on other sites More sharing options...
TimeKilla Posted May 18, 2013 Share Posted May 18, 2013 Fixed my issue with the programming software crashing it would seem plugging the X52 Pro into USB 3 ports has issues moved to USB 2 and working fine. Ill check out you're file m8 in post back if i can figure it out. :) :joystick: YouTube :pilotfly: TimeKilla on Flight Sims over at YouTube. Link to comment Share on other sites More sharing options...
chrilith Posted May 18, 2013 Share Posted May 18, 2013 Well, sorry to be the bearer of bad news, but this version seems to crash a LOT more. Using my A-10c exporter it crashes literally EVERY time I touch the right rotary, whether it be moving the dial or pushing in the button. I've also had a lot of crashes just turning the left dial, which was very rare before (did occasionally happen though). I'll try it with the Ka-50 exporter. Thanks for the effort, though. OK too bad :( Well, I'll go polling to see if that helps. But this is an important change to the module core so do not expect it soon ;) I'll do it internal first so that you don't have to change anything in your code, and if this doesn't help (...), we'll see... Link to comment Share on other sites More sharing options...
chrilith Posted May 19, 2013 Share Posted May 19, 2013 OK, here is a quick and dirty win32 version of the DLL which calls SoftButtons Callbacks() from a DLL thread instead of a "DirectOutput" thread. Let me know how it works.Lua_SaitekLib.zip Link to comment Share on other sites More sharing options...
Moburma Posted May 19, 2013 Share Posted May 19, 2013 Cool, unfortuately I can't test it as DCS World will only run with 64 bit dlls. Is it possible to compile a 64 bit version? Link to comment Share on other sites More sharing options...
chrilith Posted May 19, 2013 Share Posted May 19, 2013 (edited) Here is the x64 version Edit: updated file...Lua_SaitekLib.zip Edited May 19, 2013 by chrilith Link to comment Share on other sites More sharing options...
Recommended Posts