• Categories
  • Recent
  • Tags
  • Popular
  • Users
Collapse
Just Flight Community Forum

Simconnect events for F28

Scheduled Pinned Locked Moved F28 Professional
11 Posts 6 Posters 988 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    PimVerver
    wrote on last edited by
    #1

    Are there any F28 specific Simconnect events that can be used in a streamdeck profile, e.g. the TTC off/takeoff toggle?

    1 Reply Last reply
    0
  • MarkM Offline
    MarkM Offline
    Mark JF Staff
    wrote on last edited by Mark
    #2

    We don't supply an LVAR list as the list can be found in several locations within the sim so we would just be copying that list. Plus it could change fairly regularly so it would be a list that we would have to constantly update.

    There are a few ways you can find an LVAR list in the sim, but the way I personally recommended is:

    1. Load a flight in the F28
    2. Go to MSFS Options > General Options > Developers and enable Developer Mode.
    3. Move your mouse to the top of the screen and on the menu go to Windows > Behaviours > Local Variables.
    4. In that menu, you'll see a list of every LVAR used in the F28 and its current state.
    5. You can search for an LVAR using the search field. So for example if you wanted to find an LVAR for the strobe lights you could type "Strobe" in the search field and you could find the LVAR for the Strobe lights which is "F28_PED_Lights_Toggle_STROBE_Switch".
    6. With that LVAR in view, if you then move the switch you'll see the state change in the menu.

    Most of the LVARs should be named appropriately to their actual controls so the search technique should work pretty well. Let us know if you get stuck though and we can assist.

    Mark - Just Flight

    Just Flight Development Assistant

    P 1 Reply Last reply
    0
  • P Offline
    P Offline
    PimVerver
    replied to Mark on last edited by
    #3

    @mark

    Thank you very much. In the mean time I have been studying AAO, STreamdeck and the F28. With all the debugging tools I have managed to change the TCC switch to 0 with the AAO script: 0·(>L:F28_PED_TCC_L_Toggle_Switch,·number)
    And again switch to 1 or 2 by changing the number. However, because the switch has three setting variables: 0, 1 and 2, I would like to change the AAO script in one line evaluating all three variables such as: if 0 change to1, if 1 change to 2 and if 2 change to 0. I have tried and tried but nothing. Can you give me an example?

    Thanxs in advance

    Pim Verver

    T 1 Reply Last reply
    0
  • T Offline
    T Offline
    taguilo
    replied to PimVerver on last edited by taguilo
    #4

    @pimverver
    Hi,
    you can try :
    (L:F28_PED_TCC_L_Toggle_Switch,·number) ++ d 3 < * (>L:F28_PED_TCC_L_Toggle_Switch,·number)

    Should cycle 0-1-2.
    Hope this helps.

    Tomas

    L P 2 Replies Last reply
    0
  • L Offline
    L Offline
    lancealotg
    replied to taguilo on last edited by
    #5

    @taguilo
    Hello Tomas, it seems like you have a good understanding of AAO's.

    If I may ask you a similar question as the OP, I am trying to setup AAO to use a joystick button to start the engines.
    I am able to assign a button for this but the engine start switch moves to the start position and very quickly goes back to the neutral position even though I am holding down the button. This is not long enough for the engines to start.
    Is there a way to have that momentary switch stay in the start position as long as I hold the button down?
    I currently have the button set as a fast repeat which does start the engines but it is not a very elegant solution as you can see and hear the switch toggling back and forth.
    Thanks

    T Lobster404L 2 Replies Last reply
    0
  • T Offline
    T Offline
    taguilo
    replied to lancealotg on last edited by
    #6

    @lancealotg
    Hi,
    Unfortunately when you map a button to a spring loaded switch var in MSFS it will spring back to default right after pressing the button, even when repeat is set and/or the button is held.
    Some critical switches -like AP PITCH UP/DN or AP ROLL LEFT/RIGHT have same problem, which has been resolved with extra code (for the incoming update), but cannot translate to user custom scripts like the one you are needing.
    Maybe the starter could receive same logic in another update, it's something to be considered for sure.

    Tomas

    L 1 Reply Last reply
    0
  • L Offline
    L Offline
    lancealotg
    replied to taguilo on last edited by
    #7

    @taguilo
    Great information, I fly only in VR and that switch is somewhat hard to click on.
    Thanks for the help.

    1 Reply Last reply
    0
  • P Offline
    P Offline
    PimVerver
    replied to taguilo on last edited by
    #8

    @taguilo ,

    thank you very much, thats the trick

    1 Reply Last reply
    0
  • Lobster404L Offline
    Lobster404L Offline
    Lobster404
    replied to lancealotg on last edited by
    #9

    @lancealotg I'm late to the party here but I recently bumped into this issue and have a fix. The solution is to change the switch in the interior.xml file from a 3-way spring-loaded to a standard 3-way that stays put, then manipulate the LVAR that controls it.

    Navigate to:
    MSFS Folder\Community\justflight-aircraft-f28\SimObjects\Airplanes\Just Flight Fokker F28-4000\model
    Copy the F28-4000_interior.xml file, name it something like BACKUP_F28-4000_interior.xml and save that in two or three safe places where you won't lose it. (The next time the F28 has an update you'll want to re-do this process and modify that new file since it could contain other changes that you need.)

    If you don't have it already, head over to https://notepad-plus-plus.org/ and install Notepad++, an absolute lifesaver when editing MSFS files. In Notepad++, go to Plugins menu > Plugins Admin, and also install the "Compare" plugin by Ty Landercasper and the JSON Viewer plugin by Kapil Ratnani. (LOTS of files in MSFS are .JSON and almost impossible to read but the viewer plugin can convert that into something legible. Very cool.)

    Open F28-4000_interior.xml in Notepad++ and navigate to row 10921 (make sure Word Wrap is off). You will see the following code:

    <Component ID="F28_OH_ENG-MAIN-MSTR_Toggle_Switch" Node="F28_OH_ENG-MAIN-MSTR_Toggle_Switch">
    <UseTemplate Name="JF_ThreeStateSpring_Switch_Template">
    <SWITCH_NAME>F28_OH_ENG-MAIN-MSTR_Toggle_Switch</SWITCH_NAME>
    <SWITCH_DIRECTION>Horizontal</SWITCH_DIRECTION>
    </UseTemplate>
    </Component>

    Remove the word "Spring" in the second line, so your code will look like this:

    <Component ID="F28_OH_ENG-MAIN-MSTR_Toggle_Switch" Node="F28_OH_ENG-MAIN-MSTR_Toggle_Switch">
    <UseTemplate Name="JF_ThreeState_Switch_Template">
    <SWITCH_NAME>F28_OH_ENG-MAIN-MSTR_Toggle_Switch</SWITCH_NAME>
    <SWITCH_DIRECTION>Horizontal</SWITCH_DIRECTION>
    </UseTemplate>
    </Component>

    Save the file.

    In your hardware bindings, control of that switch is through:

    LVAR:F28_OH_ENG-MAIN-MSTR_Toggle_Switch

    where a value of 0 is left, 1 is center, 2 is right. Use a data change action accordingly and you should be off to the races. Note that this is a control that you do NOT want to just increment or go switching from right to left willy-nilly. Personally, I used two buttons on my SPAD-powered StreamDeck XL labeled Left Starter and Right Starter. On the left button I set the "button press" action to set the LVAR to 0 and the "button released" action to set it back to 1. My right button presses to 2 and releases back to 1. So in sim I hold the button down for maybe a second or whatever it takes to get the starter valve light to turn on, then let go. The on-screen animation works fine and the sound effect works.

    The starter valve light itself is LVAR:F28_OH_PUSH_TO_ROTATE_LIGHT_7_Light where 0 is off and 1 is on.

    In a perfect world I would prefer to use a physical three-way switch rather than StreamDeck buttons but I only press these buttons once per flight and real switches are in finite supply so I save those for switches that I use all the time. But to each his own, that's the beauty of building your own cockpit.

    I know AAO is different from SPAD but conceptually they should be similar.

    1 Reply Last reply
    1
  • L Offline
    L Offline
    lancealotg
    wrote on last edited by
    #10

    Thanks Lobster, I will give it a try.
    Appreciate the help

    1 Reply Last reply
    0
  • N Offline
    N Offline
    neinnunb
    wrote on last edited by neinnunb
    #11

    @Lobster404 That's a great solution! I too had issues with that start engine button (I use Spad Next) What I would do is spam the LVAR many times over a few seconds and that would usually do it but this solution looks better.

    I program a short press as the #2 engine and a long press as #1 engine.

    My setup with a Loupedeck: https://youtu.be/IFQsMRxZ-kk?si=Q8A5TFLIAkXru2fK

    Thanks for sharing!

    1 Reply Last reply
    0

  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Users