Board index FlightGear Support Hardware

fgcom transmit button on throttle control

Joysticks, pedals, monitors.

fgcom transmit button on throttle control

Postby Wayward » Sat Jul 10, 2010 11:36 pm

After participating in a TransGear event, I realized that instead of using the space bar to transmit in fgcom, which tends to be a bit inconvenient, being able to use a spare button on my throttle controller to transmit ( I use the Saitek X52 ) would be a VERY convenient feature.
Wayward
 
Posts: 62
Joined: Sat Mar 13, 2010 6:39 am
Location: Austin, TX
Callsign: WrWyCor
Version: 2
OS: Slackware 14.2

Re: fgcom transmit button on throttle control

Postby DistantRain » Sun Jul 11, 2010 12:15 am

This would equally be nice on Thrustmaster Hotus X as well.
I am a proud head CEO of Distantrain. Founder, and Co-producer of Distantrain.
Senior Commander in Chief
Please PM him with any questions regarding Distantrain.
DistantRain
 
Posts: 75
Joined: Sat Apr 17, 2010 6:53 am
Callsign: Distantrain
Version: GIT
OS: Gentoo

Re: fgcom transmit button on throttle control

Postby redneck » Sun Jul 11, 2010 2:08 am

I don't know how to help you, but I suggested a mod move this topic to Support>Hardware, where you have a MUCH better chance of getting the help you're looking for.
Call Signs: redneck, ATCredn (unspecified freq atc)
FGFSCopilot
FGFSCopilotATCEdition
System Specs
Model: Alienware M15x, OS: Windows 7 Professional 64-bit, RAM: 3 GB, CPU: Intel i3 quad core at 2.4 GHz, GPU: Nvidea GeForce GTX 460M 1.5 GB GDDR5
redneck
 
Posts: 3617
Joined: Mon Feb 02, 2009 3:17 am
Location: Pennsylvania, USA
Version: 240

Re: fgcom transmit button on throttle control

Postby Wayward » Sun Jul 11, 2010 2:12 am

This would probably require a software change to add this capability, so its probably in the right forum.
Wayward
 
Posts: 62
Joined: Sat Mar 13, 2010 6:39 am
Location: Austin, TX
Callsign: WrWyCor
Version: 2
OS: Slackware 14.2

Re: fgcom transmit button on throttle control

Postby redneck » Sun Jul 11, 2010 2:18 am

No it won't. People already use say the trigger on their joystick for PTT, instead of the spacebar. I'd tell you how if I knew how, but I don't. I can only refer you to where you'll find the info you're looking for.
Call Signs: redneck, ATCredn (unspecified freq atc)
FGFSCopilot
FGFSCopilotATCEdition
System Specs
Model: Alienware M15x, OS: Windows 7 Professional 64-bit, RAM: 3 GB, CPU: Intel i3 quad core at 2.4 GHz, GPU: Nvidea GeForce GTX 460M 1.5 GB GDDR5
redneck
 
Posts: 3617
Joined: Mon Feb 02, 2009 3:17 am
Location: Pennsylvania, USA
Version: 240

Re: fgcom transmit button on throttle control

Postby Wayward » Sun Jul 11, 2010 2:42 am

Interesting. After reading your last post, I did some perusing of the keyboard script file and found the PTT script. I will see if I can work it in to my Joystick script file. If I get it working, I will post the process here later.
Wayward
 
Posts: 62
Joined: Sat Mar 13, 2010 6:39 am
Location: Austin, TX
Callsign: WrWyCor
Version: 2
OS: Slackware 14.2

Re: fgcom transmit button on throttle control

Postby Tuxklok » Sun Jul 11, 2010 2:59 am

You just need to toggle the /instrumentation/comm[0]/ptt on/off when button is pressed/released. Nothing special required, just normal joystick config stuff...

example: When button 4 is pressed set the property to 1 to start transmitting, and to 0 when released to stop transmitting. I used a nasal command to set property, but you could just as easily use a property-set/property-toggle/etc commands as well...whatever makes you happy. ;)
Code: Select all
   <button>
        <number>
            <unix>4</unix>
            <windows>4</windows>
        </number>
        <desc>Push To Talk</desc>
        <binding>
            <command>nasal</command>
            <script>setprop("/instrumentation/comm[0]/ptt", 1);</script>
        </binding>
        <mod-up>
            <binding>
                <command>nasal</command>
                <script>setprop("/instrumentation/comm[0]/ptt", 0);</script>
            </binding>
        </mod-up>
    </button


cheers
The Austria Scenery Project - more info
fg-scenery-tools - gitorious | videos
fgcomgui - Open source, cross platform, gui front end for fgcom. more info

More random musings and doings can be found on my personal site. (work in progress)
User avatar
Tuxklok
 
Posts: 1320
Joined: Tue Apr 21, 2009 7:04 pm
Location: Orlando, FL
Callsign: Tuxklok / N1292P
OS: GNU/Linux

Re: fgcom transmit button on throttle control

Postby Wayward » Sun Jul 11, 2010 4:13 am

Hey, I got it working. These instructions will only help someone using a Saitek X52 on a Linux computer

I copied the following piece out of the X52-pro.xml file and pasted it onto the end of the X52.xml file. The "i" button (throttle) is actually 29 on the X52, so change "button n=30" to "button n=29". Works great.
Code: Select all
        <!-- "i" button -->
        <button n="30">
                <desc>PTT (for fgcom)</desc>
                <binding>
                        <command>nasal</command>
                        <script>controls.ptt(1)</script>
                </binding>
                <mod-up>
                        <binding>
                                <command>nasal</command>
                                <script>controls.ptt(0)</script>
                        </binding>
                </mod-up>
        </button>
Wayward
 
Posts: 62
Joined: Sat Mar 13, 2010 6:39 am
Location: Austin, TX
Callsign: WrWyCor
Version: 2
OS: Slackware 14.2


Return to Hardware

Who is online

Users browsing this forum: No registered users and 3 guests