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. Baron Professional
  6. Breakers pulled Code

Breakers pulled Code

Scheduled Pinned Locked Moved Baron Professional
5 Posts 2 Posters 116 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.
  • H Online
    H Online
    Humbi
    wrote last edited by
    #1

    I want to use the variables for Breakers pulled. The code-example for Oil L Breaker is working but only in Devmode when the BehaviourDebug-Window is open and Display Value is selected (MSFS 2020). What do I have to do to make it work outside of developer mode?

    2·(>A:BUS·LOOKUP·INDEX,·Number)·(A:CIRCUIT·CONNECTION·ON:14,·Bool)

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

      You might have done this on purpose, but make sure the · characters in your code are replaced with spaces.

      It sounds like you're trying figure out when a breaker is pulled, not to actually do the pulling? What you have should work in XML, but it's difficult to use this code outside of XML, because the first command needs to complete before you read from the variable. What environment are you using to do this? Also, if push comes to shove, you can add <EXPORT_LVAR>TRUE</EXPORT_LVAR> to each breaker in the XML, and then read the value with (L:var_#NODE_ID#_readonly, bool).

      1 Reply Last reply
      0
      • H Online
        H Online
        Humbi
        wrote last edited by
        #3

        Yes, I want to figure out when a breaker is pulled using Axis and Ohs. How to do the pulling I know. You've already helped me find the solution with editing the XML and use the vars. It works reliably. I can't get the code to work outside XML not even with pause commands in between. Now my virtual copilot can talk to me when an electrical failure occurs.

        Nick, thank you very much for your help!

        Black SquareB 1 Reply Last reply
        0
        • H Humbi

          Yes, I want to figure out when a breaker is pulled using Axis and Ohs. How to do the pulling I know. You've already helped me find the solution with editing the XML and use the vars. It works reliably. I can't get the code to work outside XML not even with pause commands in between. Now my virtual copilot can talk to me when an electrical failure occurs.

          Nick, thank you very much for your help!

          Black SquareB Offline
          Black SquareB Offline
          Black Square
          Black Square Developer
          wrote last edited by
          #4

          @Humbi said in Breakers pulled Code:

          Nick, thank you very much for your help!

          That's what I'm here for 🙂

          What's not working outside the XML? You should be able to read those new L:Vars anywhere.

          1 Reply Last reply
          0
          • H Online
            H Online
            Humbi
            wrote last edited by
            #5

            I meant that the code from my first post doesn't work reliably outside of XML, not even with SPLIT or WAIT commands, as you suspected.

            Of course, I can use the new L:Vars via Axis and Ohs after I've edited the XML file - great!

            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