1
0
Fork 0

add per-engine throttle/mixture/prop-pitch settings: :e2m0.5

This commit is contained in:
mfranz 2008-09-28 21:51:25 +00:00
parent 40f2977030
commit 2690987d74

View file

@ -16,21 +16,6 @@
</script>
</nasal>
<key n="900">
<name>%d</name>
<desc>Execute nasal-console tab #%d</desc>
<exit/>
<binding>
<command>nasal</command>
<script>
fgcommand("nasal", props.Node.new({
module: "__nasal_console",
script: getprop("/sim/gui/dialogs/nasal-console/code[" ~ arg[0] ~ "]") or "",
}));
</script>
</binding>
</key>
<key n="58">
<name>:</name>
<desc>User command</desc>
@ -354,7 +339,8 @@
var engines = props.globals.getNode("/controls/engines").getChildren("engine");
foreach (var e; engines) {
var node = e.getNode("mixture");
node.setValue(arg[0]);
if (node != nil)
node.setValue(arg[0]);
}
</script>
</binding>
@ -373,7 +359,8 @@
var engines = props.globals.getNode("/controls/engines").getChildren("engine");
foreach (var e; engines) {
var node = e.getNode("propeller-pitch");
node.setValue(arg[0]);
if (node != nil)
node.setValue(arg[0]);
}
</script>
</binding>
@ -392,12 +379,56 @@
var engines = props.globals.getNode("/controls/engines").getChildren("engine");
foreach (var e; engines) {
var node = e.getNode("throttle");
node.setValue(arg[0]);
if (node != nil)
node.setValue(arg[0]);
}
</script>
</binding>
</key>
</key>
<key n="900">
<name>%d</name>
<desc>Engine #%d</desc>
<key n="109">
<name>m</name>
<desc>Mixture (0.0 to 1.0)</desc>
<key n="901">
<name>%f</name>
<desc>Mixture = %.3f</desc>
<binding>
<command>nasal</command>
<script>setprop("/controls/engines/engine[" ~ arg[0] ~ "]/mixture", arg[1])</script>
</binding>
</key>
</key>
<key n="112">
<name>p</name>
<desc>Propeller pitch (0.0 to 1.0)</desc>
<key n="901">
<name>%f</name>
<desc>Propeller pitch = %.3f</desc>
<binding>
<command>nasal</command>
<script>setprop("/controls/engines/engine[" ~ arg[0] ~ "]/propeller-pitch", arg[1])</script>
</binding>
</key>
</key>
<key n="116">
<name>t</name>
<desc>Throttle (0.0 to 1.0)</desc>
<key n="901">
<name>%f</name>
<desc>Throttle = %.3f</desc>
<binding>
<command>nasal</command>
<script>setprop("/controls/engines/engine[" ~ arg[0] ~ "]/throttle", arg[1])</script>
</binding>
</key>
</key>
</key>
</key>
<!-- Controls -->
@ -777,4 +808,19 @@
</binding>
</key>
</key>
<key n="900">
<name>%d</name>
<desc>Execute nasal-console tab #%d</desc>
<exit/>
<binding>
<command>nasal</command>
<script>
fgcommand("nasal", props.Node.new({
module: "__nasal_console",
script: getprop("/sim/gui/dialogs/nasal-console/code[" ~ arg[0] ~ "]") or "",
}));
</script>
</binding>
</key>
</PropertyList>