Comm PTT listeners; fix fault
This commit is contained in:
parent
4c6b103293
commit
480311eeef
1 changed files with 2 additions and 2 deletions
|
@ -566,7 +566,7 @@ var ptt = func(b) setprop("/controls/radios/comm-ptt", b);
|
|||
_setlistener("/instrumentation/comm[0]/ptt", func {
|
||||
var v=getprop("/instrumentation/comm[0]/ptt");
|
||||
setprop("/controls/radios/comm-radio-selected", 1);
|
||||
if (v.getValue())
|
||||
if (v)
|
||||
setprop("/controls/radios/comm-ptt", 1);
|
||||
else
|
||||
setprop("/controls/radios/comm-ptt", 0);
|
||||
|
@ -575,7 +575,7 @@ _setlistener("/instrumentation/comm[0]/ptt", func {
|
|||
_setlistener("/instrumentation/comm[1]/ptt", func {
|
||||
var v=getprop("/instrumentation/comm[1]/ptt");
|
||||
setprop("/controls/radios/comm-radio-selected", 2);
|
||||
if (v.getValue())
|
||||
if (v)
|
||||
setprop("/controls/radios/comm-ptt", 2);
|
||||
else
|
||||
setprop("/controls/radios/comm-ptt", 0);
|
||||
|
|
Loading…
Add table
Reference in a new issue