Jump to content
The simFlight Network Forums

guenseli

Moderators
  • Posts

    464
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by guenseli

  1. Many thanks! I'm a big step closer.... Just one problem left: I need the code for keystrokes not for buttons (unfortunately the MCP Combo couldn't give out joybuttons, just keystrokes) heres my code (just for increment): 110=117,26,Cx510066C0,x00040001 111=B66C0=0 117,26,C66587,71132 112=B66C0=1 117,26,C66587,71133 113=B66C0=2 117,26,C66587,71134 114=B66C0=3 117,26,C66587,71135 115=B66C0=4 117,26,C66587,71136 I have tested it with buttons, adding a "P" and the button number and it was working very well. But my "simple" transforming for keystrokes isn't working. There must be obvisiously an error in my code...? Secod question. Is it right, that for decrement that code have to change to Cx610066C0,x00040001 ? thank you very much!
  2. Hello Pete, you know already about my programming (and logical) knowledge :oops: I'm searching now for an code to assign a rotary knob. As many (all?) airliners the PMDG MD11 has also some functions to show datas on the ND: MAP, PLAN, VOR, APPR, TCAS I have now the VRInsight Combo with a rotary switch which I'd like to assign to all this functions (if possible) The rotary knob does nothing more than give out a signal if you turn right and a signal if you turn left. The MD11 ND mode functions are all commanded via the ROTOR_BRAKE parameter, e.g. MAP mode is ipc.control(66587, 71132), APPR is ipc.control(66587, 71135) and so on. Could you please help me how I could make a kind of counter which switches through the ipc.control parameter up when rotating the knob to the right and down when rotating to the left? Any kind of similar counters I have programmed till now have had some kind of value which I was able to read out (ipc.readLvar) and then I counted up from this variables... but with this I have no clue. The problem is that I can of course always start a counter up from 1, but that means whenever the rotary knob will be used, the ND modes begins from start. E.g. if you are currently in VOR and want to the next APPR, then the counter begins from 1 and you go from MAP, PLAN, VOR to APPR... Do you think there is a solution? Thank you very much, Guenter
  3. Not one for each function. I have separated the part which is working (all the normal switches) And then I have the three party for the Sperry AP in one LUA. I have disabled now this LUA. Yes, that sounds logical, but I haven't the knowledge about it. And as I said it isn't sooooo much important :lol: The LUA functions "helped" me now in may ways with many addons. I hope I can get a Universal Joystick Controller BU0836X the next weeks and build up a little switch panel for all the nice functions I have created ;-)
  4. No they don't work... FSX is freezing again. Ok, doesn't matter! I will throw out this codelines and everybody have to hand-dial the rotary knobs... btw: the same commands worl with the PMDG J41 without problems. So I slightly come to the conclusion that sth must be hiccup inside the Catalina codes.... Anyway, thanks and a good evening!
  5. Hello Pete, I have now reworked my complete code with the kind of smarter coding of your example... Thats the difference between a good programmer and me: I don't have these ideas y myself :? Also I have made for the AP rotaring functions a extra LUA file so if they don't work I will delete them, forget them and command the rotary switches with the mouse again.... BUT: I haven't made exzessive testing with it, but it seems that it will work now with smarter codes... We will see... Thank you very much for your effort!!!!
  6. okay, maybe we're now a little step further... I'm sure now that the issue is in my code or in the Aerosoft Catalina (or maybe in FSUIPC)... But not in the VRInsight stuff, sorry that I have thought this, Andy... I have some LUA codes programmed and here the FSX freezes after a while. Then I have restarted FSX and tried the LUA file with the standard beech baron, which ended in a freeze, too. Then I coded just the little single line from above to test, restated FSX and ended with a freeze, too. That was the point I come back to this thread yesterday... I now found out, that the error is somewhere "stored" and is present after starting FSX after the crash. That was the big mistake in my thoughts... so every restart of FSX doesn't have eliminated the issue (whatever it is) I have to completely log out or completely restart my PC that the issue is away. Then the little LUA testfile (hdg bug inc) runs without any issues, even with joybuttons or keyboard or MCP Combo. Yesterday I have never restarted my whole computer, because I have thought a terminated FSX is enough. OK, I have sent you the FSUIPC.log via mail. Hope this is ok...otherwise delete it... Below is the LUA code segment wich is causing the error. Some little explanations: It is for the Aerosoft Catalina which is having nearly no keycommands. The part below is for the special Autopilot. it is a very good replica of an old, hydraulic or pressure driven sperry AP. But the other side is, that the normal AP commands will not work. If you can find here an obvisous error in my code or some part which could cause this issue, then please correct me. Or you have an other idea... But we shouldn't waste our times too long. The worst case is, that the Catalinas Sperry AP couldn't be managed with keycommands, just with the mouse in the VC. And that isn't a great tragedy... thank you very much! guenter -- Sperry Pitch Inc (down) if ipcPARAM == 22 then SPVar = ipc.readLvar("L:Sperry_pitch_set") SPVarInc = SPVar + 0.25 if SPVarInc ipc.writeLvar("L:Sperry_pitch_set", SPVarInc) elseif SPVarInc == 12 then end -- Sperry Pitch Dec (up) elseif ipcPARAM == 23 then SPVar = ipc.readLvar("L:Sperry_pitch_set") SPVarDec = SPVar - 0.25 if SPVarDec > -12 then ipc.writeLvar("L:Sperry_pitch_set", SPVarDec) elseif SPVarDec == -12 then end -- Sperry Gain Elevator ON/OFF (value 3.5) elseif ipcPARAM == 24 then GEVar = ipc.readLvar("L:Sperry_gain_elevator") if GEVar ipc.writeLvar("L:Sperry_gain_elevator", 44) elseif GEVar > 0 then ipc.writeLvar("L:Sperry_gain_elevator", 0) end -- Sperry Bank Inc (left) elseif ipcPARAM == 25 then SBVar = ipc.readLvar("L:Cat_Desired_Bank") SBVarInc = SBVar + 1 if SBVarInc ipc.writeLvar("L:Cat_Desired_Bank", SBVarInc) elseif SBVarInc == 26 then end -- Sperry Bank Dec (right) elseif ipcPARAM == 26 then SBVar = ipc.readLvar("L:Cat_Desired_Bank") SBVarDec = SBVar - 1 if SBVarDec >= -26 then ipc.writeLvar("L:Cat_Desired_Bank", SBVarDec) elseif SBVarDec == -26 then end -- Sperry Gain Aileron ON/OFF (value 3.5) elseif ipcPARAM == 27 then GAVar = ipc.readLvar("L:Sperry_gain_aileron") if GAVar ipc.writeLvar("L:Sperry_gain_aileron", 44) elseif GAVar > 0 then ipc.writeLvar("L:Sperry_gain_aileron", 0) end -- Sperry HDG Inc (left) elseif ipcPARAM == 28 then SAVar = ipc.readLvar("L:Desired_Heading") SAVarInc = SAVar + 2 if SAVarInc ipc.writeLvar("L:Desired_Heading", SAVarInc) elseif SAVarInc >= 360 then SAVarDec = 1 ipc.writeLvar("L:Desired_Heading", SAVarDec) end -- Sperry HDG Dec (right) elseif ipcPARAM == 29 then SAVar = ipc.readLvar("L:Desired_Heading") SAVarDec = SAVar - 2 if SAVarDec >= 0 then ipc.writeLvar("L:Desired_Heading", SAVarDec) elseif SAVarDec ipc.writeLvar("L:Desired_Heading", SAVarDec) end -- Sperry Gain Rudder ON/OFF (value 3.5) elseif ipcPARAM == 30 then GRVar = ipc.readLvar("L:Sperry_gain_rudder") if GRVar ipc.writeLvar("L:Sperry_gain_rudder", 44) elseif GRVar > 0 then ipc.writeLvar("L:Sperry_gain_rudder", 0) end end
  7. Hello Pete, I can reproduce the error again.... This is the situation: code inside the LUA file: ipc.control(65879) (HDG Bug inc - just simple, just for testing) aircraft: default Beech Baron Joystickbutton or direct key input is working (the key is TAB+F9) BUT: I have the MCP Combo from VRInsight. There's a keymapper where you can assign keystrokes to the combo and then get this keystroke into FS. This is why I get the TAB+F9 keycombination. (theres no other possibility unfortunately) Now when I rotate with the HDG knob of the MCP Combo (which means fast repeated TAB+F9) the FSX is freezing after few seconds. Like the same what we had at the beginning of this thread way back. Hold a button pressed or holding down the keys does not produce the hangup. Just the rotation with the HDG knob... So, I know that must be fault with the Combo or the way the combo acts with keystrokes and communicates with FSUIPC or whatever... I just write this to inform you, and maybe you have an idea. I will write now into the VRInsight forum this problem, where Andydigitl could help me, hopefully. I will report back...
  8. Yes, and as always: thank you very much for the great support!
  9. Oh, Sorry... FSUIPC Version is 4.548 The Lua file is the same file as in the initial thread It only contains ipc.control(65879) (HDG Bug inc) My normal file has an other code, but like I stated in the initial thread FSX also crashes with a standard plane and this simple code. Yes I mean that.... It is a little bit confusing to me now... Right now I can't reproduce the error :roll: Before it was every time... So, don't waste your mind about that... I just wanted to be sure that the fix of that problem wasn't get lost with the last update. If I can definitely reproduce again it I will post again here. Strange things happen with all this machines... ;-)
  10. hmmmm.... could you please have a look if theres sth wrong with the latest (10th Nov) version? With a joystickbuttonpress (hold) there's no error, with a keypress (hold) the error comes as befor the fix.... thanks very much, guenter
  11. no, I'm sorry, there seems to be some other error in my code. Sorry, was a little bit too fast :oops:
  12. Hello, could it be that with the actual version (10th November) this bug has come up again??
  13. Hello Pete, I use the Autosave feature and have the settings for two saved flights. But in the PMDG/MD11/panelstate folder I have after two days countless (83) Autosaves from FSUIPC. They all named "AutoSave day date time.FLT.0.slv.rte" Same with the A2A Addons I think as I have several files named "AutoSave day date time.377" in the documents/Flight Simulator X Files folder. I can delete them every few days of course, but is there a possibility that this files could automatically get deleted with FSUIPC? Thanks, guenter
  14. WORKS :!: :!: :!: Great! Thank you!!!!
  15. Hello Pete, the first post of you is exactly what I'm fear of: that you throw me out of your forum one day :lol: Just kidding... hopefully not. I'm very happy, that you changed your mind and found a solution. Why I want to do this? Because the fascinating PMDg J41 has no well working key command solution and with FSUIPC everything is possible. And the LUA thing allows me to combine things, which just work with macros and things just working with LUA Vars. Till now everything works fine, because that where just simple buttons. But the heading bug is aomething you have to hold a key or button pressed. And thet was then the situation when FSX crashed. The example above with the heading bug, is just a simple example to show you that it has nothing to do with the J41 or or with my "special" codes. I hope, you understand me now a little bit. Unfortunately, when I want to download the update I get an error: The requested URL /beta/FSUIPC4545.zip was not found on this server. And please be sure, that, whatever I ask you, you never have to present me the solution as fast as possible. Your support is outstanding and the fastest I know. And I feel a little guilty to see you work in night and sundays... So, I hope you have a little fun with your work. And I have to thank you a lot!
  16. Hello, I found something strange... It happend during my J41 command assigenments. Now I have tested it also with a normal standard FSX plane and simple LUA commands if you'd like to execute a LUA file with holding the buttons or keys down, then FSX will hang and crash. i have a LUA test file created, just with this simple entry: ipc.control(65879) (it is heading bug increase) Now, if you assign this LUA file to a Joy button or a key and hold the button or key down to let the heading bug move, FSX crashes after 5 to 30 seconds... If you assign the normal heading_bug_increase via FSUIPC, there's everything normal as it should. Can you confirm this? Or it it as always, that something in my system is faulty or I have made something wrong? :lol: guenter
  17. i have tested the DontResetAxes, but it isn't working, sorry. So, I think thats clearly a Saitek or Driver issue... who knows. But many, many thanks that you provided this possibility with this new interim update! guenter
  18. ok, yes....why haven't I tried the TAb button again??? :roll: works of course... thank you!
  19. Thanks again, Pete! Maybe it looks very simple to you, but the following code took me 2 hours to create. But now I can TOGGLE the two battery switches of the J41 Great :lol: -- LEFT Battery switch TOGGLE if ipcPARAM == 1 then lbat = ipc.readLvar("L:LeftBatSwitch") if lbat == 1 then ipc.writeLvar("L:LeftBatSwitch", 0) ipc.control(66587, 8028) elseif lbat == 0 then ipc.writeLvar("L:LeftBatSwitch", 1) end -- RIGHT Battery switch TOGGLE elseif ipcPARAM == 2 then rbat = ipc.readLvar("L:RightBatSwitch") if rbat == 1 then ipc.writeLvar("L:RightBatSwitch", 0) ipc.control(66587, 8028) elseif rbat == 0 then ipc.writeLvar("L:RightBatSwitch", 1) end end
  20. UUUhhh heavy stuff in english language ;-) i've understood the first part, ok. For the second there're stil questions I need an example for this, please. Now I have understood that a LUA file with different commands could look like this: Inside a file which is called example.lua ipcPARAM=1 ipc.writeLvar("L:pmdg_hide_yoke", 0) ipc.writeLvar("L:pmdg_hide_yoke", 0) ipc.writeLvar("L:pmdg_hide_yoke", 0) ipcPARAM=2 ipc.writeLvar("L:pmdg_hide_yoke", 1) ipc.writeLvar("L:pmdg_hide_yoke", 2) ipc.writeLvar("L:pmdg_hide_yoke", 3) (its just examples, don't look at the commands as they all they same...) As I understand it I can now choose via the FSUIPC menu for button 1 "lua example" with parameter 1 and for button 2 "lua example" with parameter 2. Is that correct? Is the code correct or how do I have to handle the ipcPARAM??? heavy stuff, heavy stuff :wink: I'm very interested in this programming stuff, so forgive me my daily questions...
  21. Hello, its me again... ;-) I bring up this old thread because I'm still stuck on this "problem" (I mean the initial post theme with combining LuaVars in Macros, not the last question here) As above I'd like to get two commands together: C66587, 8028 ; this plays a sound file in the PMDG J41 (don't ask why Rotor-Brake plays a sound file; PMDG does everything with the rotorbrake parameters) L:LeftBatSwitch=TOG ; this toggles the Battery switch ON and OFF As you stated above I can't combine these two commands into a Macro, e.g. 1=Batt 1.1=C66587, 8028 1.2=L:LeftBatSwitch=TOG I'l see myself that it wouldn't work But if I create a LUA file for the Battery switch and for all the switches coming after this, I get tons of separate LUA files for each switch in this plane. Do you see my problem? A macro is much more handy as you write several commands in one file, named with numbers. Do you think something like that would be possible also with LUA commands in the future? Or do you have a solution that I just have one LUA file for different switch-commands? Next question is, that I already now how to handle the LuaVrs in a Lua file, but I have no clue if it is possible and how to handle the comand for the rotor_brake (e.g. C66587, 8028) in a Lua File? What ould you do to combine the Lua Var and the C66587 command for one button? Except the possibility to assign it direct in the FSUIPC4.ini... Hope you understood me... And yes, I was flying yesterday without programming :wink: :lol:
  22. I'm happy that I can get myself connected to the internet... no need till now to get something named LUA to this, too.... :lol: But give me one or two month...
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.