Help With Button Commands

OTG Blog Forums Avionics & Controls Help With Button Commands

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #1744

    Robert
    • Posts: 6

    Hello everyone, great to be here. I have also been building a cessna 172 cockpit and am loving it. I do have a question pertaining to button commands on my 1010 cessna panel, i can’t seem to find the command for bus 2 on the master avionics switch from within Xplane setup. When i switch on my master avionics it will only flip bus 1. I haven’t been able to find a command for bus 2. Any help would be appreciated. Thanks for starting this forum basement fly guy.

    #1746

    Basement Fly Guy
    • Posts: 228

    I had this problem, too, and a reader gave me the fix. The command is something like “bus tie” – “tie” is the key word to look for. I’m not where I can check. But it  worked right away.

    N15JG On PilotEdge

    #1763

    Robert
    • Posts: 6

    Thank you sir, that did the trick. I appreciate your help.

    #2107

    Brian Hedrick
    • Posts: 32

    Hey Robert, how did you get this to work?  I just got my Cessna Combo Panel from DA and have everything working except this.  I can assign the Avionics Master switch on the panel to either “Avionics Toggle” (which switches Bus 1 on and off) or to “Cross-Tie Toggle” (which switches Bus 2 on and off), but I can’t get both Bus 1 & 2 to be controlled from the same switch.  To be fair, I’ve only tried from within XP and not through Spad.neXt.

    Any thoughts?

    **Update** Thinking about this again, don’t think it is possible simply through XP but think I know how to do it in SN.  I’ll give it a shot later today.

    • This reply was modified 2 years, 5 months ago by  Brian Hedrick.
    #2109

    N538TM
    • Posts: 19

    xplane

    I think this might help you both.  I use the fly with lua plugin.  You can get it here for xp11 and it works with the current beta. ( http://forums.x-plane.org/index.php?/files/file/35579-flywithlua-for-x-plane-11-and-10-windows-linux-mac-os-x-version/)   This will enable you to create a file or I have enclosed my file to use your switches in the aircraft without using xplane joystick settings.

     

    Then what I did was

    1. In the flywithlua/scripts folder I created a lua file and it will work with the c172 only.
    2. With the plugin enabled, in xplane go to plugins flywithlua Macros and show the joystick numbers.
    3.  when you flip the switch you want, on the top left it will show button no (your number) was pressed or released.  That is your button on you panel.

    4.  On the picture I attached it you look at I have shown my switch number. You want to change the number 2 to what you number is, save the file and your done.  Drop it into the scripts folder  and your in business.

    5.  Now I have created a file for the entire c172 or you can just use it for the avionics switch.  To use it for just the avionics switch, delete all the others just keeping the two highlighted or change all the numbers to in the others to your switch numbers.

    6.  If anyone has any issues you can let me know and I will help you out.  I could not upload here so I uploaded to dropbox for download.

    https://www.dropbox.com/s/3cno9v1y24kscfy/C172_Panel.lua?dl=0

    xplane

    Hope this helps everyone

    Tony S.

    • This reply was modified 2 years, 5 months ago by  N538TM.
    Attachments:
    You must be logged in to view attached files.
    #2114

    Brian Hedrick
    • Posts: 32

    @n538tm

    Thanks so much for turning me on to FlyWithLua.  I had completely forgot that existed and had never really looked in to it before.  It solved my problem 100% (with a slight modification to your script).  Here’s mine…  I’ve taken everything else out except for the “cross_tie” and mapped the Avionics bit within XP itself.  So now when I flip the Avionics switch on my Desktop Aviator panel, XP will flip the Bus 1 and this script flips Bus 2.

    C172 Lua Script

    #2117

    N538TM
    • Posts: 19

    Brian,

    Glad I could help.

    #2130

    Basement Fly Guy
    • Posts: 228

    I just had SPAD.neXt send both the normal avionics “on” command and the tie command when I flip the avionics switch and it works like a charm.

    N15JG On PilotEdge

    #2131

    Brian Hedrick
    • Posts: 32

    How did you get the panel to show up in SN?  When I went in to SN with the panel plugged in, it didn’t show up anywhere.

    Also, I am now trying to get my Fuel Selector panel to work and am having a heck of a time.  Nothing I try (whether in the sim itself or through FlyWithLua) is working.  The panel is recognized and I can program the selector to do other things (as a test I programmed it to change flap settings and it worked) I just can’t get it to do anything with the actual fuel selector.  Any thoughts?

    **Update** Alright, this is strange.  I just tried SN again but with the Fuel Selector panel this time and it showed up no problem so I will attempt to program through there and will try to see if I can get the Switch panel to show up as well (not sure why it didn’t show up initially but might as well try again).

    • This reply was modified 2 years, 5 months ago by  Brian Hedrick.
    #2133

    Basement Fly Guy
    • Posts: 228

    Yeah, they both showed up in the “panels” section for me no problem. Be sure they are plugged in before you run SPAD.neXt (as you would with any USB device).

    N15JG On PilotEdge

    #2143

    Brian Hedrick
    • Posts: 32

    Thanks to all of you.  @BFG, could you possibly share what events you programmed for the Fuel panel in SPAD.neXt?  I’ve tried several and still nothing.

    #2178

    Brian Hedrick
    • Posts: 32

    Anyone have any thoughts about this?  I still can’t seem to get the Desktop Aviator Fuel panel to register any changes in the sim although the PC does see the different switches as buttons when I move the fuel selector and pull/push the fuel cutoff and the panel shows up in SPAD.neXt.  Stumped!

    #2182

    Basement Fly Guy
    • Posts: 228

    Ok, I’m sitting in my sim with SPAD.neXt open, and I was incorrect before. The DA Fuel Panel shows up in the “Controls” section and is listed as “Fuel Tank Select.” The fuel selector registers as buttons 17, 18, 19, 20 for R L B OFF respectively. The cutoff switch registers as button 1 and as a toggle. None of these are configured in SPAD, though, as XP-11 sees the fuel selector panel and I have them configured there

    XP sees the fuel tank panel as “Fuel Tank Select”:

    • Button 1: Set fuel selector to none (shut off)
    • Bt 16: Set fuel selector to left tanks
    • 17: All tanks
    • 18: Right tanks

    It sees the switch panel as “Combo Panel.” All the buttons are set as toggles (0 is Generators All, 1 is Batteries All, then the rest as you would expect, and 10 is Avionics toggle. In SPAD I also have button 10 assigned to send Cross Tie Toggle event to the sim when flipped. This switches the Av2 switch along with Av1 in the C 172.

     

    N15JG On PilotEdge

    #2183

    N538TM
    • Posts: 19

    Another thing you could do is use the xplane dataref and put it into the fly with lua script.

    Here are the references from xplane

    sim/cockpit2/fuel/fuel_tank_selector_left”, “INT”, 1

    sim/cockpit2/fuel/fuel_tank_selector_left”, “INT”, 3

    sim/cockpit2/fuel/fuel_tank_selector_left”, “INT”, 4

    #2198

    Brian Hedrick
    • Posts: 32

    hmmm… Yeah.  Still nothing.  I’ve tried just setting up through XP with no responses in the cockpit.  When I turn the selector or pull the cut off, it registers in the Joystick config, but nothing happens in the cockpit itself.  I’ve tried setting up through FWL and removing the settings in the sim with the same results, and I’ve tried setting up through SN with the same results.  I’m stumped at this point.  The PC and even the sim and SN see the movement of the selector and push/pull but nothing happens in the cockpit.

    With FWL, I tried setting up as a “create_switch” and as a “create_positive_edge_flip” and nothing.  What would the exact script look like, if you don’t mind and I’ll give that a shot.  Failing this, I may have to return this one to DA.

Viewing 15 posts - 1 through 15 (of 21 total)

You must be logged in to reply to this topic.