1
0
Fork 0
fgdata/Aircraft/Instruments-3d/ky196/KY196.nas
sydadams bc002ff33f Minor FDM update ...elevators too touchy...
Updated electrical system ...instrument light output normalized
Added OSG hotspots to most instruments ... more to go yet
PLIB hotspots temporarily broken ..need to resize panel to avoid whiteouts...
(a waste of time ) but some still use PLIB , so needs to be fixed ... ;)
2007-04-09 19:33:41 +00:00

30 lines
967 B
Text

#### King KY-196 Comm Transciever ####
#### Syd Adams ####
####
#### Must be included in the Set file to run the KY-196 radio
####
KY196 = props.globals.getNode("/instrumentation/ky-196",1);
FDM_ON = 0;
setlistener("/sim/signals/fdm-initialized", func {
KY196.getNode("comm-num",1).setValue(0);
KY196.getNode("volume-adjust",1).setValue(0);
FDM_ON = 1;
print("KY-196 Comm System ... OK");
});
setlistener("/instrumentation/ky-196/volume-adjust", func {
if(FDM_ON == 0){return;}
var setting = cmdarg().getValue() ;
cmdarg().setValue(0);
comm_num = KY196.getNode("comm-num").getValue();
var commNode = props.globals.getNode("instrumentation/comm[" ~ comm_num ~"]");
var vol = commNode.getNode("volume").getValue() + setting;
if(vol > 1.0){vol = 1.0;}
if(vol < 0.0){vol = 0.0;commNode.getNode("serviceable").setBoolValue(0);}
if(vol > 0.0){commNode.getNode("serviceable").setBoolValue(1);}
commNode.getNode("volume").setValue(vol);
});