Jump to content
The simFlight Network Forums

Search the Community

Showing results for tags 'Lua'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Product Support Forums
    • FSUIPC Support Pete Dowson Modules
    • MyTraffic Support Forum
    • FeelThere Support Forums
    • FS Commander Support Forum
    • Flying W Simulation
    • AConstable Traffic Sounds Support Forum
    • Fabio Merlo Products Support Forum
    • Elite-Air Studio Support Forum
    • Nikola Jovanovic Support Forum
    • Intrasystems Support Forum
    • FScene Support Forum
    • Taburet & DanVFR Support Forum
    • Environ Scenery
  • simFlight DE
  • FS MAGAZIN (DE)
  • simRussia
  • FSUIPC Client DLL for .NET

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. Hi all! This is my first attempt with lua, or any code for that matter. I know nothing about programing so pleas bare with me. My first attempt is to get one FSUIPC Offset to change another offset from 0 to 1. But this dose not seem to work. I use MSFS2020 and are using FSUIPC7 I have pot the "test.lua" text file in the root of FSUIPC folder. This is the code I am trying. If (ipc.readUW(0x67E7) == 1) then ipc.writeUB (0x66E2, 1) end
  2. Hey guys, based on the TripleUse.lua i tried to get an more generic and easier to configure script. This supports to easily assign lua functions to button presses but not only for the rising or falling edge of the signal but also for double-press (like doubleclick) or for long press. It is based on Pete's TripleUse.lua but extended to be able to call the funtions that were already defined in other lua scripts like the ones coming with LINDA. You can just refer to it and re-use all the additional stuff like writing something to VRInsight panel displays etc. --[[ 1=BU0836A
  3. Hi, The Lua Plug-ins manual (pdf) has a link referring to a solution for a 64 bits socket library solution. However, this link does not work for me and searching in the User Contribution section for "socket" does not help. Can you please provide a link to the solution for using sockets in 64 bit FSUIPC? Thanks! Emile van Gerwen.
  4. Hi, I use a 128 button box and want to use my rotary knobs with FSUIPC. They send short joystick button presses for each direction a different button. But as the are >32, I needed to use a LUA script and/or LINDA. For LUA only, I just used the provided example - it somehow worked, but the refresh rate is very very low (~1 second). Even when setting poll rate = 100. When I use LINDA it gets better, but it is still much to slow reacting. I stopped turning the knob (and no button presses anymore) but the heading bug was still increasing. It is also having around 1 se
  5. Here is a Lua file that progressively apply and/or disengage brakes, adjustable in both directions, for those who only have a button for brakes. [INSTALLATION] FS closed Copy the complete code block below, paste it into an empty .txt file & rename it Smooth_Brake.Lua Place the above file in the FS/Modules folder Add the following to the [Auto] section of the FSUIPC(4).ini file - X=Lua Smooth_Brake - Where X is the next available number in the [Auto] section. (pg. 42 - FSUIPC4 for Advanced Users.pdf) Comment out ( ; ) or remove the original brake b
  6. Hi all, I have a few technical questions before buying FSUIPC7 because I'm not sure about what I can acheive from FSUIPC7/LUA scripts regarding the SimConnect Indexed variables. As example, I take the Asobo Airbus A320 . Someone has already reported that Offset 07D4 [AP ALTITUDE VALUE] is not working. He gave up thinking it was a bug. I found that Offset 281C or 3102 [Master Battery Switch] are not working neither. After having looked into Microsoft SDK and SimConnect, I found that the A320 FCU AP Altitude is linked to an indexed SimVar [AUTOPILOT ALTITUDE LOCK VAR:3] It seems
  7. This was done just to see if it could be made to work. ( too much coffee ☕, insomnia & boredom also contributed ) For the advanced FSUIPC user, gauge programmer, cockpit builder, lua tweaker etc.., a problem arises, at times, where the aircraft designer has code that constantly fires commands into the sim. 👎👎👎 When it comes time to do some logging, for instance, to see what control is being fired, on user input, is tough to find in the FSUIPC console window. The [General] "DontLogThese=" entry in the FSUIPC.ini does a fine job of blocking these. Of course, you could do a text lo
  8. Hi there, I am having a very strange problem with FSUIPC3 in FS2004. A few weeks ago, it suddenly decided to no longer load any of my LUA files. This problem came seemingly out of nowhere. It is not any one specific LUA file, but any LUA file at all. I have tried: Reinstalling FSUIPC Reinstalling FS2004 The specific LUA file I want to use is called FreezeAlt.lua and it looks like this: althi = ipc.readSD(0x574) altlo = ipc.readUD(0x570) while 1 do ipc.sleep(10) -- 10 mSecs = 100 times per sec ipc.writeUD(0x570,altlo) ipc.writeSD(0x574,althi) end I
  9. Hi all, I want to add two offsets to FSUIPC in order to save the value of two Q400 variable. These two offsets will be read by Spad.neXt. So I wrote a LUA script that reads variables value (could be 0 or 255) and writes they to FSUIPC offset 66C0 and 66C3. I need to read both variables continuously so I thought of writing a C# program that every 50ms would write to the 0x0D70 offset, and pass the Lua command with the name of my lua script. From what I understand when the 0x0D70 offset is written FSUIPC executes the indicated script via the indicated command, so I expect to have FSU
  10. *** Moved from FAQ Support Forum *** Dear fellow simmers, it is a long time since I last modified my flight simulator setup, about 10 years and more! I had built my own console with switches and LEDs, to interface with FSX. It was working until now with FSX and Windows 7. I had programmed it myself using FSUIPC (4 I think) and Visual Basic. Now, just 2 weeks ago I installed Windows 10 and also P3D V4.5. When trying my old program (called RealSwitches) some switches still brought the correct reactions in P3D as they did before in FSX. For example gear up and down still worked. Ho
  11. I have always wanted to have a "quick and dirty" way to monitor specific L:VARs without installing a new gauge and trying to find the ones needed by scrolling etc. Perfect for things like programming sub-systems and such. It's a 3 step process. Run "LVARS_2_TXT.lua" to get the full list (output = "ALL LVARS.txt") of L:VARs currently loaded by the selected aircraft. It's a "run once" lua but, one can use it multiple times if multiple aircraft projects are being done as it appends to the file. (creates a master list) -OR- Run the FSUIPC command "List local panel variables" to d
  12. Hello, I am trying to extract variables from the P3DV4 and store them on a CSV. The given example works great for me. But when I try to write the code myself it doesn't work. Moreover, when I just copy paste the code with varied parameters I still get some error. I have attached the error below along with the code. Please do help me out. CODE-------------------------------------------------------------------------------------------------------------------------------------------- -- "Record to CSV" example data logging LUA plug-in, by Pete Dowson, September 2008 -- Open an exisi
  13. I am running FSUIPC 5 1.03g, registered. I am trying to run a LUA script (via Key Presses section) that I used with P3Dv3 that controls my PMDG 737NGX home made overhead panels, etc. in P3Dv4. I exclusively use UDP to communicate between Arduinos and FSUIPC which uses Lua Sockets. I now get the LUA error: I am assuming this is because I have not compiled a 64 bit version of LUA. I installed the 32 bit version a long time ago and I muddled my way through it with Luarocks version 5.1.x, I believe. My question is, am I on the right path in believing that I need to figure out how to c
  14. Hi, I searched the forum before I post and I saw that someone tried to communicate the Lua script and Arduino. We're sharing the same purposes. Let me say the problem I deal: For PMDG 737, I can control any button, switch in the simulation by sending data from Arduino to Lua script. Also, I have no problem to send data from Lua script to Arduino by using Lvar list in FSUIPC documents. However, I can't read the state of any warning light as Overheat Lights in the overhead panel. Only need to know, what should be the way of reading the state of lights in PMDG 737. If th
  15. Hello, i hope anyone can help. I am a starter in LUA, but i have to read a Bit out of a 2 Byte Offset. The Offset is 0x04F0 and i want to read Bit number 14 and 6. I tried local psCMD1 = ipc.readUB(0x4F0) for Bit 0 and it works, but how can i read Bit number 14 and 6 ? Pls, can anyone help her? Thanks Matthias
  16. Hello: I am just starting to scratch the surface of using Lua scripts with FSUIPC. I am trying to solve a problem with the Milviz C310 where the prop condition levers do not move into the feather range using my CH Products throttle quadrant. Despite accurate calibration, moving the hardware prop levers aft of the detents does not move the software levers into the feather range, nor does the prop feather animation get displayed. Instead, the Milviz C310 requires users to right-click the prop lever knobs to feather the props. My current calibration does work for other default and
  17. Hello, let me start by thanking Pete for his great work! :-) I am trying to replace the use of link2fs with lua-scripts. link2fs is great and it works but it seems to be no longer supported and while it finally seems to work with P3D V4 again, sooner or later it might cause problems. With the help of fess' and other examples online, I've written the following short script to adjust the QNH. I have verified using the link2fs traffic monitor that the arduino really sends "C25" and "C26" with linefeeds. The "Arduino_Data"-function also gets called, whenever I turn the rotary e
  18. Hello everyone,I made a Home cockpit real size of Cessna 182 and I would make my G1000 using FSUIPC to be compatible with A2A C182 Gauges.A2A use LVAR on their Aircrafts and especially on the Gauges, that's why my G1000 send me wrong values (For example, I have 1400 RPM on my G1000 when the Plane is at 2500 RPM).I'm not a LUA specialist and I'm cherching a LUA Pro that can help me on this code. We can speak about the Modality on MP.Waiting for your answers.Kind regardsLudo
  19. FSUIPC version 4972 Hi, I am trying to write to a local variable in CaptainSim's C130 in fsx using a Lua file. There's a switch in the VC that I want to automate. The FSUIPC log shows an error for this action: ipc.writeLVar("L:pRpm1ButtonPos",dummy) To make sure the variable exists I added a ReadLvar to the code. C130.lua 109 function rpmLow() 110 state=ipc.readLvar("L:pRpm1ButtonPos") 111 ipc.display("RPM: "..state,1) 112 dummy=1 113 ipc.writeLVar("L:pRpm1ButtonPos",dummy) 114 end 141 event.button("D", 5, 1, "rpmLow") The read works,
  20. Hi Pete, Been putzing around with a little trick found on FSDeveloper regarding corrected fuel flow & keeping turboprops running away during start and other conditions. It uses (>C:SIMVARS:TURB ENG CORRECTED FF:1, pounds per hour) through the XMLTools.dll interface. It works well but needs gauge coding per aircraft. I was trying to get this to work using lua by writing to 0x2020 (& the 3 others) so it could work globally on all turboprops. The feedback is --- doesn't work. The following code was inside of a while - do loop which does work perfectly but there was no ret
  21. Hi Pete One of my users has been reporting issues with FSUIPC5 when changing aircraft when multiple LUA files are in use. The user is using the Lua file multiaxis.lua which allows axes to be swapped when a joystick button is pressed. The command is communicated via the offset 0x66C0). There appears to be a conflict with LINDA when called, normally, via ipcready.lua and the [auto] section loading Lua multiaxis. Renaming ipcready.ipc prevents the crash but this means that LINDA LUA modules not being loaded. [auto] 1=lua multiaxis [LuaFiles] 1=ipcReady 2=linda 3=AirbusX_T
  22. Hello Peter How do i write hid buffer in lua script?...My problem is I want to get AP altitude value then write that value into HID buffer using lua. HID buffer will update 7 segment display by pic microconroller. thanks
  23. Hi Pete or any other LUA Guru, I've now converted to P3DV4 and I'm running FSUIPC 5.103g . A lua script I used in FSX successfully to play a video doesn't seem to respond. I'm using the ext.shell in the lua library. video, error = ext.shell("L:\\1.mp4", "EXT_FOCUS") ( As I said, this worked in FSX) the log showed no errors, but the video didn't play. ********* LUA: "test" Log [from FSUIPC version 5.103g] ********* 13259554 System time = 16/07/2017 14:37:18, Simulator time = 11:37:18 (21:37Z) 13259554 LUA: beginning "L:\Prepar3D v4\Modules\test.lua" 13259
  24. Hi Pete I have started to see a repeating LUA Error Invalid Argument when running LINDA LUA code to start a second module using the LUA function ipc.runlua(path) (where path is \linda\system\init). 944344 LUA.1: LINDA:: [START] Path = linda/system/init 944625 LUA: "C:\FSX\Modules\linda/system/init.lua": killed 944860 *** LUA Error: cannot open : Invalid argument 1001125 LUA: "linda.lua": killed 1001125 LUA.0: [START] *********************** STARTING LINDA *********************** This could come down to sequencing where the ipc.runlua() is being caused before
  25. Hello, Compiled lua files give me an error "Bad header in precompiled chunk" with P3D4 and FSUIPC 5.103. Source LUA files are OK. Everything was OK with P3D3 and FSUIPC4 : both sources and compiled files were executed. I tried x86 and x64 versions of luac53, no change, still the same error. Any idea on how to execute compiled lua scripts in P3D4 is welcome, thanks in advance and sorry for my English ... Regards, Frederic
×
×
  • 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.