turn <power> off for cyclic control on helicopters, that is: when a
property /rotors is available at joystick driver laod time. Note that the FDM creates /rotors *afterwards*, so it needs to be defined in the *-set.xml file already (which is the case for all helicopters in CVS). A simple, self-ending <rotors/> tag should do.
This commit is contained in:
parent
9c52cbf4ac
commit
f5544f0cb9
1 changed files with 7 additions and 1 deletions
|
@ -112,13 +112,19 @@ ________________________________________________________________________________
|
||||||
|
|
||||||
<nasal>
|
<nasal>
|
||||||
<script><![CDATA[
|
<script><![CDATA[
|
||||||
data = cmdarg().getParent().getNode("data");
|
self = cmdarg().getParent();
|
||||||
|
data = self.getNode("data");
|
||||||
mode = data.getNode("mode");
|
mode = data.getNode("mode");
|
||||||
modifier = data.getNode("modifier");
|
modifier = data.getNode("modifier");
|
||||||
f1 = f2 = 0;
|
f1 = f2 = 0;
|
||||||
left_brake = right_brake = 0;
|
left_brake = right_brake = 0;
|
||||||
trigger = 0;
|
trigger = 0;
|
||||||
|
|
||||||
|
if (props.globals.getNode("/rotors", 0) != nil) {
|
||||||
|
self.getNode("axis[0]/binding/power").setDoubleValue(1);
|
||||||
|
self.getNode("axis[1]/binding/power").setDoubleValue(1);
|
||||||
|
}
|
||||||
|
|
||||||
kbdshift = props.globals.getNode("/devices/status/keyboard/shift", 1);
|
kbdshift = props.globals.getNode("/devices/status/keyboard/shift", 1);
|
||||||
kbdctrl = props.globals.getNode("/devices/status/keyboard/ctrl", 1);
|
kbdctrl = props.globals.getNode("/devices/status/keyboard/ctrl", 1);
|
||||||
kbdalt = props.globals.getNode("/devices/status/keyboard/alt", 1);
|
kbdalt = props.globals.getNode("/devices/status/keyboard/alt", 1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue