[Flightgear-devel] gear/flaps handling (b29, hurricane, ...)
The joysticks and default keyboard bindings do no longer set the gear/flap properties directly, but both use wrapper functions in controls.nas. The flaps did this since a while, but behave differently now: The bindings don't only report flaps/gear up/down, but also when the button was released. The default controls functions ignore this additional information and should exactly behave as before. But aircraft can now easily redefine the controls functions to implement aircraft specific gear/flaps handling. Redefining key/button bindings broke all input device configs, while redefining the wrapper functions lets every js/kbd function where it used to be. To make the gear only move while g/G is pressed (or the gear buttons on the js), and immediately stop movement on release, define for example this in, let's say b29.nas: gear = aircraft.door.new(/controls/gear, 10); # 10 seconds for full move? controls.gearDown = func { if (arg[0] 0) { gear.close(); } elsif (arg[0] 0) { gear.open(); } else { gear.stop(); } } Of course, the use of the aircraft.door class isn't mandatory. But it's quite convenient. The moving door property is in /controls/gear/position-norm. m. ___ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
Re: [Flightgear-devel] gear/flaps handling (b29, hurricane, ...)
Melchior FRANZ wrote: To make the gear only move while g/G is pressed (or the gear buttons on the js), and immediately stop movement on release, define for example this in, let's say b29.nas: Sweet. Josh ___ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
Re: [Flightgear-devel] gear/flaps handling (b29, hurricane, ...)
Melchior FRANZ wrote: The joysticks and default keyboard bindings do no longer set the gear/flap properties directly, but both use wrapper functions in controls.nas. The flaps did this since a while, [...] Do I feel correctly that this is true also for the throttle ? This might explain why I get NASAL errors while trying to accelerate the aircraft (on IRIX) for some weeks. Do I have to fear that I'll get the same errors for the gear as well ? Cheers, Martin. -- Unix _IS_ user friendly - it's just selective about who its friends are ! -- ___ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
Re: [Flightgear-devel] gear/flaps handling (b29, hurricane, ...)
Le mercredi 22 juin 2005 à 16:03 +0200, Melchior FRANZ a écrit : The joysticks and default keyboard bindings do no longer set the gear/flap properties directly, but both use wrapper functions in controls.nas. The flaps did this since a while, but behave differently now: The bindings don't only report flaps/gear up/down, but also when the button was released. The default controls functions ignore this additional information and should exactly behave as before. But aircraft can now easily redefine the controls functions to implement aircraft specific gear/flaps handling. Redefining key/button bindings broke all input device configs, while redefining the wrapper functions lets every js/kbd function where it used to be. To make the gear only move while g/G is pressed (or the gear buttons on the js), and immediately stop movement on release, define for example this in, let's say b29.nas: gear = aircraft.door.new(/controls/gear, 10); # 10 seconds for full move? controls.gearDown = func { if (arg[0] 0) { gear.close(); } elsif (arg[0] 0) { gear.open(); } else { gear.stop(); } } Of course, the use of the aircraft.door class isn't mandatory. But it's quite convenient. The moving door property is in /controls/gear/position-norm. m. If i need to keep the old process, what must be done on my side ? Thanks -- Gerard ___ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
Re: [Flightgear-devel] gear/flaps handling (b29, hurricane, ...)
Le mercredi 22 juin 2005 à 16:44 +0200, Gerard Robin a écrit : Le mercredi 22 juin 2005 à 16:03 +0200, Melchior FRANZ a écrit : The joysticks and default keyboard bindings do no longer set the gear/flap properties directly, but both use wrapper functions in controls.nas. The flaps did this since a while, but behave differently now: The bindings don't only report flaps/gear up/down, but also when the button was released. The default controls functions ignore this additional information and should exactly behave as before. But aircraft can now easily redefine the controls functions to implement aircraft specific gear/flaps handling. Redefining key/button bindings broke all input device configs, while redefining the wrapper functions lets every js/kbd function where it used to be. To make the gear only move while g/G is pressed (or the gear buttons on the js), and immediately stop movement on release, define for example this in, let's say b29.nas: gear = aircraft.door.new(/controls/gear, 10); # 10 seconds for full move? controls.gearDown = func { if (arg[0] 0) { gear.close(); } elsif (arg[0] 0) { gear.open(); } else { gear.stop(); } } Of course, the use of the aircraft.door class isn't mandatory. But it's quite convenient. The moving door property is in /controls/gear/position-norm. m. If i need to keep the old process, what must be done on my side ? Thanks In addition to my previous question which is waiting for an answer. Is it any consequence when using interpolation ? which is very precise and very useful for every complicated animations (ie synchronisation of door-gear and gear itself) thank -- Gerard ___ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d