Since this freed up an axis control on my stick (IE. the throttle wheel) I now want to make this the control for elevator trim. I used the following code:
<axis n="2"> <desc>Elevator-trim</desc> <binding> <command>nasal</command> <script>controls.elevatorTrimAxis()</script> </binding> </axis> But I can't get this to work. What am I doing wrong? A "grep elevatorTrimAxis */*" in the Input/Joysticks directory turned up nothing so none of the existing configuration files have an example of how this would be done. After trying a bunch of things the only thing I found that works is: <axis n="2"> <desc>elevator-trim</desc> <binding> <command>property-scale</command> <property>/controls/flight/elevator-trim</property> <dead-band type="double">0.02</dead-band> <offset type="double">0.0</offset> <factor type="double">-0.9</factor> </binding> </axis> Since writing directly to the property worked it appears that the elevatorTrimAxis() script is broken. Looking at the code in controls.nas it appears that all this is doing is getting the currect value of the control: aileronTrimAxis = func { aileronTrim(cmdarg().getNode("value").getValue()); } It does not do anything to update that value. Looking through some of the joystick config files all of them were binding the trim controls to buttons. At this point I have a work around. Perhaps someone who knows more about this stuff than I do can fix the elevatorTrimAxis(), aileronTrimAxis() and rudderTrimAxis() functions in controls.nas. Also I am trying to find a engine/prop related use for the buttons that are actuated by the control levers. I want to use them to put the props in beta and feather. IE. when I close the throttle and active it's button I want the props to feather and when I do the same with the prop pitch control I want to activate beta mode (IE. reverse thrust). I tried the following and it does change the values of the properties but it does not seem to have any affect on any of the models I tried it with. I tried the B1900D and B99 and in both cases when reservse is true inceasing the throttle setting still make the plane move forward: <button n="7"> <desc>Propeller-Reverser</desc> <repeatable>false</repeatable> <binding> <command>property-assign</command> <property>/controls/engines/engine[0]/reverser</property> <value type="bool">true</value> </binding> <mod-up> <binding> <command>property-assign</command> <property>/controls/engines/engine[0]/reverser</property> <value type="bool">false</value> </binding> </mod-up> </button> <button n="6"> <desc>Propeller-Feather</desc> <repeatable>false</repeatable> <binding> <command>property-assign</command> <property>/controls/engines/engine[0]/feather</property> <value type="bool">true</value> </binding> <mod-up> <binding> <command>property-assign</command> <property>/controls/engines/engine[0]/feather</property> <value type="bool">false</value> </binding> </mod-up> </button> Perhaps this is an issue with the models I tried? If so which models might I try that have a working reverse thrust? Or perhaps there is something else like I am using the wrong proprieties? Or is there a nansal script I should be using? If so where are these listed so I can look that info up? I did look at controls.nas but it appears that only the more common of controls are defined there. Any ideas? Hal ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Flightgear-users mailing list Flightgear-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-users