1
0
Fork 0
Commit graph

11 commits

Author SHA1 Message Date
mfranz
221c23e18b - don't create tanks in empty tank nodes (that nasty native_fdm.cxx causes)
- use Nasal features that were introduced after this code was first written:
  * var for local variables (and to make clear when a variable is first used)
  * += operator
  * listeners to import seldom changing variables and to avoid waiting for
    the FDM in a loop

This new code started as empty file where I added my stuff and then copied
parts from the old code, piece by piece. This is why the coding & indentation
style has changed. Functionally the code should basically be equivalent.
2007-01-31 15:53:01 +00:00
mfranz
51712052e1 this file is broken by design. Fixing the Nasal error apparently
overstrains it, so here's the error back. Have fun!  :-|
2007-01-13 22:37:38 +00:00
mfranz
4690b3c2c3 totally pointless mini-optimization 2007-01-13 21:46:07 +00:00
mfranz
f58fcdd492 make sure the property doesn't only exist, but is actually initialized 2007-01-13 18:35:22 +00:00
andy
591c72f5b4 Comments about -lbs and -gal_us were mixed up. Pounds are the
writable property.  Gallons are a read-only convenience.
2006-08-17 16:32:41 +00:00
andy
168e592e03 Probably best to make sure the property is there (even though
"selected" certainly should be)
2004-08-12 18:49:13 +00:00
andy
f2edac1849 Oops, same bug on the next line too. 2004-08-12 18:48:44 +00:00
andy
a20598d0fd Melchior helped to debug this via chat. Turns out to have been a
typo; the SimGear "pass subproperty as first argument" shortcut
doesn't work in Nasal.  This checkin is blind, but should have a high
probability of correctness.
2004-08-12 18:38:02 +00:00
andy
aa2686c0b9 Support a "kill-when-empty" flag on tanks to enable the strict
"engines die when any tank is empty" behavior.  Otherwise, just
deselect the empty tank.  This matches the "both" behavior many
lightplane fuel selectors have.
2004-04-30 14:42:42 +00:00
andy
449c7bf7ef Oops. A last minute change broke piston engines. The "phantom" fuel
tanks created by the C++ code look empty, and were causing the fuel
code to detect out of fuel conditions.  Since there is no way to tell
a "FDM" tank from a "C++" tank, I just filter them by capacity.  Very
ugly hack, we need to fix the code to report only the tanks created
by the aircraft/FDM configuration.
2004-03-27 18:26:55 +00:00
andy
e2cf6d90d2 New fuel management code. Only works with YASim currently. It's a benign
no-op under other FDMs.
2004-03-27 04:07:56 +00:00