Jump to content
The simFlight Network Forums

Hipp0

Members
  • Posts

    27
  • Joined

  • Last visited

Posts posted by Hipp0

  1. Quote

    If you insist on using key presses (why is that, by the way -- you never explained this "wheel" assigning method).

    I wish I'd never mentioned this now as it's a bit of a red herring.  The wheel is like a mouse wheel, so in practice works as 3 buttons(2 for rotation, 1 as a press), each click-turn of the wheel is like a button press and release.  It is NOT an axis. 

    I use keys and the joystick's software because if I do this I can get the display (the throttle has a small display) to tell me what each button assignment does as I press it (which was once very convenient - in VR not so much!).  Also, I use modifier buttons which are much easier to implement in the joystick software than with fsuipc.  I could do it all with buttons, and will do so if required.

    Quote

    If you need to be able to hold the key down (or button) and have it repeating ...

    I think, in this case, that I don't.  However, I will do at some point, so will investigate.

    Quote

     

    If you insist on using key presses (why is that, by the way -- you never explained this "wheel" assigning method), then assign the key RELEASE as well as PRESS, but make the release assignments send 0 as the parameter, which won't do anything. 

    Really all this is probably more efficient with buttons.

     

    I will try to set the release as described.  But wouldn't you have to do the same thing with buttons?

    I think everything will work fine, so hopefully will leave it there.   I have plenty of options to try it seems.  Thanks for all your help.

  2. Thanks again Pete, sorry to ruin your Saturday.  I think I'm slowly getting there.  The issue of the slowdown seems to have gone, but I am not able to send each command more than once, e.g. for SPDBUG_INC, it will increment once, but no matter how many times I hit the key it won't increment again (until I press another key).

    ***

    This is my mjc8q400.lua:
     

    Quote

     

    function q400Commands()

    -- TOGA
    if ipcPARAM == 100 then
        ipc.writeLvar("MJC_VAR_WRITE_VALUE", 1)
        ipc.writeLvar("MJC_VAR_WRITE_CODE", 27120)
    end

    -- AP DISC
    if ipcPARAM == 101 then
        ipc.writeLvar("L:Q400_AP_DISENGAGE_KNOB", 1)
    end

    -- AP AP
    if ipcPARAM == 102 then
        ipc.writeLvar("MJC_VAR_WRITE_VALUE", 11)
        ipc.writeLvar("MJC_VAR_WRITE_CODE", 33470)
    end

    -- AP VS PITCH DN
    if ipcPARAM == 103 then
        ipc.writeLvar("MJC_VAR_WRITE_VALUE", 1)
        ipc.writeLvar("MJC_VAR_WRITE_CODE", 46987)
    end

    -- AP VS PITCH UP
    if ipcPARAM == 104 then
        ipc.writeLvar("MJC_VAR_WRITE_VALUE", -1)
        ipc.writeLvar("MJC_VAR_WRITE_CODE", 46987)
    end

    -- MIP_SPDBUG_INC
    if ipcPARAM == 105 then
        ipc.writeLvar("MJC_VAR_WRITE_VALUE", 1)
        ipc.writeLvar("MJC_VAR_WRITE_CODE", 43080)
    end

    -- MIP_SPDBUG_DEC
    if ipcPARAM == 106 then
        ipc.writeLvar("MJC_VAR_WRITE_VALUE", -1)
        ipc.writeLvar("MJC_VAR_WRITE_CODE", 43080)
    end

    -- MIP_SPDBUG_PRESS
    if ipcPARAM == 107 then
        ipc.writeLvar("MJC_VAR_WRITE_VALUE", 1)
        ipc.writeLvar("MJC_VAR_WRITE_CODE", 75899)
    end

    end

    event.param("q400Commands")

     

     

     

     

    In the fsuipc5.ini I have:
     

    Quote

     

    [LuaFiles]
    10=mjc8q400

    [Auto.Q400]
    1=Lua mjc8q400

     

    [Keys.Q400]

     

    89=81,8,L10:V,102     -{Q: Press=LuaValue mjc8q400 }-
    91=87,8,L10:V,101     -{W: Press=LuaValue mjc8q400 }-
    93=69,8,L10:V,100     -{E: Press=LuaValue mjc8q400 }-

     

    139=86,9,L10:V,103     -{shft+V: Press=LuaValue mjc8q400 }-
    141=86,10,L10:V,104     -{ctl+V: Press=LuaValue mjc8q400 }-

     

    146=66,8,L10:V,107     -{B: Press=LuaValue mjc8q400 }-
    148=66,9,L10:V,105     -{shft+B: Press=LuaValue mjc8q400 }-
    150=66,10,L10:V,106     -{ctl+B: Press=LuaValue mjc8q400 }-

     

     

  3. Hi Pete,

    Many thanks for replying.  Unfortunately I'm being dense, I sort of get what you mean but have no idea how to implement it.  I've skimmed through the manuals, and searched these threads, but am unable to find an example of what to do.  I wonder if I could trouble you to add a bit more detail to your response by way of an example.

    Could you explain how to assign the following function to be activated on a joystick button press / or key:

    I have the following in the mjc8q400.lua file:

    function AP_AP_press ()
        ipc.writeLvar("MJC_VAR_WRITE_VALUE", 11)
        ipc.writeLvar("MJC_VAR_WRITE_CODE", 33470)
    end

    I have

    [LuaFiles]
    10=mjc8q400

    in the fsuipc5.ini

    I don't know what to do with event.param, I assume something like

    event.param("AP_AP_press")

    but where would this go, and is it correct?

    I assume the [Auto.Q400] section goes into FSUIPC5.ini but have no idea what to put into it.

    I assume that once the lua file and [Auto] section are correctly set up, I can assign each function to a button / key as always as you state above:

    Quote

    Then instead of assigning to Lua mjc8q400 you assign to LuaValue mjc8q400.

     

  4. Hi, please could you help me out?  I wish to assign some commands to my joystick for the Majestic Q400 in P3D 4.4, FSUIPC (UpdatedByVersion=5150).

    As an example, the speed bug setting.  I have the following in the lua (I found these commands in a file for LINDA):

    -- MIP_SPDBUG_INC
    if ipcPARAM == 105 then
        ipc.writeLvar("MJC_VAR_WRITE_VALUE", 1)
        ipc.writeLvar("MJC_VAR_WRITE_CODE", 43080)
    end

    -- MIP_SPDBUG_DEC
    if ipcPARAM == 106 then
        ipc.writeLvar("MJC_VAR_WRITE_VALUE", -1)
        ipc.writeLvar("MJC_VAR_WRITE_CODE", 43080)
    end

    -- MIP_SPDBUG_PRESS
    if ipcPARAM == 107 then
        ipc.writeLvar("MJC_VAR_WRITE_VALUE", 1)
        ipc.writeLvar("MJC_VAR_WRITE_CODE", 75899)
    end

    and in the fsuipc5.ini I have:

    146=66,8,L10:R,107     -{B: Press=Lua mjc8q400 }-
    148=66,9,L10:R,105     -{shft+B: Press=Lua mjc8q400 }-
    150=66,10,L10:R,106     -{ctl+B: Press=Lua mjc8q400 }-

    It I have assigned the keystrokes using my joystick's (X52 Pro) software to a wheel on the throttle (it's like a mouse wheel, and is seen as three buttons: up, down, press).  It works, but as the commands are sent, the sim is interrupted and drastic frame rate drops occur.  I am running in VR, so it makes it unusable.

    I have also tried assigning directly to joystick button(s) (rather than using keystrokes w/ joystick software) and the same thing happens.

    The same thing happens for other buttons and similar functions:  e.g. the VS wheel, on a toggle switch.  There are no issues assigning commands in the usual (fs controls, not lua) way (e.g. 73=190,8,65615,0     -{.>key: Press=ELEV_TRIM_UP }-)

    It's been a while since I used lua / fsuipc, but I don't think I'm doing anything differently now, and I don't think I've ever had this issue before.

    Thanks for any suggestions.

  5. I often make changes to the INI, either through the in-flight drop down menu or by just editing the INI.

     

    All I need to do to get the changes 'activated' is to hit "Reload ......" whatever in the Menu. Try the

    Buttons & Switches tab and just hit the button that is labels "Reload ...." I forget the exact label and

    am a few thousand miles from my sim computer  :)

     

    Anyhow, that causes FSUIPC4 to re-read the ini file.

     

     Paul

    Thanks very much for that.

     

    It seems so obvious now - and truly I'd never noticed it before.  What a numpty.

  6. And since I'm here, I'd like to ask another question if it's not too much trouble. I would like to have the choice of two (or more) modifier buttons, so in the example I gave above I would like be able have button 19 and button 2 available as modifiers.

    What would be the best way to do this?

    This appears to do what I want but does require another line to be added.

    500=CP(-0,19)(-0,2)5,0,C65651,0

    501=CP(+0,19)5,0,C65648,0

    502=CP(+0,2)5,0,C65648,0

    (-0,19)(-0,2) appears to be an AND, maybe a similar syntax to do an OR could be added (or already exists and I've missed it), so that lines 501 and 502 could be combined into one line?

    I've setup literally hundreds of commands with only one modifier button (19). Although it won't be too much trouble to change them all to the above, it would be nice to have a more efficient way of doing this with just two lines instead of three.

  7. Hi,

    I've been playing around with compound statements for the first time and was having an issue where they appeared to work for some airplanes and not others. After hours of frustration I think I tracked the cause down to not having any button definitions already created for the controller that the modifier button belongs to.

    So for

    [buttons.FSX Default C-172]

    500=CP(-0,19)5,0,C65651,0

    501=CP(+0,19)5,0,C65648,0

    the command with (+0,19) doesn't work. It doesn't matter whether I hold down button 0,19 or not, C65651 is always sent; and the logger always shows the condition for (+0,19) as false.

    But with

    [buttons.FSX Default C-172]

    0=P0,32,C65607,0

    500=CP(-0,19)5,0,C65651,0

    501=CP(+0,19)5,0,C65648,0

    everything works as it should.

    As I couldn't find a previous report of this or any mention in the manuals, I thought I'd post it here. I realise it's unlikely that not many people will have controllers to which they haven't assigned ANY functions to buttons - I'm afraid that I do.

  8. Hi,

    I'm trying to get this assigned to a joystick button so that it works like pushing the button in the VC. What happens is that when the button is pushed, the AP levels out at the current altitude irrespective of what is selected on the AP display. Doing a trace I see this

    [C] Control: 66124 - 7703 AP_ALT_VAR_SET_ENGLISH

    [C] Control: 65808 - 0 AP_ALT_HOLD_ON

    the "7703" is the current altitude (actually the altitude reading from the altimeter) when the button was pushed. I don't know how to get this to it put into my lua script:

    i = ipc.readLvar("L:***what can I put in here???***")

    ipc.control(66124,i)

    ipc.control(65808)

    There doesn't seem to be a variable that I can see for this. Is there a "default list" of lvars that can be used, or are they specific to each aircraft? Or another way to do this?

    Thanks for any help.

  9. Many thanks for replying, LINDA solves my issue and works flawlessly, I had seen LINDA on previous searches, but had been reluctant to install yet another add-on. However, your post got me to give a it go, and I must say I am blown away. And btw, to whoever did the config for the NGX -THANK YOU - I can only begin to imagine how much time and work it must have taken, having tinkered with lua + FSUIPC in the past.

  10. Hi,

    I'm trying to assign the CDU LSKs to my Thrusmaster MFD buttons (in case you're not familiar with this, it's just a game controller with around 30 momentary push buttons). The only way that I can see to do this is via the keyboard. In the NGX, you can hold down the tab key and then press a function key (F1 - F12) to press the corresponding LSK on the CDU.

    So, I've gone in to FSUIPC as usual and just set up the MFD buttons to assign the appropriate keystrokes tab-F1, etc.

    And it works, but very unreliably (only about 1 in 4 button presses is recognised correctly). I suspect that what is required is more of a delay between holding down the tab key and the FN key; i.e. it should be something like hold down tab key , wait 0.5s, press FN key, release FN key, wait 0.5s, release tab key. I suspect that the default delay between the keystrokes is much less. Is there any way to do this?

    Or, if anyone can suggest another way that I can map the LSKs to my controller (or for that matter the CDU function keys - MENU, LEGS, etc), I'd be very grateful to hear about it.

    Thanks.

  11. Noticed that with some planes, there is constant activity going on when I turn on logging. For example on the Realair Duke, these events are constantly and continually being sent:

    2127433 *** EVENT: Cntrl= 66466 (0x000103a2), Param= 0 (0x00000000) COM_RECEIVE_ALL_SET

    2127480 *** EVENT: Cntrl= 66463 (0x0001039f), Param= 0 (0x00000000) COM1_TRANSMIT_SELECT

    2127480 *** EVENT: Cntrl= 66466 (0x000103a2), Param= 0 (0x00000000) COM_RECEIVE_ALL_SET

    2127511 *** EVENT: Cntrl= 66463 (0x0001039f), Param= 0 (0x00000000) COM1_TRANSMIT_SELECT

    2127511 *** EVENT: Cntrl= 66466 (0x000103a2), Param= 0 (0x00000000) COM_RECEIVE_ALL_SET

    2127542 *** EVENT: Cntrl= 66463 (0x0001039f), Param= 0 (0x00000000) COM1_TRANSMIT_SELECT

    2127542 *** EVENT: Cntrl= 66466 (0x000103a2), Param= 0 (0x00000000) COM_RECEIVE_ALL_SET

    2127573 *** EVENT: Cntrl= 66463 (0x0001039f), Param= 0 (0x00000000) COM1_TRANSMIT_SELECT

    just wondering whether this is normal?

  12. Thanks for all the suggestions, I'm sure the answer is in there. I'll give it all a go (I'd forgotten about using the logging).

    "Please try things in FSX using the keyboard. You will find that pressing ALT alone does not bring up a specific menu, you then have to either press another button to select the specific menu, or TAB to it and press Enter. I'm not sure how you intended to use ALT alone?"

    For me in FSX, the ALT key brings up the menu "bar". This is all I'm trying to achieve, I don't want to replicate a specific function. I can the use the mouse to select the menu I want. Holding down the ALT key, then makes the menu go away.

  13. I think I had the same issue as you. This fixed it for me, you might want to give it a try - add (or possibly edit) the following entries in the registry:

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]

    "MS Sans Serif"="Segoe UI"

    "MS Sans Serif 8,10,12,14,18,24"="Segoe UI"

    *EDIT* You will need to log out (of Windows) and back in for it to take effect.

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