Jump to content
The simFlight Network Forums

Airbuspilot

Members
  • Posts

    149
  • Joined

  • Last visited

Posts posted by Airbuspilot

  1. Thanks for the Answer. But this Post seems to be Hardware related.
    I never used Profiles before in FSUIPC.ini. I turn Switches always in the Cockpit and ask in my Script for the Value after switching.
    With the Behaviour Tool in FS24 DevMode, i figured out the Switch Names, i.E. switch_114_a and ask for the Value after setting this Switch.
    This works fine.

    Thanks again for your Help.
    Joachim

     

  2. On 2/19/2025 at 7:07 PM, John Dowson said:

    You should look into them, its not difficult. MSFS is a very different beast that FSX/P3D, and there are various different options for assignment (not just FS controls and the occasional lvar). FSUIPC's logging helps you determine what to use, and is a lot easier and quicker (in most cases, IMHO) than using the MSFS debugging tools, which I only use rarely as a last resort.

    Thanks for the Answer. 

    May i ask for another little Help please?
    I need to ask for the Value Change of the Taxi Light in the FS24  B747-8I.
    Initially i set it with this Code to 1. ipc.execCalcCode("1 (>B:LIGHTING_TAXI_3_Set)")
    At FlightLevel 100, i want to turn it to 0 in the Cockpit with a Mouse Click.
    If the Value is set to 0, i want to initiate some other Code in my lua-Script.

    Is it possible to readout the Value of this Input Event Variable direct?
    Alternative can i put this Variable into a FSUIPC-Offset? If so. is there a special Offset-Area, where i have to put them?

    Thanks in Advance,
    Joachim
     

  3. 21 hours ago, John Dowson said:

    @Airbuspilot As well as posting your solution, could you let me know where the fuel pump switches are in the B747-8i - I would like to check a few thinks with 2 params for a control and check the input events, but I can't seem to find the fuel pump switches...

    Later:

    The fuel pump switches in the overhead seem to work using input events - just assign to the Input Event  FUEL_PUMP_FWD_2 with a parameter of 1 for on and 0 for off. No need to use presets.

    In fact, there are a lot of Input Events for this aircraft....

    Sorry, i forgot to post my Solution. There are really much Input Events in this A/C.
    ipc.execCalcCode("1 (>B:FUEL_PUMP_MAIN_FWD_1_Set)")
    This works for every Input Event. All you need, is to figure out the Variable Name. 

  4. Hello John,
    thanks for your attempt to help me, solve my Problem.
    You can be sure, that i have been looking into the Documentations before i open a Post in here.
    But neither the Controls nor the execCalcCode Command helps.

    I have tried several Notations in the execCalcCode Command. Without any Efforts.

    Finally, i will look into the badcasserole.com
    If i am still not able to solve the Problem, i need to give up.

    Again thanks for trying to help.

    Joachim

  5. *** Moved to FSUIPC7 support sub-forum ***

    Hello, i just need a little Help with the Asobo B748-8I in MSFS2024.
    I try to switch the Fuel Pumps on in a lua Script. I found out, that the Cntrl 67192 is the right one.
    When turning i.E. the FWD OVRD Pump on/off with the Mouse in the Cockpit, the log states this:
       775187 *** EVENT: Cntrl= 67192 (0x00010678), Param1= 7 (0x00000007), Param2= 1 (0x00000001) FUELSYSTEM_PUMP_SET
       775187 InputEvent received: FUEL_PUMP_FWD_2=1.000000 (param=';FLOAT64')
       775203 InputEvent received: FUEL_PUMP_FWD_2=1.000000 (param=';FLOAT64')
       776109 *** EVENT: Cntrl= 67192 (0x00010678), Param1= 7 (0x00000007), Param2= 0 (0x00000000) FUELSYSTEM_PUMP_SET
       776109 InputEvent received: FUEL_PUMP_FWD_2=0.000000 (param=';FLOAT64')

    In my Lua File, i issue this Command:
    ipc.control(67192, 7, 1)
    But nothing happens in the Cockpit.
    This is also when given this Command:
    ipc.control(67192, 7)

    Could anybody please help? Thanks a lot in Advance.

    Greets, Joachim

  6. Please allow me to ask another Question regarding lua Scripting.

    In my Script i want to determine, which Key on the Keyboard is pressed.
    Let's say for the Keyboard Letter S. I want to do the Following.
    If Key S is pressed then
         Do something
    else
         If Key S is released then
                Do something else
         end
    end

    I know about the Key Assignments in the FSUIPC Menu. But i need to do some individual Things when a Key is pressed or released.
    Is it possible, to handle the Keypresses in a lua Script? I know, that i can simulate Keypresses with the ipc.keypress Command. But i need to read,
    which Key is pressed. Is there a similar Command available to do this Task?

    Thanks in Advance for your Help.
    Joachim
     

  7. I am using the 0.11.1 Stable Version of the FBW A320. Should i change it to the Dev Version to use the XmlVar?

    I don't have any Experiences in adding Simvars to FSUIPC Offsets yet. But i will give it a try. Thanks for naming the Manual and Section to learn about it. 
    Thanks for all your valuable Help.

    Joachim

  8. I know about this XmlVar. Unfortunately the Value doesn't change from 0 to 1 or vice versa when operating the Switch in the Cockpit. It stays on 0.
    Alternatively i found the SimConnectVar CABIN SEATBELTS ALERT SWITCH. The Value changes when operating the Switch in the Cockpit.

    Could you please give a Code Example for the Readout of this Variable? 

  9. Thanks for the Answer John. I will give you a short Explanation of what i mean.
    The Value within the Control 66719 could be 0 or 1. Depending on the Switch Position in the used A/C.
    In my Case the FBW A320neo. I want to ask which Value is set and do some Stuff after getting the active Value,
    depending on the Value, that i found. Is there any easier Code than the one, you gave above?

    Joachim

  10. Hello,
    in my Script, i need to detect the Press of specific Keys and do some Action, if the Key is pressed.
    I tried with this one: if ipc.keypressplus(104,8) == 0 then ..........
    If detected, that NumPad 8 is pressed and released the Script will send some Instructions to the Plane.
    But unfortunately that does'nt work.
    Could you please offer a Solution for it? Thanks in Advance, Joachim

  11. 19 minutes ago, John Dowson said:

    Generally not, only for virtual buttons - see the ipc.btnPress, ipc.btnRelease and ipc.btnToggle lua functions.

    But why do you want to do this? Can you not just simulate the action that the button press performs when your condition is met, rather than the button press itself?

    In general i could do that. But for each A/C i have a different FlightLog.lua and an according Window.lua
    I start them with one Joystick Button on the Press and Release Event. My Aim is now, to open a second Window if necessary for the used Plane.
    This could be named Window2.lua and could be assigned to a separate Joystick Button in the FSUIPC Button Assignments. And so i want to simulate
    the Button Press with Lua Code, if my Condition is fulfilled. I want to do it this Way to hold the FlightLog itself as small as possible for Maintenance Reasons.
    I know, i could fill all the Window Texts in the FlightLog, but i would prefer the separate File Solution for each Window.lua, if possible

    Joachim 

  12. 8 hours ago, ark1320 said:

    In general yes (see the FSUIPC Lua Event library), but it depends on if the special condition can be detected with code; that is, are the necessary simvars (variables) associated with the special condition available?  I think it would help John give you the best answer if you would provide him with some information on the nature of the special condition you are talking about.

    I have several Planes, that were controlled and directed by a File named FlightLog.lua
    For every Plane there is a separate File, that contains the SimVars and Lvars of this Plane. This File is also named FlightLog but extended with the ID of this Aircraft, i.E. FlightLog.DAIJB
    The Reason for this is to save my Flights in a MS Access Database. Before starting a Flight, i file FlightPlans, Fuel Amounts, PayLoad, etc. in this DB. Once everything is done, i rename
    the File FlightLog.DAIJB to FlightLog.lua and copy it from the Scripts Folder to the FSUIPC Folder. Because of that, i have all Variables according to the used Plane in the FlightLog.lua and 
    can assure, that the Variables are available at the Runtime. For each of this Aircraft there are different Variables, that will be used, to trigger the Condition where the simulated Joystick Button should be pressed.  

  13. 14 hours ago, John Dowson said:

    Yes, and I quoted it in my previous comment....again:

    The options can be any mix of these (add them together):WND_BOLD, WND_ITALIC, WND_UNDER, WND_STRIKE.

    Okay, Thats what is stated in the Docs. Do you see a + Sign in here?
    I can add them together. Maybe you should explain this more clearly that this only works with the + Sign and not as stated here with the , Sign.

    But anyway, thanks for the Help.

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