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. Bonanza Professional
  6. Manipulating Cabin Air Vents via LVars

Manipulating Cabin Air Vents via LVars

Scheduled Pinned Locked Moved Bonanza Professional
6 Posts 2 Posters 128 Views 2 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.
  • J Offline
    J Offline
    jmarkows
    wrote last edited by jmarkows
    #1

    Hi again Nick,

    I had the brilliant idea this evening to put the vernier axes on my Velocity One yoke to use for some of the cabin environmental controls in the Bonanza. After my adventure binding the cowl flaps, it was a pretty quick setup in terms of getting the calculator code to convert the axis values to 0-100, as well as the binding. Everything looks like it's moving in the cockpit ok.

    I noticed on the tablet, however, that the valves will only snap shut when I move my axes, though. They function normally when I click and grab them via the virtual cockpit, but when I move them through my axes and FSUIPC they immediately snap closed. I did double check the external model, and it looks like the cowl flaps are moving from open to closed based on the lever position when I use my bound axis, so at least that is working.

    Any thoughts on why the cabin levers would move, but not the internal valve positions? Also, the Aft Cabin LVar is missing from the manual, but I was able to pick it out of the dumped LVar list FSUIPC gave me easily enough.

    The code snippets are as follows:

    BT36_Cowl_Flap#@ 16384 + 32767 / 100 * 0 max 100 min (>A:RECIP ENG COWL FLAP POSITION:1, percent)
    BT36_Cabin_Heat#@ 16384 + 32767 / 100 * 0 max 100 min (>L:var_CabinHeatHandle, percent)
    BT36_Aft_Cabin#@ 16384 + 32767 / 100 * 0 max 100 min (>L:var_AftCabinAirHandle, percent)
    BT36_Defrost#@ 16384 + 32767 / 100 * 0 max 100 min (>L:var_DefrosterHandle, percent)
    

    Which should be the correct math for changing a range of 16383 through -16384 to a range of 0 through 100. I am getting full movement in the cockpit for the cabin levers, just no valve movement that isn't immediately shutting it.

    1 Reply Last reply
    0
    • Black SquareB Online
      Black SquareB Online
      Black Square
      Black Square Developer
      wrote last edited by
      #2

      I would just recommend checking that the L:Vars are really traversing the range 0-100 when you set them. Other than that, I might need a video to help diagnose.

      J 1 Reply Last reply
      0
      • Black SquareB Black Square

        I would just recommend checking that the L:Vars are really traversing the range 0-100 when you set them. Other than that, I might need a video to help diagnose.

        J Offline
        J Offline
        jmarkows
        wrote last edited by
        #3

        @Black-Square said in Manipulating Cabin Air Vents via LVars:

        I would just recommend checking that the L:Vars are really traversing the range 0-100 when you set them. Other than that, I might need a video to help diagnose.

        I'm getting full movement range out of the virtual levers in the cockpit, so I would have thought the range was correct. I'll check again tomorrow.

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jmarkows
          wrote last edited by jmarkows
          #4

          Solved! I am one of those people who cannot leave problems unsolved. I tried directly setting the values to 100 and 0 and again saw lever movement, but no valve movement.

          Changing the type from percent to number fixed the issue, though, and now I see the full range of valve motion along with the lever movement.

          Just a reminder to add the AftCabinAirHandle LVar to the manual on your next pass, though, in case that was buried in my OP.

          1 Reply Last reply
          0
          • Black SquareB Online
            Black SquareB Online
            Black Square
            Black Square Developer
            wrote last edited by
            #5

            All done with the manual. Glad you found the solution! I once had someone tell me that L:Vars had no units, and that adding them made no difference. Those words echo in my head almost every day when I have problems, haha.

            J 1 Reply Last reply
            0
            • Black SquareB Black Square

              All done with the manual. Glad you found the solution! I once had someone tell me that L:Vars had no units, and that adding them made no difference. Those words echo in my head almost every day when I have problems, haha.

              J Offline
              J Offline
              jmarkows
              wrote last edited by
              #6

              @Black-Square said in Manipulating Cabin Air Vents via LVars:

              I once had someone tell me that L:Vars had no units, and that adding them made no difference. Those words echo in my head almost every day when I have problems, haha.

              Unfortunately, the FSUIPC documentation is rather poor on how some of these features work. How to implement them in FSUIPC, yes, but what you're actually doing, not so much. This has mainly been me trying to parse how the large library of pre-made bindings and functions from years of community contributions from all flavors of MSFS.

              The example I was looking at for the cowl flaps was from A2A's Comanche cowl flaps, as well as finding the RECIP ENG COWL FLAP POSITION:1 variable in online MSFS SDK where it was defined as a percent. In the manual, you listed 0-100, and it started working once I put the all-important A: in front of the var name. It was only because I have also seen "number" used in that field, as well as "enum," that I thought to try it. As I said, I don't have any documentation with a list of what it could possibly be.

              For the various air levers, while percent seemed to work for the levers, it did not for the valves they control. Do you, from a programming standpoint, have any inkling as to what might have been happening under the hood when the input was... typecast(?) as a percent instead of a number?

              This is purely me asking for a glimpse of how it works under the hood.

              1 Reply Last reply
              0
              • J jmarkows referenced this topic
              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