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. Steam Gauge Overhaul
  6. Black Air King Air 350- "PITCH TRIM AP/YD" и " AP ENG" events ?

Black Air King Air 350- "PITCH TRIM AP/YD" и " AP ENG" events ?

Scheduled Pinned Locked Moved Steam Gauge Overhaul
24 Posts 2 Posters 1.8k 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.
  • Black SquareB Black Square

    Perhaps I should have asked how familiar you were with the RPN code. Some of my users are not sure what to do with it when I give it to them, so I try to simplify things into mostly native commands. Since the other code worked well for you, here is the code for the AP master button that will have the exact functionality you're looking for.

    (A:AUTOPILOT MASTER,bool) ! if{ 
    	(>K:AP_MASTER)
    	(A:AUTOPILOT YAW DAMPER, Bool) ! if{ (>K:YAW_DAMPER_TOGGLE) }
    
    	(>K:AP_HDG_HOLD_OFF)
    	(>K:AP_NAV1_HOLD_OFF)
    	(>K:AP_APR_HOLD_OFF)
    	(>K:AP_ALT_HOLD_OFF)
    	(>K:AP_LOC_HOLD_OFF)
    	(>K:AP_FLIGHT_LEVEL_CHANGE_OFF)
    	0 (>L:var_iasHoldMode, bool)
    }
    els{
    	(>K:AP_MASTER)
    	(A:AUTOPILOT YAW DAMPER, Bool) if{ (>K:YAW_DAMPER_TOGGLE) }
    	(A:AUTOPILOT FLIGHT DIRECTOR ACTIVE, Bool) if{ (>K:TOGGLE_FLIGHT_DIRECTOR) }
    	2 (>L:BKSQ_AUTOPILOT_DISCONNECT_SOUND, bool)
    
    	(>K:AP_HDG_HOLD_OFF)
    	(>K:AP_NAV1_HOLD_OFF)
    	(>K:AP_APR_HOLD_OFF)
    	(>K:AP_ALT_HOLD_OFF)
    	(>K:AP_LOC_HOLD_OFF)
    	(>K:AP_FLIGHT_LEVEL_CHANGE_OFF)
    	0 (>L:var_iasHoldMode, bool)
    }
    

    Let me know how that goes for you!

    S Offline
    S Offline
    SMN204
    wrote on last edited by SMN204
    #5

    @Black-Square said in Black Air King Air 350- "PITCH TRIM AP/YD" и " AP ENG" events ?:

    Let me know how that goes for you!

    This RPN code works great as well!
    Thank you very much!
    Great mod and support!

    P.S
    Maybe you can give me the RPN codes for:

    • “CLIMB” and "DSC" buttons.
    • Rocker switch UP-DN
    1 Reply Last reply
    0
    • Black SquareB Online
      Black SquareB Online
      Black Square
      Black Square Developer
      wrote on last edited by
      #6

      Glad it worked for you. No problem!
      Climb:

      (L:var_iasHoldMode, bool) if{
      	0 (>L:var_iasHoldMode, bool)
      	(A:INDICATED ALTITUDE, FEET) 30000 > if{
      		120 (>K:AP_SPD_VAR_SET)
      	}
      	els{
      		(A:INDICATED ALTITUDE, FEET) 30000 > if{
      			140 (>K:AP_SPD_VAR_SET)
      		}
      		els{
      			160 (>K:AP_SPD_VAR_SET)
      		}
      	}
      }
      els{
      	(>K:FLIGHT_LEVEL_CHANGE)
      	(A:INDICATED ALTITUDE, FEET) 30000 > if{
      		120 (>K:AP_SPD_VAR_SET)
      	}
      	els{
      		(A:INDICATED ALTITUDE, FEET) 30000 > if{
      			140 (>K:AP_SPD_VAR_SET)
      		}
      		els{
      			160 (>K:AP_SPD_VAR_SET)
      		}
      	}
      }
      

      Descend:

      (L:var_iasHoldMode, bool) if{
      	0 (>L:var_iasHoldMode, bool)
      	262 (A:INDICATED ALTITUDE, FEET) 0.001926 * - 10 - (>K:AP_SPD_VAR_SET)
      }
      els{
      	(>K:FLIGHT_LEVEL_CHANGE)
      	262 (A:INDICATED ALTITUDE, FEET) 0.001926 * - 10 - (>K:AP_SPD_VAR_SET)
      }
      

      Rocker Up:

      (A:CIRCUIT ON:29, bool) if{
      	(A:AUTOPILOT FLIGHT LEVEL CHANGE, Bool) if{
      		1 (>L:var_iasHoldMode, bool)
      		(>K:AP_SPD_VAR_INC)
      	}
      	els{
      		(>K:AP_VS_VAR_INC)
      	}
      }
      

      Rocker Down:

      (A:CIRCUIT ON:29, bool) if{
      	(A:AUTOPILOT FLIGHT LEVEL CHANGE, Bool) if{
      		1 (>L:var_iasHoldMode, bool)
      		(>K:AP_SPD_VAR_DEC)
      	}
      	els{
      		(>K:AP_VS_VAR_DEC)
      	}
      }
      
      1 Reply Last reply
      0
      • S Offline
        S Offline
        SMN204
        wrote on last edited by
        #7

        Thank you very much! !

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SMN204
          wrote on last edited by
          #8

          And I'll also ask... RPN code for

          • IAS
            IAS.png

          • PITCH SYNC
            Pitch Sync.png

          Thanks!

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

            No problem!

            IAS:

            (A:AUTOPILOT FLIGHT LEVEL CHANGE, Bool) if{
            	(L:var_iasHoldMode, bool) if{
            		(>K:FLIGHT_LEVEL_CHANGE)
            		0 (>L:var_iasHoldMode, bool)
            	}
            	els{
            		(A:AIRSPEED INDICATED, knots) (>K:AP_SPD_VAR_SET)
            		1 (>L:var_iasHoldMode, bool)
            	}
            }
            els{
            	(>K:FLIGHT_LEVEL_CHANGE)
            	(A:AIRSPEED INDICATED, knots) (>K:AP_SPD_VAR_SET)
            	1 (>L:var_iasHoldMode, bool)
            }
            

            The pitch sync button is not implemented in the currently public version of the King Air as it is in my newer aircraft, but you might have some luck with the following native command:

            (>K:SYNC_FLIGHT_DIRECTOR_PITCH)
            
            S 1 Reply Last reply
            0
            • Black SquareB Black Square

              No problem!

              IAS:

              (A:AUTOPILOT FLIGHT LEVEL CHANGE, Bool) if{
              	(L:var_iasHoldMode, bool) if{
              		(>K:FLIGHT_LEVEL_CHANGE)
              		0 (>L:var_iasHoldMode, bool)
              	}
              	els{
              		(A:AIRSPEED INDICATED, knots) (>K:AP_SPD_VAR_SET)
              		1 (>L:var_iasHoldMode, bool)
              	}
              }
              els{
              	(>K:FLIGHT_LEVEL_CHANGE)
              	(A:AIRSPEED INDICATED, knots) (>K:AP_SPD_VAR_SET)
              	1 (>L:var_iasHoldMode, bool)
              }
              

              The pitch sync button is not implemented in the currently public version of the King Air as it is in my newer aircraft, but you might have some luck with the following native command:

              (>K:SYNC_FLIGHT_DIRECTOR_PITCH)
              
              S Offline
              S Offline
              SMN204
              wrote on last edited by
              #10

              Thanks!
              And one more thing...:-)
              Code for quickly switch the view of this AP panel ?
              46c7435e-951f-4ff5-b013-79234259e56e-изображение.png

              c29af229-65e6-49f2-a1ac-86900e875021-изображение.png

              https://youtu.be/lYp-W9GI5uQ
              It is convenient to quickly see which AP modes are in use.

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

                Easy! Just toggle (L:var_optionalAutopilotModePanel, bool). Enjoy! Glad this has all been working for you so well.

                S 1 Reply Last reply
                0
                • Black SquareB Black Square

                  Easy! Just toggle (L:var_optionalAutopilotModePanel, bool). Enjoy! Glad this has all been working for you so well.

                  S Offline
                  S Offline
                  SMN204
                  wrote on last edited by SMN204
                  #12

                  @Black-Square said in Black Air King Air 350- "PITCH TRIM AP/YD" и " AP ENG" events ?:

                  Easy! Just toggle (L:var_optionalAutopilotModePanel, bool)

                  AP_Panel_View#(L:var_optionalAutopilotModePanel, bool)
                  Hmmm... this code doesn't work :-(

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

                    I'm not sure what the scripting looks like in FSUIPC, but if I were to give you RPN code to toggle the panel on and off the same way I did for the others, it would look like this:

                    (L:var_optionalAutopilotModePanel, bool) ! (>L:var_optionalAutopilotModePanel, bool)
                    
                    S 1 Reply Last reply
                    0
                    • Black SquareB Black Square

                      I'm not sure what the scripting looks like in FSUIPC, but if I were to give you RPN code to toggle the panel on and off the same way I did for the others, it would look like this:

                      (L:var_optionalAutopilotModePanel, bool) ! (>L:var_optionalAutopilotModePanel, bool)
                      
                      S Offline
                      S Offline
                      SMN204
                      wrote on last edited by
                      #14

                      @Black-Square said in Black Air King Air 350- "PITCH TRIM AP/YD" и " AP ENG" events ?:

                      I'm not sure what the scripting looks like in FSUIPC, but if I were to give you RPN code to toggle the panel on and off the same way I did for the others, it would look like this:

                      (L:var_optionalAutopilotModePanel, bool) ! (>L:var_optionalAutopilotModePanel, bool)

                      Wow, it works!
                      I guess FSUIPC requires RPN codes.

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

                        Actually, if I take a guess at what you might have been trying to do with FSUIPC above, you might be able to get your code to work with the addition of one character, if it was useful to you.

                        AP_Panel_View#(>L:var_optionalAutopilotModePanel, bool)
                        

                        The ">" means that you would like to write the preceding value to the L:Var, not simply read it.

                        S 1 Reply Last reply
                        0
                        • Black SquareB Black Square

                          Actually, if I take a guess at what you might have been trying to do with FSUIPC above, you might be able to get your code to work with the addition of one character, if it was useful to you.

                          AP_Panel_View#(>L:var_optionalAutopilotModePanel, bool)
                          

                          The ">" means that you would like to write the preceding value to the L:Var, not simply read it.

                          S Offline
                          S Offline
                          SMN204
                          wrote on last edited by SMN204
                          #16

                          @Black-Square said in Black Air King Air 350- "PITCH TRIM AP/YD" и " AP ENG" events ?:

                          The ">" means that you would like to write the preceding value to the L:Var, not simply read it.

                          Checked
                          (>L:var_optionalAutopilotModePanel, bool)

                          This code only switches the view from:
                          10b80b28-db91-4fc7-8bfe-a08e83e5db99-изображение.png

                          to this:
                          111601c2-998d-4525-bc19-167eccb2b9fa-изображение.png

                          It doesn't switch back!

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            SMN204
                            wrote on last edited by SMN204
                            #17

                            RPN for

                            • BLEED AIR VALVEs (OPEN, ENVIR OFF, INSTR & ENVIR OFF

                            Please!

                            BLEED AIR.png

                            Thanks!

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

                              I have simplified this one already in the next version of the King Air that has yet to be released, but to be safe, here is the full code:

                              OPEN:
                              (A:CIRCUIT ON:78, bool) if{ 1 1 (>K:2:ENGINE_BLEED_AIR_SOURCE_SET) 0 (>L:var_environmentalBleedDisabled_L, bool) } 0 (>L:var_bleedState_L, number)
                              
                              ENVIR OFF:
                              (A:CIRCUIT ON:78, bool) if{ 1 1 (>K:2:ENGINE_BLEED_AIR_SOURCE_SET) 1 (>L:var_environmentalBleedDisabled_L, bool) } 1 (>L:var_bleedState_L, number)
                              
                              ALL OFF:
                              (A:CIRCUIT ON:78, bool) if{ 0 1 (>K:2:ENGINE_BLEED_AIR_SOURCE_SET) 1 (>L:var_environmentalBleedDisabled_L, bool) } 2 (>L:var_bleedState_L, number)
                              

                              Just replace the "_L" with "_R" for the right-hand engine.

                              S 2 Replies Last reply
                              0
                              • Black SquareB Black Square

                                I have simplified this one already in the next version of the King Air that has yet to be released, but to be safe, here is the full code:

                                OPEN:
                                (A:CIRCUIT ON:78, bool) if{ 1 1 (>K:2:ENGINE_BLEED_AIR_SOURCE_SET) 0 (>L:var_environmentalBleedDisabled_L, bool) } 0 (>L:var_bleedState_L, number)
                                
                                ENVIR OFF:
                                (A:CIRCUIT ON:78, bool) if{ 1 1 (>K:2:ENGINE_BLEED_AIR_SOURCE_SET) 1 (>L:var_environmentalBleedDisabled_L, bool) } 1 (>L:var_bleedState_L, number)
                                
                                ALL OFF:
                                (A:CIRCUIT ON:78, bool) if{ 0 1 (>K:2:ENGINE_BLEED_AIR_SOURCE_SET) 1 (>L:var_environmentalBleedDisabled_L, bool) } 2 (>L:var_bleedState_L, number)
                                

                                Just replace the "_L" with "_R" for the right-hand engine.

                                S Offline
                                S Offline
                                SMN204
                                wrote on last edited by
                                #19

                                @Black-Square said in Black Air King Air 350- "PITCH TRIM AP/YD" и " AP ENG" events ?:

                                here is the full code

                                Thumb Up 50x60.png

                                1 Reply Last reply
                                0
                                • Black SquareB Black Square

                                  I have simplified this one already in the next version of the King Air that has yet to be released, but to be safe, here is the full code:

                                  OPEN:
                                  (A:CIRCUIT ON:78, bool) if{ 1 1 (>K:2:ENGINE_BLEED_AIR_SOURCE_SET) 0 (>L:var_environmentalBleedDisabled_L, bool) } 0 (>L:var_bleedState_L, number)
                                  
                                  ENVIR OFF:
                                  (A:CIRCUIT ON:78, bool) if{ 1 1 (>K:2:ENGINE_BLEED_AIR_SOURCE_SET) 1 (>L:var_environmentalBleedDisabled_L, bool) } 1 (>L:var_bleedState_L, number)
                                  
                                  ALL OFF:
                                  (A:CIRCUIT ON:78, bool) if{ 0 1 (>K:2:ENGINE_BLEED_AIR_SOURCE_SET) 1 (>L:var_environmentalBleedDisabled_L, bool) } 2 (>L:var_bleedState_L, number)
                                  

                                  Just replace the "_L" with "_R" for the right-hand engine.

                                  S Offline
                                  S Offline
                                  SMN204
                                  wrote on last edited by SMN204
                                  #20

                                  @Black-Square said in Black Air King Air 350- "PITCH TRIM AP/YD" и " AP ENG" events ?:

                                  Just replace the "_L" with "_R" for the right-hand engine.

                                  Correction after testing...
                                  The left one is fine, but the right one.... problem!

                                  For the right-hand engine I replace the "_L" with "_R" (as you wrote):

                                  OPEN:

                                  (A:CIRCUIT ON:78, bool) if{ 1 1 (>K:2:ENGINE_BLEED_AIR_SOURCE_SET) 0 (>L:var_environmentalBleedDisabled_R, bool) } 0 (>L:var_bleedState_R, number)
                                  

                                  When controlling the mouse - switch animation and indication "R BL AIR OFF" everything is normal.
                                  But when controlling from the assigned RPN code - the switch animation works visually normally, but the "R BL AIR OFF" display does not go out!

                                  Video:
                                  https://youtu.be/lgZ4bfgMBck

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

                                    I'm sorry. That's my fault. You also need to change the last number before the "(>K:2:..."

                                    For the right engine, the three lines should contain...

                                    if{ 0 2 (>K:...
                                    if{ 1 2 (>K:...
                                    if{ 1 2 (>K:...
                                    

                                    I hope that makes sense! Let me know.

                                    S 1 Reply Last reply
                                    0
                                    • Black SquareB Black Square

                                      I'm sorry. That's my fault. You also need to change the last number before the "(>K:2:..."

                                      For the right engine, the three lines should contain...

                                      if{ 0 2 (>K:...
                                      if{ 1 2 (>K:...
                                      if{ 1 2 (>K:...
                                      

                                      I hope that makes sense! Let me know.

                                      S Offline
                                      S Offline
                                      SMN204
                                      wrote on last edited by
                                      #22

                                      @Black-Square said in Black Air King Air 350- "PITCH TRIM AP/YD" и " AP ENG" events ?:

                                      Let me know.

                                      Everything's fine now!

                                      1 Reply Last reply
                                      0
                                      • S Offline
                                        S Offline
                                        SMN204
                                        wrote on last edited by
                                        #23

                                        RPN code for CONDITION LEVERS, please!

                                        • HIGH IDLE
                                        • LOW IDLE

                                        Thanks!

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

                                          In the King Air, the condition levers use the native bindings, so any of the following should work:

                                          >K:AXIS_CONDITION_LEVER_1_SET
                                          >K:CONDITION_LEVER_1_SET
                                          >K:CONDITION_LEVER_1_INC
                                          >K:CONDITION_LEVER_1_DEC
                                          
                                          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