cmdarg() in listener functions is no longer supported; use regular func args
This commit is contained in:
parent
832c035499
commit
09a682a610
2 changed files with 5 additions and 5 deletions
|
@ -14,10 +14,10 @@ setlistener("/sim/signals/fdm-initialized", func {
|
|||
print("KY-196 Comm System ... OK");
|
||||
});
|
||||
|
||||
setlistener("/instrumentation/ky-196/volume-adjust", func {
|
||||
setlistener("/instrumentation/ky-196/volume-adjust", func(n) {
|
||||
if(FDM_ON == 0){return;}
|
||||
var setting = cmdarg().getValue();
|
||||
cmdarg().setDoubleValue(0);
|
||||
var setting = n.getValue();
|
||||
n.setDoubleValue(0);
|
||||
comm_num = KY196.getNode("comm-num").getValue();
|
||||
var commNode = props.globals.getNode("instrumentation/comm[" ~ comm_num ~"]");
|
||||
var vol = commNode.getNode("volume").getValue() + setting;
|
||||
|
|
|
@ -6,9 +6,9 @@ sbc2 = aircraft.light.new( "/sim/model/lights/sbc2", [0.2, 0.3], "/sim/model/lig
|
|||
sbc2.interval = 0;
|
||||
sbc2.switch( 1 );
|
||||
|
||||
setlistener( "/sim/model/lights/sbc2/state", func {
|
||||
setlistener( "/sim/model/lights/sbc2/state", func(n) {
|
||||
bsbc1 = sbc1.stateN.getValue();
|
||||
bsbc2 = cmdarg().getBoolValue();
|
||||
bsbc2 = n.getBoolValue();
|
||||
b = 0;
|
||||
if( bsbc1 and bsbc2 and getprop( "/controls/lighting/beacon") ) {
|
||||
b = 1;
|
||||
|
|
Loading…
Reference in a new issue