1
0
Fork 0

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:
Richard Harrison 2019-03-21 18:08:05 +01:00
parent 480311eeef
commit 6bbff8476e

View file

@ -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");