[Flightgear-devel] Re: gear/flaps handling (b29, hurricane, ...)

2005-06-22 Thread Melchior FRANZ
* Giles Robertson -- Wednesday 22 June 2005 21:58:
> If this were extended to all controls, then it could be used as an
> abstraction for key bindings,

Except that only a part of the bindings is Nasal-based.



> which would allow us to deal with the kb 
> localisation issues that were mentioned earlier this month.

I'm not sure if doing this at runtime is a good idea. That's very static
information and should probably be done at init time. The easiest would
be to have keyboard files in $FG_ROOT/Translations/, analogous to the
string files:  keyboard-nl.xml, keyboard-de.xml, etc. These would simply
be loaded after the global keyboard.xml file and have the chance to
overwrite some bindings. Disadvantage: these would then not only contain
key numbers/translations but also commands/bindings. Annoying to maintain.

Better in *this* respect would be files with a few swap instructions:
keyboard-fr.xml:  -> swap US/65 bindings with US/81 bindings. Also
ugly, and more complex for non-letter keys, where the normal and the
shifted character are often not on the same keys (compared with default/US).
Advantage: write once, never ever edit again.  :-)

BTW: with both (and other) solutions one could easily write a script
that extracts all existing bindings from a running fgfs, and makes a key
overview table. Could even be done as nasal module that writes TeX code
(as soon as Nasal can write files, that is).

m.

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: gear/flaps handling (b29, hurricane, ...)

2005-06-22 Thread Gerard Robin
Le mercredi 22 juin 2005 à 21:21 +0200, Melchior FRANZ a écrit :
> * Gerard Robin -- Wednesday 22 June 2005 20:54:
> > Le mercredi 22 juin 2005 à 19:54 +0200, Melchior FRANZ a écrit :
> > > Oh, you mean the XML interpolation. That is even less concerned ...
>  
> > Thank, that is i hoped to ear .
> 
> I don't even know why I answered such a nonsense question. How realistic
> is it that I check in a change to the controls handling that breaks the
> XML animation/interpolation code? And why didn't you just try it out?
> Next time I'll first demand that you explain why you think this could
> be the case. Bah ... 
> 
> m.
> 
Melchior

My grand-father told me: 
it is never nonsense questions, any questions are good :=)  
i thank you for the answer.

That probably means that every questions without any returned answer are
nonsense questions.

My question was only due to a misunderstanding about the level that
modification applied on.

I am not able to test the last of the last CVS, every time, because
you know, i need, before, to add personal patchs (in spite of having
several versions in //).

Last remark, it is better to be sure, before a modification will be
applied, rather than discovering after, to late.

Have i been able to answer to your sense question about my nonsense
questions ? that is the question.  :=)

> 
-- 
Gerard


___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


RE: [Flightgear-devel] Re: gear/flaps handling (b29, hurricane, ...)

2005-06-22 Thread Giles Robertson
> BEFORE:
> 
>kbd binding--\
> |> property
>js binding---/
> 
> 
> NOW (and since a while for flaps and many others):
> 
>kbd binding\
>controls.gearDown()---> property
>js binding-/

If this were extended to all controls, then it could be used as an
abstraction for key bindings, which would allow us to deal with the kb
localisation issues that were mentioned earlier this month.

It might, then, be a good idea to have a couple of planespecific()
functions, that each plane could use for weird things that other plane's
don't have (Spitfire starter cartridges, for instance), but keep a sane
kb layout between aircraft.

Giles Robertson

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


RE: [Flightgear-devel] Re: gear/flaps handling (b29, hurricane, ...)

2005-06-22 Thread Vivian Meazza
Melchior

> 
> And this is by no means innovative. Andy had done this for several
> control functions already. Just a few were/are missing. What is "new"
> is the fact that the default bindings for gear and flaps do now also
> report key/button release. This is required for gear/flaps without
> defined 'notches', that can stop anywhere during movement. An overriding
> function *can*, but doesn't *have* to use this information. The default
> wrapper doesn't. The b29's maybe will. (The Hurrican doesn't either. :-)
> 


The Hurricane will, once I get my head around it. Right now it's spinning
from so many cvs updates :-). And the Electric system seems to be bent if
not broken. Something else to fix.

Vivian



___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


[Flightgear-devel] Re: gear/flaps handling (b29, hurricane, ...)

2005-06-22 Thread Melchior FRANZ
* Gerard Robin -- Wednesday 22 June 2005 20:54:
> Le mercredi 22 juin 2005 à 19:54 +0200, Melchior FRANZ a écrit :
> > Oh, you mean the XML interpolation. That is even less concerned ...
 
> Thank, that is i hoped to ear .

I don't even know why I answered such a nonsense question. How realistic
is it that I check in a change to the controls handling that breaks the
XML animation/interpolation code? And why didn't you just try it out?
Next time I'll first demand that you explain why you think this could
be the case. Bah ... 

m.

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: gear/flaps handling (b29, hurricane, ...)

2005-06-22 Thread Gerard Robin
Le mercredi 22 juin 2005 à 19:54 +0200, Melchior FRANZ a écrit :
> * Melchior FRANZ -- Wednesday 22 June 2005 19:44:
> > * Gerard Robin -- Wednesday 22 June 2005 18:46:
> > > Is it any consequence when using   ?
> > 
> > No. 
> 
> Oh, you mean the XML interpolation. That is even less concerned ...
> 
> m.
> 
Thank, that is i hoped to ear .

> 
-- 
Gerard


___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


[Flightgear-devel] Re: gear/flaps handling (b29, hurricane, ...)

2005-06-22 Thread Melchior FRANZ
* Melchior FRANZ -- Wednesday 22 June 2005 19:44:
> * Gerard Robin -- Wednesday 22 June 2005 18:46:
> > Is it any consequence when using   ?
> 
> No. 

Oh, you mean the XML interpolation. That is even less concerned ...

m.

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


[Flightgear-devel] Re: gear/flaps handling (b29, hurricane, ...)

2005-06-22 Thread Melchior FRANZ
* Gerard Robin -- Wednesday 22 June 2005 18:46:
> Le mercredi 22 juin 2005 à 16:44 +0200, Gerard Robin a écrit :
> >   If i need to keep the old process, what must be done on my side ?

>  In addition to my previous question which is waiting for an answer.

I thought I had answered that by underlining this part: "exactly behave
as before". I'll try again: the behavior is exactly the same as before!
There's nothing that you have to change to get exactly the same as before.
But now you *can* redefine the wrapper. Why is this useful?

BEFORE:

   kbd binding--\
|> property
   js binding---/


NOW (and since a while for flaps and many others):

   kbd binding\
   controls.gearDown()---> property
   js binding-/


If you wanted something else than default behavior, you had to redefine
the keyboard bindings. That's done by many aircraft, and in many cases
the right thing to do. But it's bad for control functions that people
typically have on their joysticks, and not on standardized buttons, but
wherever the driver author felt like. There simply was no way to
redefine js functions in a sane way. NOW, an aircraft with special needs
just overrides the wrapper function in controls, and keyboard *AND*
js button functions remain intact.

And this is by no means innovative. Andy had done this for several
control functions already. Just a few were/are missing. What is "new"
is the fact that the default bindings for gear and flaps do now also
report key/button release. This is required for gear/flaps without
defined 'notches', that can stop anywhere during movement. An overriding
function *can*, but doesn't *have* to use this information. The default
wrapper doesn't. The b29's maybe will. (The Hurrican doesn't either. :-)



> Is it any consequence when using   ?

No. The behavior is *exactly* the same as before. The aircraft.door()
class does all the necessary stuff using interpolate() already. But you
are free to re-invent that wheel.

m.

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: gear/flaps handling (b29, hurricane, ...)

2005-06-22 Thread Gerard Robin
Le mercredi 22 juin 2005 à 18:44 +0200, Melchior FRANZ a écrit :
> * Gerard Robin -- Wednesday 22 June 2005 16:44:
> > Le mercredi 22 juin 2005 à 16:03 +0200, Melchior FRANZ a écrit :
> > > The default "controls" functions ignore this additional information and 
> > > should
> > > exactly behave as before.
> 
> 
> > If i need to keep the old process, what must be done on my side ?
> 
> Sacrificing a chicken at full-moon midnight is all you need to do.
> 
> m.
> 
I will look at the moon, may be to night...:=)
-- 
Gerard


___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


[Flightgear-devel] Re: gear/flaps handling (b29, hurricane, ...)

2005-06-22 Thread Melchior FRANZ
* Gerard Robin -- Wednesday 22 June 2005 16:44:
> Le mercredi 22 juin 2005 à 16:03 +0200, Melchior FRANZ a écrit :
> > The default "controls" functions ignore this additional information and 
> > should
> > exactly behave as before.


> If i need to keep the old process, what must be done on my side ?

Sacrificing a chicken at full-moon midnight is all you need to do.

m.

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


[Flightgear-devel] Re: gear/flaps handling (b29, hurricane, ...)

2005-06-22 Thread Melchior FRANZ
* Martin Spott -- Wednesday 22 June 2005 16:32:
> 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 ?

Yes, most joyticks throttle bindings do since *quite* a while call wrapper
controls.throttleAxis(), which the keyboard bindings use controls.incThrottle().



> This might explain why I get NASAL errors while trying to accelerate the
> aircraft (on IRIX) for some weeks.

yes



> Do I have to fear that I'll get the same errors for the gear as well ?

yes. And flaps.

m.

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d