PTT Command for DIY Cockpit Button

PTT Command for DIY Cockpit Button

Postby staffordcastle » Mon Nov 13, 2017 2:51 pm

I have physically added a button to my yoke for the purpose of push to talk for PilotEdge. The button is wired to an Arduino board that is connected to X-Plane via the ArdSimX library (http://simvim.com/ardsimx/). This plugin allows me to map commands in X-Plane to buttons, switches etc. I have tried mapping my PTT button to the sim/operation/contact_atc command. It works fine without the PilotEdge plugin installed (meaning it pops the ATC window which is the normal Contact ATC behavior). But with the PilotEdge plugin installed, it does not work... nothing happens. I inspect the dataref pilotedge/radio/tx_status and when I press the normal joystick button I have assigned to this command, it changes to 1 but when I press the new custom button mapped to the contact_atc command, nothing happens.

Obviously, the PilotEdge plugin is capturing or modifying the contact_atc command for its purposes. And unfortunately, the ArdSimX library does not support mapping a button to a keypress.

Is there PilotEdge specific command that I could map the PTT functionality to?

PTTButton.jpg
Yoke Custom PTT Button
PTTButton.jpg (40.04 KiB) Viewed 1562 times
staffordcastle
 
Posts: 6
Joined: Sun Nov 12, 2017 10:18 am
Location: Rancho Cordova, CA

Re: PTT Command for DIY Cockpit Button

Postby Keith Smith » Tue Nov 14, 2017 2:26 pm

There are numerous ways to call a command. You can call it as a one-time command, or you can begin/end the command. Can you verify that you're doing the latter and not the former?
Keith Smith
 
Posts: 9260
Joined: Sat Oct 09, 2010 8:38 pm
Location: Pompton Plains, NJ

Re: PTT Command for DIY Cockpit Button

Postby staffordcastle » Thu Nov 16, 2017 11:30 am

Thanks Keith for responding. I am not exactly sure because I just specify in a config file "button pressed = command" but I think it is doing the begin when I press and end when I release. I tested the behaviour by assigning the button "sim/annunciator/test_all_annunciators" and when I press the button, I can see the "TEST" switch in my C172 move to test position and not release until I release the button. One strange behaviour that I noticed is that when I have this button mapped to "contact_atc", pressing the button sometimes causes it to connect or disconnect from PilotEdge. Does not do it every time I press the button but seems like it does that if I hit the button twice really fast. Not sure what that means.
staffordcastle
 
Posts: 6
Joined: Sun Nov 12, 2017 10:18 am
Location: Rancho Cordova, CA

Re: PTT Command for DIY Cockpit Button

Postby Keith Smith » Fri Nov 17, 2017 2:05 pm

5 clicks of the PTT within 3 secs is a shortcut for toggling your PE connection, so if THAT is happening, then your PTT is working on PE. Can you double check the transmit situation isn't working?
Keith Smith
 
Posts: 9260
Joined: Sat Oct 09, 2010 8:38 pm
Location: Pompton Plains, NJ

Re: PTT Command for DIY Cockpit Button

Postby staffordcastle » Fri Nov 17, 2017 5:04 pm

Hi Keith, I am sure transmit is not working because 1) no one responds in PilotEdge when I request a radio check using my custom button and 2) the pilotedge/radio/tx_status does not change to 1 when I press the button. But the 5 clicks in 5 secs shortcut does work.

Here is a link to a video I created demonstrating the issue: https://drive.google.com/file/d/1inYzTL ... sp=sharing

Thanks!
staffordcastle
 
Posts: 6
Joined: Sun Nov 12, 2017 10:18 am
Location: Rancho Cordova, CA

Re: PTT Command for DIY Cockpit Button

Postby Keith Smith » Sat Nov 18, 2017 9:23 pm

I notice in the video that you have the avionics powered down and the master off. Entertain me for a moment, could you power everything up (including engine running at 1000rpm or more with alternator on) and retest? Also, can you verify that both buttons are mapped to "contact atc" and not the PilotEdge COM1/2 PTT commands that were recently (and quietly) introduced?
Keith Smith
 
Posts: 9260
Joined: Sat Oct 09, 2010 8:38 pm
Location: Pompton Plains, NJ

Re: PTT Command for DIY Cockpit Button

Postby staffordcastle » Mon Nov 20, 2017 2:39 pm

Hi Keith,

Here is a new video with the engine running and avionics turned on and also showing how it is configured.

https://drive.google.com/file/d/1rOvTw8 ... JHnMp/view

Thanks!
staffordcastle
 
Posts: 6
Joined: Sun Nov 12, 2017 10:18 am
Location: Rancho Cordova, CA

Re: PTT Command for DIY Cockpit Button

Postby staffordcastle » Thu Nov 30, 2017 8:47 pm

Hi Keith,

I figured out what the problem was. There is an option in the ArdSimX configurator when assign a button to a command to support press and hold. I did not check that box and as such when I press the button, it was essentially pressing and releasing the button even though I was holding it down. I just tested it in PilotEdge and now it works!

Thanks for working with me on this!

~Mark
staffordcastle
 
Posts: 6
Joined: Sun Nov 12, 2017 10:18 am
Location: Rancho Cordova, CA

Re: PTT Command for DIY Cockpit Button

Postby Keith Smith » Fri Dec 01, 2017 12:10 pm

I'm glad you got it fixed, but that's a surprising one. Earlier you posted:
I tested the behaviour by assigning the button "sim/annunciator/test_all_annunciators" and when I press the button, I can see the "TEST" switch in my C172 move to test position and not release until I release the button.


Was it configured correctly for that test but not for the PTT?
Keith Smith
 
Posts: 9260
Joined: Sat Oct 09, 2010 8:38 pm
Location: Pompton Plains, NJ

Re: PTT Command for DIY Cockpit Button

Postby staffordcastle » Fri Dec 01, 2017 1:03 pm

Hi Keith,

Interesting. I did not have "press and hold" checked for test_all_annunciators and that was my test to see if pressing and holding worked. And since it did work for that test, I did not consider that to be the problem.

But what had me think of it again was I was programming my custom DIY panel (see photo) for the GPS 530 panel and I was testing the CLR button. As you know, holding down CLR resets the GPS view screen to the "Default Nav". The default nav piece did not work until I checked "press and hold" feature in the configuration. And then it occurred to me that that may be the issue with the PTT button. So I tested it and it worked. A big palm slap on the forehead.. doy! I saw that option there before but dismissed it because of "Test All Annunciators" test and also the description (see screenshot) made think it would repeatedly press and release the button which I obviously did not want it to do.

ArdSimX Contact ATC Config.jpg
ArdSimX Contact ATC Config.jpg (46.93 KiB) Viewed 1307 times


The possible difference is that assigning "Test All Annunciators" was selected from a predefined list of available commands in the ArdSimX and Contact ATC was a custom entry. Perhaps the plugin already knew the "Test All Annunciators" needed to be press and hold so it did that for me.

Custom GPS Panel.jpg
Custom GPS Panel.jpg (59.14 KiB) Viewed 1307 times
staffordcastle
 
Posts: 6
Joined: Sun Nov 12, 2017 10:18 am
Location: Rancho Cordova, CA


Return to X-Plane

Who is online

Users browsing this forum: No registered users and 4 guests