aok1 wrote:Hi,
I want to have these buttons available for other controls when I fly a jet, since they are useless then. I am looking for what to check in the property tree -other than the plane itself- to find out if prop or jet. Any suggestions?
Thanks.
viewtopic.php?f=2&t=3117&p=27406Or did you already look at that thread ? Hmmm, you probably did.
You know, maybe we should all add a simple property to (our) all aircraft that states its propulsion type : it can be added to the <sim> part of the set file, and then checked for
That would serve the purpose of choosing the coarse joystick config
Then, if you want a specific config for a specific plane or group of planes (ex. all DCulp's planes), you can then have configs which hinge on the aircraft model, just like radar2 instrument (actually, in radardist.nas) does for radar range and RCS (radar cross section, not reaction control system
)
Also, iirc, one can re-bind your joystick partly, or entirely, inside the a/c setfile (eg. having your custom version of the setfile, with adds bindings for your joystick), just like we do for keyboard bindings inside an a/c set file, if it's your private version of the set file, a simple copy of the original with your specific bindings in it.
Joystick bindings are discouraged in a/c set files because of the vastly different layout of joysticks (or same joystick on different OSes), but nothing is stopping you from doing it in your installed version of the a/c.
Just be careful when you update it not to annihilate your changes, and if you're the a/c author, not to distribute that version of the set file so you don't get a ton of help requests because well, the joystick now does weird things on someone's else setup
You can also go look in other parts of the property tree, like engines, but not sure how reliable testing for /engines/engine[n]/EGT == nil would be in telling you this is NOT a prop plane.
Albeit, I've noticed while working on the NF-104, that a jet engine and rocket engine don't have the same property layout inside /engines/*, in that the latter has a much smaller set of properties.
That sort of thing.
IMHO, for broad joystick configs, starting to use a type tag would be the simplest, and needs no mods to the sourcecode, or make assumptions about properties that might change in the future, etc.
<type> could be simple as prop, jet, rotor and rocket, or take into account number of engines, specific subtypes (turbo or not, jet or fan, one or more engines, etc.)
For aircraft specific, well, you're going to look for a specific a/c most likely
Cheers,
Nic