FGComm PTT - use selected channel
Only the selected channel will now be used for PTT; however the bindings still selected the appropriate channel prior to setting PTT. This provides a compatible solution that can also easily be bound to the (joystick) controls.
This commit is contained in:
parent
480311eeef
commit
6bbff8476e
1 changed files with 5 additions and 1 deletions
|
@ -561,7 +561,11 @@ var weaponSelect = func(d) {
|
|||
##
|
||||
# Communication.
|
||||
#
|
||||
var ptt = func(b) setprop("/controls/radios/comm-ptt", b);
|
||||
var ptt = func(b){
|
||||
if (b and b != getprop("/controls/radios/comm-radio-selected"))
|
||||
setprop("/controls/radios/comm-radio-selected", b);
|
||||
setprop("/controls/radios/comm-ptt", b);
|
||||
}
|
||||
|
||||
_setlistener("/instrumentation/comm[0]/ptt", func {
|
||||
var v=getprop("/instrumentation/comm[0]/ptt");
|
||||
|
|
Loading…
Add table
Reference in a new issue