Jump to content
The simFlight Network Forums

Airbuspilot

Members
  • Posts

    128
  • Joined

  • Last visited

Everything posted by Airbuspilot

  1. okay, thanks for the fast Response. I will try it this Way and see, if it brings the Healing. :-)
  2. Sorry, but i have to come back for a Solution of this Problem: Tried the Workflow with your Advise for the Auto Section in the Fsuipc ini File. I did'nt get it to work correct. So, i try now with Macros. Everything went okay, except from the following Problem, i can't solve by myself. Would be very glad, if you have a Solution. That is the Code in FlightLog.lua, that involves the B777PowerUp.lua if ipc.get("B777PowerOn") == "N" then ipc.macro("Lua:B777PowerUp") end The Code in the B777PowerUp.lua works fine, except for the last Function of the DualJetwaySwitch (Key) on the CDU. Can someone please have a Look at it? Thank you. B777PowerUp.lua B777PowerUp.log
  3. That is the Problem. I have to do Compare OPs, to avoid LUA Errors on arithmetic OPs or dividing by Zero Errors. So, when reading the Initial Fuel Data from the File, i got the calculated Fuel for the Flight and can do all further Calculations with this Value. This Problem occurs only with the PMDG777. So i think, i had find a Solution, that i will try this Morning. Hope, it works. Have a nice Sunday and thanks for your Answer.
  4. I am back again with a Question. Read and Assign of the Data from the File will work fine. But, these are FuelData and have to be numerics, because i have to do further Calculations with them. When i run the Lua, this Error occurs:112422 *** LUA Error: D:\Simulatoren\Fliegen\P3Dv32\Modules\FlightLog.lua:163: attempt to compare number with string Is it possible, to read out the Data from the File as Numerics? And if so, how have i to do it.? Thanks in Advance for your Help.
  5. Hope, i solved it by myself. There was a malformed Typing in Variablen.lua, which stopped the Module from running. It seems, that after the Module had stopped, no one of the Variables were visible in other Modules, even if the Mistake was very late in the Module. Now i will code all the needed Modules. If i encounter any further Problems, i would appreciate, if you could help again. Again, special Thanks for your outstanding Support.
  6. In Variablen.lua i set it with ipc.set("KiloPoundFaktor", 0.453592) In FlightLog.lua, i will receive it with KPF = ipc.get("KiloPoundFaktor") This also leads to the LUA-Error with a nil Value in KPF. Seems, that i do something wrong, or that it is not possible, to make Variables outside the Modules visible. If anybody had some further Ideas, i would highly appreciate them.
  7. Thanks for your outstanding Support. I will try it out and see, if it will work.
  8. Thanks for your outstanding Support. I will try it tomorrow and hope, it will work. Hope, i can find an Example, how to use it exactly.
  9. i saw that Post, but did not understand the Lua-Code for decoding the String. Are Frequencies not all in the same Length? My FuelFields could vary in their Length. Could this be handled with your Code?
  10. Hmmm, that seems not to work. Or maybe i am doing it wrong. I have build the Variablen.lua File, that holds all Variables, needed to operate my FlightLog.lua. In this File, there is an Entry declared global KiloPoundFaktor = 0.453592 Made the necessary Entry in FSUIPC.ini [Auto.B772] 1=Lua Variablen and [LuaFiles] 1=FlightLog 2=log lvars 3=record to csv 4=LvarsToTxt 5=Variablen But it seems, that the declared Variables are not "visible" for other Modules. Because running the FlightLog.lua leeds to this Error 363672 *** LUA Error: D:\Simulatoren\Fliegen\P3Dv32\Modules\FlightLog.lua:174: attempt to perform arithmetic on global 'KiloPoundFaktor' (a nil value) It makes also no Difference, if i declare that Variable as global or not. Everytime the same Error occurs. Any Idea to solve this?
  11. Thanks for your Reply. The Value comes from an external Program (MS Access) and will be saved in B777FuelQty.txt. It is the only Entry in this File. Now i will read this with file = io.open("B777FuelQty.txt","r") InitialFuelQty = file:read() file:close() Let's say, the FileEntry is 15000. Is the above Code enough to assign 15000 in the File to the Variable InitialFuelQty in LUA? If so, how do i read more Entrys in a File, i.E. Line by Line or comma separated?
  12. Hello together, ist's me again. :-) With LUA we are able to write Data into a TextFile. But, is it also possible to read Data from a TextFile and assign the getted Value to a Variable? If it is possible, is there an Example, how to code it in LUA? Thanks in Avance again for your Answers. Joachim
  13. aaah, okay and thanks for your Response. I will try it out.
  14. And i wondered, why the Search for the word keypress didn't show a Match. Thank you very, very much for your Help.
  15. Hi Thomas, thanks for your Reply. Yes, the ASCII Table works fine for Characters and Numerics. But the Special Keys are not listed. In Petes Documents there is i.E. the ALT-Key described with the Numeric Code 16. Shift and Ctrl are listed with 1 and 2. These Codes doesn? t correspond with the ASCII Code Table. F-Keys are also not described in ASCII or Extended ASCII Tables. So, i asked for a Collection especially for LUA accepted Codes. Joachim
  16. First of all, thanks for your Reply. If this works for me too, that was pretty easy. If i understand that right, you have separate Lua Files created, they were named i.E. B777captain.lua? But, what is the "Connector" between [Auto.B777] and the separate Files? Do i have to make special Entrys in each File?
  17. Hello together, is there a List, where all the LUA accepted KeyCodes are listed in one File? Especially the F-Keys, like F1, F2, etc.. Thanks in Advance for your Answers Joachim
  18. No, normally, i do not read somethings, that are'nt there. But please understand my Point of View. When i ask for a Solution of a Problem, i did all i can before asking. I was very angry, when reading your Comment, if i am unable to add two Numbers. Let's calm down and forget it. Meanwhile, i solved this Problem. The Value to open a Door on the PMDG772 is 100. The Values, i tried, were much to small to make the Doors Movement visible. Joachim
  19. Hello together, again i have a Question. As we all know, have different Aircraft their different Needs. My actual Module blows up and grows bigger and bigger. I think, it is Time, to outsource the Aircraft Specific Code in separate Lua-Files for each Plane. So i want to build a Lua File as MainControl. This Module will call a Module, that holds all the needed global Variables in one Place and makes them visual for all following Steps. Then the MainControl reads the Aircraft Data from the Sim and decicdes, which Module for the specific Aircraft has to be called. For better understanding (i hope), i have made a WorkFlowSchema, that is attached. My Question now is, if this is possible. Also i need to know, how to call them. Do i have to call or is it enough to call them with the function() Command? Please keep in Mind, that i would create a separate for each Aircraft. Thanks in Advance for your Answers. Joachim
  20. Don't need a Calculator to calculate it. Did it with my Brain and composed it to ipc.control(83656,1) The only Thing here is, that this did'nt have any Effect. Also trying with ,0 and ,2 and ,3 and ,4 and at least with ,5. Without any Success. So, i thought, i had to calculate an other Way, i.E. by calculating in Hex or any other Prorammers Calculations. That's the Reason, why i asked. Sorry for asking. I will try to find Solutions in other Forums. You can close this Topic. Last but not least, i am not that dumb, that you maybe Think.
  21. I know, how to use the ipc.control. With this one ipc.control(66695,1), i operate the Jetway, if there is one and the Aircraft is a Passenger Jet. What i don't know, is how to compute the stated Number? Maybe somebody could help me, to put this Information, token from the 777 SDK, together to a ipc.control Command? #define THIRD_PARTY_EVENT_ID_MIN 0x00011000 // equals to 69632 and #define EVT_DOOR_CARGO_MAIN (THIRD_PARTY_EVENT_ID_MIN + 14024) Thanks in Advance to anybody, who will help. Joachim
  22. Yes, there is something similar in the 777X SDK Folder. Unfortunally, i don't know, how to put this in a LUA Code, similar to my above given Example. Do you have a Hint for me please, how to realize i.E. (THIRD_PARTY_EVENT_ID_MIN + 14005) in a LUA-Code Line? Thanks in Advance Joachim
  23. Hello Pete, thanks for your fast Reply. Afaik, yes. Only the Entry1L could be opened with the FS Door Toggle. Especially on the Freighter the Main Cargo Door could'nt be operated by FS Door Toggle Commands. Seems, this is only possible over the Menu key in the CDU. Here is my Lua Code, that should open the Main Cargo Door. DoorStateCM = ipc.readLvar("L:7X7XmaincargoDoor") if DoorStateCM == 0 then ipc.writeLvar("L:7X7XmaincargoDoor", 100) end If i execute this, the Door will flicker between open and Close. Do you have any Idea, what is wrong with that Code? Thanks again for your Help. Joachim
  24. Hello there, need a little Help or a Code Example for opening Doors on the PMDG 777X only by LUA-Script. I don't want to use Keys or Buttons to do that. In Example, the MainEntry1L should be opened, at the Moment, the GSX Stairway Car is placed. Could anbody please help, solving this Issue? Only the Code for opening the Door is needed. I am familiar with the Readout of GSX LVARS. Thanks in Advance Joachim
  25. Hello Folks, again i will ask for a little Help. With those Lines of Code Monat, Tag = ipc.readStruct(0x0244, "2SB") Jahr = ipc.readSW(0x024A) Flugdatum = (string.format("%02d.%02d.%02d", Tag, Monat, Jahr)) Try to read out the Local Date Values. For Month and Year this works fine. But the Day doesn't fit the Day of the actual Date. Tried some other ReadValues like "2UW", "2UB", "2SW". It leads all to the same Result. Month and Year are correct, Day is not. I would be very glad, if someone could help. Thanks in Advance. Joachim
×
×
  • 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.