Skip to content

Commit

Permalink
FGFS-Addon: Added new keybinds
Browse files Browse the repository at this point in the history
COM3 (alt+shift) and Intercom (ctrl+shift)
  • Loading branch information
hbeni committed Aug 2, 2023
1 parent acd3abb commit 380bbdb
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ For details on how this can be done, look at RadioGUI's readme.
Just add and activate the [FGFS-addon](client/fgfs-addon/Readme.md) in your launcher (you can use FGCom-Mumble and the old FGCom in parallel).

The FGFS protocol file will handle old 25kHz as well as newer 8.3kHz radios.
After starting flightgear, you can use your radio stack like with FGCom (default is *space* to talk on COM1 and *shift+space* for COM2). Additional radios can be accessed by adding custom keybinds, or by using the _Combar_.
After starting flightgear, you can use your radio stack like with FGCom (default is *space* to talk on COM1, *shift+space* for COM2, *alt+space* for COM3 and *ctrl+space* for intercom). Additional radios can be accessed by adding custom keybinds, or by using the _Combar_.
The addon can be configured via a new entry in the *Multiplayer* menu.

Your ADF will recognize transmissions in the kHz range. With enabled _ADF_-mode the indicated bearing is recognized and visible on the instrument. The plane's audio system may also playback the received analog audio signal. This is usually switched at your plane's audio panel.
Expand Down
5 changes: 3 additions & 2 deletions client/fgfs-addon/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ When added to your launcher, the addon is automatically activated.
No further steps are needed.

The FGFS protocol file will handle old 25kHz as well as newer 8.3kHz radios.
After starting flightgear, you can use your radio stack like with FGCom (default is *space* to talk on COM1 and *shift+space* for COM2).
After starting flightgear, you can use your radio stack like with FGCom (default is *space* to talk on COM1 and *shift+space* for COM2).
*alt+space* will transmit on COM3, and *ctrl+space* on the intercom.

If your plane has more than two COM radios, you can use the _Combar_ dialog from the configuration dialog to access the PTTs of the radios, or define custom keybinds to set `/instrumentation/com[n]/ptt`.
If your plane has more than two COM radios, you can use the _Combar_ dialog from the configuration dialog to access the PTTs of the radios, or define custom keybinds to set `/instrumentation/comm[n]/ptt`.


Configuration
Expand Down
65 changes: 65 additions & 0 deletions client/fgfs-addon/addon-config.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<PropertyList>
<!-- init by addon-main.nas -->


<!-- Additoinal keybinds -->
<!-- SPACE+ALT: Transmit on COM3 -->
<!-- SPACE+CTRL: Transmit on Intercom -->
<input>
<keyboard>
<key n="32">
<mod-alt>
<binding>
<command>nasal</command>
<script>
<![CDATA[
var com_p = "/instrumentation/comm[2]";
if (getprop(com_p~"/fgcom-mumble/is-used")) {
setprop(com_p~"/ptt", 1);
}
]]>
</script>
</binding>

<mod-up>
<binding>
<command>nasal</command>
<script>
<![CDATA[
var com_p = "/instrumentation/comm[2]";
if (getprop(com_p~"/is-used") and getprop(com_p~"/ptt")) {
setprop(com_p~"/ptt", 0);
}
]]>
</script>
</binding>
</mod-up>
</mod-alt>
<mod-ctrl>
<binding>
<command>nasal</command>
<script>
<![CDATA[
var com_p = "/addons/by-id/org.hallinger.flightgear.FGCom-mumble/intercom/IC[0]";
if (getprop(com_p~"/is-used")) {
setprop(com_p~"/ptt", 1);
}
]]>
</script>
</binding>

<mod-up>
<binding>
<command>nasal</command>
<script>
<![CDATA[
var com_p = "/addons/by-id/org.hallinger.flightgear.FGCom-mumble/intercom/IC[0]";
if (getprop(com_p~"/is-used") and getprop(com_p~"/ptt")) {
setprop(com_p~"/ptt", 0);
}
]]>
</script>
</binding>
</mod-up>
</mod-ctrl>
</key>
</keyboard>
</input>
</PropertyList>

0 comments on commit 380bbdb

Please sign in to comment.