Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
Collapse
Just Flight Community Forum
  1. Home
  2. Just Flight
  3. MSFS Products
  4. Black Square Add-Ons
  5. Piston & Turbine Dukes
  6. Spad.Next LVAR for Yoke Rocker Trim Switch

Spad.Next LVAR for Yoke Rocker Trim Switch

Scheduled Pinned Locked Moved Piston & Turbine Dukes
10 Posts 3 Posters 308 Views 1 Watching
  • 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.
  • G Offline
    G Offline
    GreenHat
    wrote on last edited by
    #1

    Hi there. Does anyone know how to create a new variable or how to find the variable of the electrical trim switch located on the yoke -in the sim- in Spad.Next? I didn't find anything after 2 hours, would like to use the rocker switch on my actual yoke, trim up/down with creating a condition to work only when electric trim switch is set to on is a good bypass, but it breaks the immersion since the acutal rocker switch is not moving on the yoke but rather the trim wheel.

    RandolfR 1 Reply Last reply
    0
    • B Offline
      B Offline
      brennan
      wrote on last edited by
      #2
      This post is deleted!
      1 Reply Last reply
      0
      • G GreenHat

        Hi there. Does anyone know how to create a new variable or how to find the variable of the electrical trim switch located on the yoke -in the sim- in Spad.Next? I didn't find anything after 2 hours, would like to use the rocker switch on my actual yoke, trim up/down with creating a condition to work only when electric trim switch is set to on is a good bypass, but it breaks the immersion since the acutal rocker switch is not moving on the yoke but rather the trim wheel.

        RandolfR Online
        RandolfR Online
        Randolf
        wrote on last edited by
        #3

        @GreenHat it's really simple. These are the scripts I use to operate the trim rocker on the yoke, inspired by the code of the virtual cockpit rocker switch (understand: most of it is blatantly copied from the aircraft files) 🙂

        up (actually not sure which one's up or down, you'll have to try):

        8 (>A:BUS LOOKUP INDEX, Number) (A:CIRCUIT CONNECTION ON:52, Bool)
        (A:ELECTRICAL MAIN BUS VOLTAGE:8, Volts) 12 > and 
        (L:var_PitchTrimPower, bool) and if{
          (A:ELEVATOR TRIM PCT, Percent) 163.83 * 16 + 16383 min -16383 max
          (>K:ELEVATOR_TRIM_SET)
        }
        1 (>A:CIRCUIT SWITCH ON:52, bool)
        

        down:

        8 (>A:BUS LOOKUP INDEX, Number) (A:CIRCUIT CONNECTION ON:52, Bool)
        (A:ELECTRICAL MAIN BUS VOLTAGE:8, Volts) 12 > and 
        (L:var_PitchTrimPower, bool) and if{
          (A:ELEVATOR TRIM PCT, Percent) 163.83 * 16 - 16383 min -16383 max
          (>K:ELEVATOR_TRIM_SET)
        }
        1 (>A:CIRCUIT SWITCH ON:52, bool)
        

        middle position (or on release of either of the above):

        0 (>A:CIRCUIT SWITCH ON:52, bool)
        
        G 1 Reply Last reply
        1
        • RandolfR Randolf

          @GreenHat it's really simple. These are the scripts I use to operate the trim rocker on the yoke, inspired by the code of the virtual cockpit rocker switch (understand: most of it is blatantly copied from the aircraft files) 🙂

          up (actually not sure which one's up or down, you'll have to try):

          8 (>A:BUS LOOKUP INDEX, Number) (A:CIRCUIT CONNECTION ON:52, Bool)
          (A:ELECTRICAL MAIN BUS VOLTAGE:8, Volts) 12 > and 
          (L:var_PitchTrimPower, bool) and if{
            (A:ELEVATOR TRIM PCT, Percent) 163.83 * 16 + 16383 min -16383 max
            (>K:ELEVATOR_TRIM_SET)
          }
          1 (>A:CIRCUIT SWITCH ON:52, bool)
          

          down:

          8 (>A:BUS LOOKUP INDEX, Number) (A:CIRCUIT CONNECTION ON:52, Bool)
          (A:ELECTRICAL MAIN BUS VOLTAGE:8, Volts) 12 > and 
          (L:var_PitchTrimPower, bool) and if{
            (A:ELEVATOR TRIM PCT, Percent) 163.83 * 16 - 16383 min -16383 max
            (>K:ELEVATOR_TRIM_SET)
          }
          1 (>A:CIRCUIT SWITCH ON:52, bool)
          

          middle position (or on release of either of the above):

          0 (>A:CIRCUIT SWITCH ON:52, bool)
          
          G Offline
          G Offline
          GreenHat
          wrote on last edited by
          #4

          @Randolf.
          Thank you for your help. Another question, where and how can I find such code(s)?

          I browsed thru all of the .xml and .cfg files of the duke with no luck.

          RandolfR 1 Reply Last reply
          0
          • G GreenHat

            @Randolf.
            Thank you for your help. Another question, where and how can I find such code(s)?

            I browsed thru all of the .xml and .cfg files of the duke with no luck.

            RandolfR Online
            RandolfR Online
            Randolf
            wrote on last edited by
            #5

            @GreenHat
            Here, for example, are the behaviors of virtual cockpit controls for the Grand Duke:
            bksq-aircraft-pistonduke\SimObjects\Airplanes\bksq-aircraft-grandduke\model.base\PistonDuke_INT.xml

            G 1 Reply Last reply
            1
            • RandolfR Randolf

              @GreenHat
              Here, for example, are the behaviors of virtual cockpit controls for the Grand Duke:
              bksq-aircraft-pistonduke\SimObjects\Airplanes\bksq-aircraft-grandduke\model.base\PistonDuke_INT.xml

              G Offline
              G Offline
              GreenHat
              wrote on last edited by
              #6

              @Randolf Thank you. That explains it. Silly me, I thought each version has its own stuff, and for the defatult/stock duke i was looking in its own directories.

              RandolfR 1 Reply Last reply
              0
              • G GreenHat

                @Randolf Thank you. That explains it. Silly me, I thought each version has its own stuff, and for the defatult/stock duke i was looking in its own directories.

                RandolfR Online
                RandolfR Online
                Randolf
                wrote on last edited by
                #7

                @GreenHat I haven't used the stock Duke yet, but I can see that for many files, it's aircraft.cfg is pointing to the Grand Duke folder, like this:
                model = "\..\..\bksq-aircraft-grandduke\model.base"

                G 1 Reply Last reply
                1
                • RandolfR Randolf

                  @GreenHat I haven't used the stock Duke yet, but I can see that for many files, it's aircraft.cfg is pointing to the Grand Duke folder, like this:
                  model = "\..\..\bksq-aircraft-grandduke\model.base"

                  G Offline
                  G Offline
                  GreenHat
                  wrote on last edited by
                  #8

                  @Randolf

                  Currently trying to implement the script you provided. Spad.Next rejects it with the following error message: (1,4) error CS1525: Unexpected symbol '>'

                  I am trying to add the script under the Extra (plus symbol) tab->>Scripts->>Add Scripts.

                  Any ideas?

                  RandolfR 1 Reply Last reply
                  0
                  • G GreenHat

                    @Randolf

                    Currently trying to implement the script you provided. Spad.Next rejects it with the following error message: (1,4) error CS1525: Unexpected symbol '>'

                    I am trying to add the script under the Extra (plus symbol) tab->>Scripts->>Add Scripts.

                    Any ideas?

                    RandolfR Online
                    RandolfR Online
                    Randolf
                    wrote on last edited by
                    #9

                    @GreenHat I don't know, never used Spad.Next.
                    This is the RPN format script as used by the sim and both FSUIPC and AAO. Can't find online any docs for Spad related to this. Maybe it's expecting some other format?

                    G 1 Reply Last reply
                    1
                    • RandolfR Randolf

                      @GreenHat I don't know, never used Spad.Next.
                      This is the RPN format script as used by the sim and both FSUIPC and AAO. Can't find online any docs for Spad related to this. Maybe it's expecting some other format?

                      G Offline
                      G Offline
                      GreenHat
                      wrote on last edited by
                      #10

                      @Randolf Definitely. It requires .cs file fromat, I suspected it won't be as easy as saving the script in text editor then renaming it to FILENAME.cs.

                      Currently browsing the forums to how to even create a script.... I never did such thing, used to modify existing ones back in the days for FSX and GTA:SA, but those were different times.

                      Anyways, thanks for your help, I will figure this out from this point.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

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