Jump to content
The simFlight Network Forums

joeherwig

Members
  • Content Count

    16
  • Joined

  • Last visited

  • Days Won

    1

joeherwig last won the day on January 7

joeherwig had the most liked content!

Community Reputation

2 Neutral

About joeherwig

  • Rank
    Member

Profile Information

  • Gender
    Not Telling
  • Location
    Deutschland

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. HI Reinhard, Thanks for pointing that out... But i didn't miss that. As you can see here, working with LUA functions offers much more like displaying text on VRinsight panels, making decisions based on other values etc. That is ways more then just "send value to LVar". Some examples: https://github.com/joeherwig/A32nx-LINDA-aircraft-module/blob/main/A32nx/LINDA/aircrafts/A320/user.lua#L53 https://github.com/joeherwig/A32nx-LINDA-aircraft-module/blob/main/A32nx/LINDA/aircrafts/A320/user.lua#L365 https://github.com/joeherwig/A32nx-LINDA-aircraft-module/blob/main/A32n
  2. @John Dowson the lookup table requires, that I need to maintain the functions on at least two places. So a change of a function name like fixing a typo requires multiple synced changes. Adding new functions has to be done at the end of the table which gives a really weird order and parameters in without any 'near' to other functions of the same context just because I added them not directly afterwards. Setting up needs to count indices within the table to understand, what I have to setup as parameter just to execute a function. So if you test "what did I assign" in FSUIPC, you'll just se
  3. Hi Pete, Hi John, I just found the post above, when i tried to assign LUA-function calls to axes ranges or buttons. What i'm trying to do is using an aircraft specific lua script containing multiple functions and assigning those calls to buttons or ranges of axes. In general i'm able to get the introduced parameter... via: There is a small but. Only parameters i can assign are integers (as it seems). But as i'd like to pass the function name of my desire, that of course doesn't work based on integers. And keeping them in a function table and accessing it via the table index w
  4. Hi John, Hi Pete, ladies and gents, I have the events from the .evt file working great using FSUIPC7. Now i'm struggling on the next challenge. Instead of assigning it directly to buttons or axis, i'd like to trigger those events from LUA scripts and do some more things. Unfortunately even searching all the FSUIPC documentation - i only found the brief hint below: Is there any way to trigger those events from within LUA scripts as well? Even the FSUIPC7: Lua Library Reference didn't help me. Probably i just missed it. I now assigned those events to Buttons
  5. Hey guys, I already succeeded to read a lot and write some of the L:Vars and trigger a couple of H:Vars successfully. (A32nx) unfortunately writing on a lot of L:Var starting with XMLVAR_ eg. XMLVAR_Momentary_PUSH_OVHD_FUEL_LTKPUMPS1_Pressed ... XMLVAR_Momentary_PUSH_OVHD_ELEC_BAT1_Pressed ... XMLVAR_Momentary_PUSH_OVHD_ANTIICE_ENG1_Pressed ... XMLVAR_Momentary_PUSH_OVHD_FLTCTL_SEC2_Pressed ... it fails. But for the following ones it works great: function A32nx_Autobreak_Off() A32nx_Autobreak_SET(0) end function A32nx_Autobreak_Low() A32nx_Autobreak_SE
  6. Uhm... Sounds reasonable Alan. I introduced the index later and did not properly investigate into the event.Button params well... 'll have to take a look at it. Thanks for your great analysis.
  7. Thanks for pointing towards that John. Now it is: --[[ The following files are included using "dofile" to ensure that the functions you want to assign / call within the TripleUseAssignments.lua are available. The Examples listed in here refer to teh new MSFS2020 where LINDA (https://www.avsim.com/forums/forum/427-linda-downloads/) is used. LINDA (Lua Integrated Non complex Device Assignments) brings LUA scripts that map FSUIPC Offsets and even more logic to nice and self descriptive function names, which makes it much easier to assign them and even at a later point simply understa
  8. Hey guys - and girls of course... 🙂 I just added some comment into the TripleUse.lua hoping to point a bit more into the right direction in case you want to use other function scripts like your own ones, or some from P3D, FSX etc. Sry. for keeping you alone so long. I'm currently quite busy.
  9. In case someone wants to play around with it in JS... Just open your webbrowsers Dev-Tools [F12] and execute the below snipet in your browsers console: // set the numeric value as reported from FSUIPC Offset 0x0D0C fsuipc_0d0c = 234 fsuipc_0d0c = (fsuipc_0d0c >>> 0).toString(2); // log the bit-sequence as string to console console.log(fsuipc_0d0c) light = {} light.navigation = fsuipc_0d0c.charAt(0)* 1 light.beacon = fsuipc_0d0c.charAt(1) * 1 light.landing = fsuipc_0d0c.charAt(2)* 1 light.taxi = fsuipc_0d0c.charAt(3)* 1 light.strobes = fsuipc_0d0c.charAt(4)* 1 light.instrumen
  10. 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
  11. Hi Pete, Thanks for your support... I finally succeeded. In case, you're iterested in the "how"... i published the more generic TripleUse.lua and TripleUseAssignments.lua on Github. See: https://github.com/joeherwig/msfs-fsuipc-lua-scripts Probably someone might find it usefull as well.
  12. Hi Pete, Thanks for the fast reply. Well... It's not LINDA specific but just a matter of organizing my LUA code. Using the already available functions from the other lua file has a simple benefit: It makes the code more readable and ways easier to understand and doesn't require fiddling around with cryptic numbers nor duplicating code lines. Anyway... The work of mapping offsets and the corresponding values to functions was already done, so why should i do it again? Being "functional lazy" is not always bad. And it also includes writing messages to the VRInsight display or able to
  13. Hi Paul, first of all... thanks for jumping onto the Websocket-Train. 🙂 I tried to approach something similar with https://gitlab.com/joeherwig/portable-sim-panels-fsuipc-server which is used for https://github.com/joeherwig/portable-sim-panels But It seems, i should investigate into the new Websocket-Server you provided. What is essential is that only updated data is sent to the subscribers, as registering on events of course is a performance-bottleneck if you're receiving information which you don't need, as they did not change. May i suppose, that this feature is already there?
  14. Hi Pete, Thanks for your kind reply. So i fully aggree, it is much more worth the effort to help us with FS2020... 🙂 But it is great to see, that there are others also using JS to work with the simulator. Probably one of those users has any ideas how to approach it. I'll check the threads. Thanks for the links! All the best to you and your family for 2021! Joe
  15. Hi Pete, hi John, hey guys, I tried to make the tripleUse.lua for me a bit more flexible. Most of the part i already succeeded. But still one small thing is missing. I'm trying to hand in a config, where i can set function calls for each of the three types (single-, double-, long-press) So far all the events are registered and entered. I also get the right "function call". But obviously the functions are not found. Probably you can give me a hint on that, how i'm able to access the MSFS / FS2020 functions which i can also assign via LINDA. Thanks a lot and best regards,
×
×
  • 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.