Jump to content
The simFlight Network Forums

John Dowson

Members
  • Posts

    11,149
  • Joined

  • Last visited

  • Days Won

    220

Posts posted by John Dowson

  1. Yes, that's what I (eventually) understood, but thanks for clarifying.

    Sounds like it is an issue for PMDG, but as the SDK has still not yet been officially published, there is not that much that can be done at the moment.

    I will take a look though, but, as I said, I'm not that familiar with the 737 at the moment and I'm not sure how to get these to light up - they flash or either remain off. I need to get more familiar with the aircraft's systems and cockpit layout anyway...

    Cheers,

    John

  2. 2 hours ago, Djeez said:

    Indeed, these offsets do not work as expected,

    You mean that they don't hold the expected data values...

    2 hours ago, Djeez said:

    and neither do the corresponding LVar's, such as L:switch_3391_73X

    Not sure about that one - do you mean that that also does not hold the correct value? Which switch is that? Is there a mapping of (lvar) switch number to function anywhere?

    You can control the switches using the Rotor Brake controls. But I guess you know that and are trying to determine the state of these switches, no?
    I'll check to see if I can see any lvars that hold the state.

    John

  3. 4 hours ago, Keight said:

    now I want to assign M key to that switch and keep sending keypress while holding on RAD position. so the script should look like this?

    myEventFunction(controlnum, param)
        -- send keypress here - may need to check the control' parameter first if a Rotor Brake control
        ipc.keypress(77,8)
    end

    -- Wait for control to be received
    event.control(66587, 77715, myEventFunction)

    No...please read the lua library documentation - and also the template I showed you. It would be more like this:

    myEventFunction(controlnum, param)
        -- Check parameter of Rotor Brake control to see if
    	if param == 7715 then
    	    ipc.control(1071,77) -- send 'M' key (77) press
    	elseif param == 7717 then
    		ipc.control(1072,77) -- send 'M' key (77) release
    	end
    end
    
    -- Wait for control to be received
    event.control(66587, "myEventFunction")

    If you want to send separate press and release, you need to use the separate FSUIPC added controls to send the key press (1071) and then the key release (1072) - ipc.keypress would send them both together.

    Note also that you need to have the lua running - it should be started from the [Auto] or, better, [Auto.xxx] (where xxx is the profile name) section of your FSUIPC7.ini. Again, consult the documentation if not sure (Advanced User guide).

    John

    Later: Btw, I used 77 (the 'M' key) as that is what you were using, You change this value to any other key or key+modifier - see the Advanced User guide for the keycode and shifts/modifier codes/numbers.

  4. 29 minutes ago, Keight said:

    Could you please give an example of this lua script?

    Nothing complex - something along the following lines - where <controlnum> is the control/event received when you press the button in the VC, and <keycode> is the key press you want to send:

    myEventFunction(controlnum, param)
    	-- send keypress here - may need to check the control' parameter first if a Rotor Brake control
    	ipc.keypress(<keycode>)
    end
    
    -- Wait for control to be received
    event.control(<controlnum>, myEventFunction)

    But as I keep saying, you can only do this if some sort of control/event is sent when press the button in the VC.

  5. I am slightly confused by your post. The PMDG offsets are not lvars, it is additional read-only data provided by PMDG.

    48 minutes ago, Detlef_747 said:

    If I create the Lvar using ipc.createLvar(name, 1234) giving an initial value of 1234 that Lvar shows up as expected. But I cannot write to it using ipc.writeLvar(name, ipc.readUB(offset).

    What happens> Show me the lua scrip, and activate logging for lua plugins and see if you get any errors. Note that if creating youy own lvars, it may take a short time before that lvar is available for reading/writing.

    51 minutes ago, Detlef_747 said:

    I have added this section

    to 737options.ini  in  C:\Users\dreu\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalState\packages\pmdg-aircraft-737\work

    [SDK]
    EnableDataBroadcast=1
    EnableCDUBroadcast.0=1
    EnableCDUBroadcast.1=1

    That enables the broadcasting of the data to enable the FSUIPC PMDG offsets (read-only) to be populated.

    52 minutes ago, Detlef_747 said:

    then saw that I could write Lvars directly into the fsuip7.ini file. I tried this:

    [LvarOffsets]
    1=L:IPCPMDG_MAIN_annunAP=UB0x65F1
    2=L:IPCPMDG_MAIN_annunAP_Amber=UB0x65F3
    3=L:IPCPMDG_MAIN_annunAT=UB0x65F5
    4=L:IPCPMDG_MAIN_annunAT_Amber=UB0x65F7
    5=L:IPCPMDG_MAIN_annunFMC=UB0x65F9
    6=L:IPCPMDG_FUEL_PumpFwdSw=UB0x6479

    Do those lvars exist, or are you creating them? You cannot add lvars that you create using the [LvarOffsets] section as this is only processed when the initial lvars are received from the WASM. If they exist when you list them but are not available for adding to offsets, this implies that they had not been created when the WASM scanned for existing lvars. This happens with complex aircraft as it can take up to a minute or so to create all the necessary lvars. You should update the LvarScanDelay FSUIPC_WASM.ini parameter - this defaults to 5 (seconds) but is recommend to start with a value of 45 or so (see the Advanced User guide for details).

    Any further issues, please show me your FSUIPC7.ini as well as the FSUIPC7.log file, and any lua scripts if the problem is there.

    John

  6. Where is your Community folder? The installer thinks that it is here:
        C:\Program Files (x86)\Microsoft Flight Simulator\HLM_Packages"\Community\
    which is a very strange path...especially that strange double-quote...

    Do you have a steam install or an MS store install? If the former, please show me this file:
        C:\Users\josem\AppData\Roaming\Microsoft Flight Simulator\UserCfg.opt
    If you have an MS Store installation, remove/delete that file and re-install.

    John

  7. You still have some assignments to virtual buttons that should be removed (although these should not be having any affect):

    Quote

    [Buttons]
    PollInterval=25
    ButtonRepeat=20,10
    1=P65,1,C66237,1     -{FUEL_PUMP}-
    2=P65,2,C66237,0     -{FUEL_PUMP}-
    3=P65,3,C66072,0     -{PITOT_HEAT_ON}-
    4=P65,4,C66073,0     -{PITOT_HEAT_OFF}-
    5=R65,11,C65548,0     -{MINUS}-
    6=R65,13,C65549,0     -{PLUS}-
    7=P65,14,C1126,0     -{nothing: no action}-
    8=P65,12,C1126,0     -{nothing: no action}-

     

    Your log also shows an error in your Rotaries.lua:

    Quote

       137922 LUA.1: beginning "C:\FSUIPC7\Rotaries.lua"
       137937 LUA.1: Could not open HID
     

    Other than that, your log shows the events being sent as assigned, although its difficult to tell as you have obviously changed your assignments when doing this, and I can only see the assignments as they were when you exited. It is always better to provide a matching FSUIPC7.ini and FSUIPC7.log file for each test.

    Could you switch to using the Baron G58 for your tests - it is in the same profile as your Britten Norman Islander, and I can check/verify that here. In fact, I have just tested and all of the avionics master controls work - Toggle Avionics Master, Avionics Master 1 On/Off/Set, Avionics Master Set. So please try in that aircraft, or is this problem specific to the Britten Norman Islander?

  8. 16 hours ago, Keight said:

    So my question is, is it possible to make that working in a way round, you press a button in VC and it sends a key press?

    But I already answered this...this is only possible if pressing the button emits an event or changes something (i.e. simvar or lvar) that can be picked-up by FSUIPC, and you would need a lua script to intercept that and send the key press. FSUIPC does not react to mouse operations in the FS, only to the data it receives from the result if that mouse operation, usually an event.

    If the switches are animated, then the first thing you should try is to set logging for Events (non-axis controls) and flip the switches in the VC and see if any event is logged. The PMDG aircraft for P3D use custom controls, and the FSLabs uses the Rotor Brake control with the parameter indicating the switch and the mouse action, See if any of those are logged. If so, then a simple lua script can intercept these and send the key press.

    16 hours ago, Keight said:

    Not sure what you mean by functioning PTT

    Many aircraft (GA) have a PTT button on the yoke, but this generally doesn't do anything as default ATC does not require this (it uses menu options). Toy would assign this by button to PTT for the ATC system you are using.

  9. What aircraft are you using, and does the PTT button in the VC actually work? I thought this was inoperative on most, if not all, aircraft...

    If there is a functioning PTT button in the VC, you need to see if activating this emits an event (it will be a custom event - there are no standard events for PTT) or changes a simvar or lvar. If so,  you could use a lua script to pick up this change and then send the key press -  which would go to the FS, vPilot would have to have this registered as a hot key to pick this up.

    If you let me know what FS and what aircraft you are using (and if I have this aircraft), I could take a look to see what, if anything, is emitted or changed.

  10. 46 minutes ago, hermann said:

    Sorry, but no lamp is lighten.

    What do you mean by this? The PMDG offsets only report state, you cannot write to them.

    If the offsets are not holding the correct data, then there is nothing I can do about this - they are just populated from what is received from the FS.
    I believe those offsets to now be correct, according to the SDK header file that I have, Offsets 0x65EA (MAIN_NoseWheelSteeringSwNORM) and 0x65FD (MAIN_annunSPEEDBRAKE_ARMED) are correct, and those inbetween are assigned based upon the latest NG3 SDK header file. I am not that familiar with the 737, so cannot verify those offsets (it is not clear to me what they should contain), but if there are any issues, nothing can be done until the SDK has been published, and then (assuming the SDK header file is correct - if not I will update once published) it will be an issue for PMDG.

     

    1 hour ago, hermann said:

    With this switch only FMC works.

    But when I use the main-test-switch for the lights, then AP and AT light, but FMC not (what for FMC is ok, I think). So I mean that AP and AT are assigned to some other lights .

    Maybe ask about this on the PMDG forums, but I don't think this will be supported (by PMDG) until the SDK is released, but you may get a response from another PMDG user.

    John

  11. Looks like I forgot to remove that button....not sure how that has not been noticed before. I will remove in the next release. From the Advanced User guide:

    Quote

    Mouse macros
    Mouse macros are currently not available in FSUIPC7, pending facilities to be implemented in the SDK
     

    But there are and most probably never will be mouse macros for MSFS. The facilities in the SDK just do not exist to implement such a feature, and probably never will.
    MSFS has hvars instead (html variables), as well as calculator code that can be executed via presets. You should look into what presets are available (see https://hubhop.mobiflight.com/presets/) for the function that you want to implement via mouse macros. Presets are far easier to use than mouse macros.

    John

  12. I have re-installed steam on my win7 system, and downloaded and installed FSX. The version this installs is 10.0.62615.
    I then ran FSX once, then installed FSUIPC4. I did get some registry issues (most probably due to duff registry entries from my previous installation), but the installer detected and fixed these. I then ran FSX again and FSUIPC4 was installed and working correctly.

    Did you try updating your FSX installation from the steam client? If not, try that. Otherwise uninstall and re-install. If you re-install, do not install into a windows protected folder, such as Program Files or Program Files (x86). With steam games, better to install under steamapps (the default), although not strictly necessary.

    John

     

     

  13. Please ALWAYS exit FSUIPC7 before attaching an FSUIPC7.log file. I cannot tell anything from the one you attached.

    Please start MSFS, and let that auto-start FSUIPC7. Then, load an aircraft and click Ready-to-Fly. Wait for 1 minute. Do you see any message in the FSUIPC7 main window, and if so, what?

    Then exit FSUIPC7, and show me your FSUIPC7.log file.

    John

  14. 44 minutes ago, tvopium said:

    Here is the requested .ini file.

    But I don't need to see that  at the moment - that comment was for future reference. But your ini does show that you are still using the 7.3.8 beta. This has now been released, so please download the latest version.

    46 minutes ago, tvopium said:

    when i select for preset i see nothing at all

    Did you install the WASM and the MF events.txt file? Both of those are needed.

    After you have reinstalled the latest version, if you still don't see the presets please show me your InstallFSUIPC7.log file as well as your FSUIPC7.log file.

    50 minutes ago, tvopium said:

    In fact my question is, where do you have to enter the value in bytes quoted in the document of the shifts in FSUIPC to see the switches worked?

    Not exactly sure what this means, but you enter the Rotor Brake parameter number in the Parameter box. When using an Offset control, you should see two boxes, one to enter the offset and another to enter the parameter.

    John

  15. Ok, I found the issue. The MAIN_annunAP_Amber[2] (65F3) and MAIN_annunAT_Amber[2] (65F6) were only allocated 1 byte each. This accounts for the 2-byte difference.
    So, the correct offsets are as follows:

    Quote

    65F1

    2

    BYTE x 2

    MAIN_annunAP[2]

    Boolean

    65F3

    2

    BYTE

    MAIN_annunAP_Amber[2]

    Boolean

    65F5

    2

    BYTE x 2

    MAIN_annunAT[2]

    Boolean

    65F7

    2

    BYTE

    MAIN_annunAT_Amber[2]

    Boolean

    65F9

    2

    BYTE x 2

    MAIN_annunFMC[2]

    Boolean

    65FB

    2

    BYTE x 2

    MAIN_DisengageTestSelector[2]

    0: 1 1: OFF 2: 2

    Updated document attached.

    John

     

    Offset Mapping for PMDG 737-700.pdf

  16. First, please don't attach images - they are far too small and I cannot see anything in them. For your assignments, I need to see your FSUIPC7.ini file.

    3 minutes ago, tvopium said:

    I recently saw your documentation on FSUIPC offsets for the PMDG737. However I don't understand where I have to insert the OFFSET command to make the switch work.

    All additional PMDG offsets are read-only. You cannot/should not write to them.

    For control, you need to use either the custom controls via the Rotor Brake control or the available presets. For the former, see 

     

    6 minutes ago, tvopium said:

    I don't have all the commands that you published on Hubhop.

    All PMDG presets should be available in the latest release, v7.3.8. To assign/see the available presets, you need to check the Select for presets checkbox. Since v7.3.8, presets have been moved to a separate drop-down menu.

    John

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