Jump to content
The simFlight Network Forums

Emile B.

Members
  • Posts

    14
  • Joined

  • Last visited

Posts posted by Emile B.

  1. Sorry if this is a stupid question, but I recently installed LINDA and now find that it loads automatically when I load P3DV4.5.  I use FSUIPC for button actions and prefer to load LINDA manually only if I need it.  How do I stop it from loading automatically ?  Running FSUIPC6 6.109 on Windows 11 PC.  Thanks in advance for any help.

    DISREGARD, sorry : found it (renamed ipcReady.lua). My bad 😊

  2. Hi Pete & John,

    A Lua plug-in I set up for the A2A C172 contains the following function :
     

    function C172_Door_Open_If_Closed()
        local doors
        doors = ipc.readUB(0x3367)
        if logic.And(doors,1) == 0    -- pilot door closed
        and ipc.readUB(0x0366) == 1    -- aircraft on ground
        then
            ipc.setbitsUB(0x3367, 1)
        end
    --    doors = ipc.ask("Which door?\n1=Pilot\n2=Pax\n3=Both") -- 1 = pilot, 2 = passenger, 3 = both
    --    if doors = 1 or doors = 2 or doors = 3 then    -- check input is valid
    --        if ipc.readUB(0x0366) == 1        -- aircraft on ground
    --        then
    --            ipc.setbitsUB(0x3367, doors)
    --        end
    --    end
    end

    event.flag(54, "C172_Door_Open_If_Closed")

    The active section works fine.  But I thought it would be handy to be able to select which door to open without having to edit the Lua script.  So I replaced the active section below the "local doors" line with the section marked as Remarks above.  Unfortunately no window to enter the door selection appears.  Debug did not show a syntax error so it must be my logic (or more likely, the lack of it).  Perhaps I cannot use a string as a mask to set a bit in offset 3367 and if so, how can I fix that ?  Can you help put me on the right track ?  Using FSUIPC 6.0.12 (registered) with P3DV4.5 HF3.  Thanks for any hints.

    Regards,
    Emile.

  3. 13 hours ago, John Dowson said:

    Your mouse actions for STD and decrement are the same (and it is the same mouse 'rectangle' for all three assignments):

    11=Baro_STD=RX20000802,3
    12=Baro_DEC=RX20000802,3
    13=Baro_INC=RX20000802,1

    If there is no separate 'rectangle' for the different positions, then you can only vary the mouse operation (the last parameter). You could try with a different code (e.g. 2 for a 'middle single click' - see P38 of the Advanced User guide for a complete list of codes). As I don't have the Dash, I can't advise further for mouse macros with that aircraft.

    Yayyy !  I edited the DASH8.MCRO file : changed the mouse click code for the Baro_STD action from 3 into 2 and PRESTO, that's done it !  THANK YOU SO MUCH !

    As I use mouse macros a bit for the Dash-8 (and there is no middle button on the mouse I use), knowing this may come in handy for other functions as well - learnt something again 👍

    Cheers,
    Emile.

  4. Thanks for your quick reply.
    I have since updated to V6.0.8 before doing anything else.
    I have since also assigned the BAROMETRIC_STD_PRESSURE control to a spare button on my programmable button box.
    I can confirm that this control does work with the default P3D AC11 Commander 114.
    In the Dash-8, a knob adjusting the barometer setting is operated by left or right clicking nearer the perimeter of the knob, and the barometer is set to STD pressure by left or right clicking in the centre of the knob.  Done with the mouse, this works fine.
    I captured those three mouse clicks in a mouse macro.  When assigned to a rotary switch, the captured mouse clicks to increase or decrease the barometer setting work fine, which is one good thing.  However when looking at the macro file (attached), the mouse click in the centre looks to have produced the same command as the left click that decreases the barometer setting.  Sure enough : when assigned to a button or key press, the so-called centre click produces a decrease in barometer setting instead.
    I have even zoomed in on the panel as far as I could to try & increase the accuracy of the mouse click on the centre of the knob, but to no avail.
    When I assigned the KOHLSMAN_INC and KOHLSMAN_DEC controls to the rotary switch via a Lua plug-in, again no luck.

    Hope you can make some sense out of this !  The FSUIPC6.ini and log files are attached, as is the DASH8.MCRO file.

    Thanks a lot,
    Emile.

    FSUIPC6.log DASH8.MCRO FSUIPC6.ini

  5. I have assigned a number of controls to key presses using the drop-down box in FSUIPC V6-0-3, for the Majestic Q400 Dash-8, in P3DV4.5 HF3.  One of those - the BAROMETRIC_STD_PRESSURE control (66846) - does not work : when the command is executed with a barometric pressure other than 1013, the barometer does not change to 1013, which is what I would have expected.  I must have done something wrong, but what ?  All other controls assigned through drop-down box selection are working fine.  Any help much appreciated.

  6. 11 hours ago, Thomas Richter said:

    Hi,

    as soon you have a Lua file in your ..\Modules\ folder you can define Keys or Buttons to different functions to it. Just i.e. define a Key and search for your Lua file, then you will find all sorts of functions you can choose from (Kill / Start / Set / Toggle / ... ). This will do what you are looking for.

    Thomas

    Thanks a lot, Thomas !

    Regards,
    Emile.

  7. Is it possible to refresh a lua plug-in without having to reload the aircraft that uses it ?  I am editing a lua plug-in that I wrote for the PMDG NGX to use it with the PMDG NGXu.  Testing modifications currently requires me to restart P3DV4.5 as PMDG aircraft can't be loaded over the top of one another, which is rather time-consuming.  Sorry if this has already been asked, but I did search the forum to begin with, to no avail.  Any help much appreciated.

    Thanks,
    Emile Bax.

  8. 9 hours ago, Pete Dowson said:

    Are they known L:Vars? Do you know thay work? Test by assigning a keypress (temporarily perhaps) to that Lua file and use that first.

    If they are proven to work, maybe they are sent too early, after the aircraft is seen to load but before the graphics are full drawn. You could try putting a delay in at the start (ipc.sleep).

    How are they normally lowered? If that by a control?

    Pete

     

    Hi Peter, that's a good point.  Yes they are existing LVars and I know that they worked in the FSX version of the PMDG 737NG.  Therefore I just assumed - possibly erroneously - that this would also apply in the P3D version.  I will first of all use your suggestion of a keypress to verify if the Lvar writes do indeed work but may be sent too soon, in which case a delay would fix the problem.
    I would have to check if there is a control that lowers the yokes, as previously writing the Lvars did the trick.  Sure, a mouse click will lower them but that's a bit easy !
    All in all, many thanks for your helpful suggestions.

    Regards,
    Emile.

  9. Using P3DV4.3 with FSUIPC V5.14 (UseProfiles=Files)
    I am trying to set two Local Gauge Variables when the PMDG 737NG is loaded so that both pilots' yokes are lowered automatically on startup.  To this effect I added the following two lines to a lua plug-in, stored in the \Modules folder and called in the [Auto] section of the file 737NG.ini in the \Modules\Profiles folder :
    ipc.writeLvar("L:yoke_left_hide", 1)
    ipc.writeLvar("L:yoke_right_hide", 1)

    Unfortunately it does not work and the yokes stubbornly remain up unless I lower them myself.  I'm obviously leaving something out.  How can I get these two commands to run automatically ?  Any help appreciated.

    Thanks,
    Emile.

  10. Mouse Macros have to be specifically made for each version of each cockpit, because they depend upon finding the actual place in the Gauge code to be called when used. Even a small update by the originator can render them useless, necessitating a remake. They are a type of "hack" into the code in the gauges.

    Pete

    Peter,

    This is my first post here though I've been using your invaluable FSUIPC for a number of years now. Reading the above, I'm just wondering if some users could look at using FSX controls through FSUIPC via a Lua plug-in ? No need to worry about mouse co-ordinates that way. For me it's been like a gift from heaven (OK, perhaps this should read "from somewhere near Stoke-on-Trent" :grin:).

    With some help I managed to track down the FSX controls that activate the CDU buttons in the PMDG NGX. From there, after reading your FSUIPC docs, I managed to create a simple Lua plugin that depending upon what's in ipcparam, will use ipc.control to send the desired control to FSX that will operate the desired button of the PMDG NGX CDU. The reason why I chose to embark on a learning curve and do things this way, was that unlike with the PMDG B1900D and the Level-D 763, for which your mouse macro creation facility worked like a charm, I had no such luck with the PMDG NGX.

    FYI I am turning 59 next month so learning new stuff takes longer than it used to, but I enjoyed it and thought it might be worthwhile sharing.

    Cheers,

    Emile.

×
×
  • 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.