1
0
Fork 0
Commit graph

2311 commits

Author SHA1 Message Date
martin
c7aace9926 Sava? Yatmaz:
Logitech Dual-action gamepad driver.
2007-02-08 06:56:19 +00:00
mfranz
12f5714b37 add support for x/y/z axes. The built-in function is (still) a NOOP, but
aircraft can plug a custom function. This function can access all internal
variables of the ViewManager class. It can set me.{x,y,z}_offset, and also
add offsets to me.{heading,pitch,roll}_offset. Example:

dynamic_view.register_headshake(func {
        me.x_offset = rand() * 0.02;  # Parkinson effect
});

The advantage of this implementation is that it doesn't break MMB drag
functionality, and that is can be frozen by mouse movements.
2007-02-07 22:13:51 +00:00
mfranz
b07ebf0dfa work around Nasal bug (and/or operators) 2007-02-07 17:31:41 +00:00
mfranz
caf96d76c8 minor documentation fix 2007-02-07 17:06:52 +00:00
mfranz
3bec4f4cfc - add debug.local([<frame>]) to output local variables of frame #0
or of given frame
- add debug.string(<variable>). This returns the variable dump as
  string.
- add var to module function variables to avoid collisions with module names
2007-02-07 17:06:05 +00:00
mfranz
a1556fa69a make lookat work correctly for when the user changed view direction;
Remember: dynamic_view.lookat(heading, pitch, roll) moves view
smoothly to this direction, while dynamic_view.lookat() moves it back.
This can be used for quick view changes to the panel etc. It's currently
only used in the bo105 (flaps-up binding).
2007-02-07 16:58:46 +00:00
mfranz
96cc08519b keymap update: only the f4u is left as overriding the n/N keys. Yay! 2007-02-07 00:28:48 +00:00
mfranz
e034e66c57 interpolate between frozen or lookat direction and current view direction 2007-02-06 16:25:44 +00:00
mfranz
df1bd972f8 - fix reinit/reset (has this caused the spinning view on reset for some?)
- add var to module functions to avoid conflicts with module names
2007-02-06 14:33:59 +00:00
mfranz
c9db8c22a3 don't waste time when we aren't in dyn-view mode at all 2007-02-05 22:59:51 +00:00
mfranz
286629c3e1 oh, and freeze while a button is pressed in arrow mode ... 2007-02-05 20:57:19 +00:00
mfranz
ea2d56aa33 don't generally freeze dynamic_view in arrow mouse mode, but only a short
time after mouse movements or clicks. After that period a rather ugly jump
happens. TODO: make this smoother
2007-02-05 20:36:29 +00:00
mfranz
90100e2514 disable dynamic view in mouse arrow mode. Operating all the tiny switches
on 3d panels while hopping over bumpy terrain has become difficult -- much
harder than in real life. I'm open for better solutions. Just complain. :-)
2007-02-05 16:14:51 +00:00
mfranz
0f07c14bd3 getBoolValue() on an undefined node shall return "false", not "true".
This isn't only more logical, it's also how SGPropertyNode::getBoolValue()
acts. The fix has potential to break code, but so far I haven't seen any
problems. I added a debug message to my copy and will for a while check
all cases that I run into. To check yourself, just add one line:

    getBoolValue : func {
        val = me.getValue();
+       if(val == nil) { debug.dump(me) }
        if(me.getType() == "STRING" and val == "false") { 0 }
        else { val != nil and val != 0 }
    }

This will output a debug message to the terminal for each case where
formerly "true" was returned, and now "false" is.
2007-02-05 11:40:49 +00:00
mfranz
3a3ee3a5d0 - work around broken props.Node.getBoolValue()
- simplification & cleanup
2007-02-04 22:09:43 +00:00
mfranz
43435d1077 - reset engines' consumed fuel
- change variable name
2007-02-04 20:20:45 +00:00
martin
e550dee7dc Ron Jensen:
Add panel lighting effects to transponder.
2007-02-04 13:30:10 +00:00
mfranz
10efd065c4 Dave Perry & Roy Vegard Ovesen:
"This patch allows all the AC using the kap140 to use one kap140.nas
which includes Roy's move to "bool" values as well as the check for
power used by the pa24-250." (dp)
2007-02-04 12:55:28 +00:00
mfranz
cb25691c03 call setWeightOpts on reset, too 2007-01-31 21:37:14 +00:00
mfranz
003ba28784 make sure that setWeightOpts isn't called before fuel.nas' init fdm listener.
This is a bit hackish and needs to be reconsidered.
2007-01-31 21:13:16 +00:00
mfranz
9117ddf71d --aircraft=c172p-panel-only set file (some instruments like fuel, egt,
pressure don't work yet)
2007-01-31 17:58:48 +00:00
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
80b188706f cosmetics and stuff 2007-01-30 23:22:36 +00:00
mfranz
dee6a551cf and set it to 'false' :-) 2007-01-30 21:14:53 +00:00
mfranz
6a2cd53ee4 save <specular-highlight>, too ... 2007-01-30 21:12:53 +00:00
mfranz
e9d645170f comment out fuel of generic panel. This is included by preferences.xml and
includes Instruments/fuel.xml. And *that* one creates tank[0] and tank[1]
for *all* aircraft, which is quite annoying. A generic panel should display
fuel numerically (like Lee's panels do) or as %.
2007-01-30 20:41:49 +00:00
mfranz
7ecdeec89e better backtrace section titles with added frame number 2007-01-29 23:48:41 +00:00
mfranz
0be35251ba add note about new dependency $FG_ROOT/Aircraft/Generic/annunciator.nas 2007-01-29 22:45:41 +00:00
mfranz
410950b7b2 Nasal version of former src/Instrumentation/annunciator.[ch]xx 2007-01-29 22:24:05 +00:00
mfranz
6f073760af whoops 2007-01-29 19:57:54 +00:00
mfranz
feaf223d88 cleanup 2007-01-29 16:24:58 +00:00
martin
1d2f5a5292 Ron Jensen:
I modelled a KT-70 transponder.
2007-01-28 18:14:15 +00:00
martin
d57c3fd6c4 The leaner, the merrier .... 2007-01-28 14:25:55 +00:00
mfranz
7d0fe51b9f first stab at nasal debugging helper module (nicks parts for files from
the Nasal repository :-)
2007-01-28 12:20:18 +00:00
mfranz
4a08d75574 Maik JUSTUS: improve some friction values (ice, snow, dirt-runway, grass, ...)
mf: fix sign glyph name, adjust some sign properties
2007-01-28 11:43:50 +00:00
martin
a10b396ffc Control the helicopter by RC control unit with MFTech RC USB-Interface 2007-01-27 22:07:31 +00:00
mfranz
04de5c67c8 - add all entries in /sim/aircraft-data/path[*] to the save-list, so that one
can also write

      <sim>
          <aircraft-data>
              <path>/sim/author</path>
              <path>/sim/description</path>
              <path>/sim/rtatus</path>
          </aircraft-data>
      </sim>

  in a *-set.xml file instead of using Nasal (aircraft.data.add("/sim/author", ...)
- s/timeN/node/ to match the pattern described in the head comment
- make listener on-shot
2007-01-26 23:33:25 +00:00
mfranz
1ad49352e6 spellchecking 2007-01-24 16:25:05 +00:00
martin
be7f4246c3 Interim release of The Manual. 2007-01-24 07:48:12 +00:00
mfranz
e3d90ee46c - don't prepend underscore to aircraft names (this was a leftover from
versions that wrote that name to the property tree)
- move HUD part to the bottom. It isn't really part of the library
- cleanup
2007-01-23 17:29:41 +00:00
mfranz
b47d2e2204 respect /sim/startup/save-on-exit 2007-01-22 19:05:35 +00:00
mfranz
7cae1e86a2 add type for "save-on-exit" 2007-01-22 18:55:41 +00:00
mfranz
97771b69ae - save aircraft data before the aircraft's Nasal files are executed
- make 0 a valid saving interval, and 'nil' or no arg stop the loop
  (this is for consistency with settimer() or aircraft.timer() intervals
- smaller fixes, cleanup
2007-01-22 16:49:28 +00:00
mfranz
f376ea5adb use /sim/signals/nasal-dir-initialized signal to simplify things 2007-01-22 00:03:07 +00:00
mfranz
bf7731c0af use /sim/signals/nasal-dir-initialized signal for library initialization;
this makes it possible to use screen.log.write() everywhere in aircraft
nasal files, not only after settimer(func{}, 0) were triggered
2007-01-21 20:56:25 +00:00
mfranz
977910c258 we can't use the setlistener() wrapper here, but need the real thing 2007-01-21 20:44:55 +00:00
mfranz
f61969ed01 add timer class that optionally saves time in the aircraft data file,
restores this time at next run and continues from this value. This is
meant for operation hour counters (Hobbs meters) for turbines, etc.
2007-01-21 20:06:05 +00:00
frohlich
ebbc3ba003 Modified Files:
ThrustMaster/HOTAS-Cougar.xml: Updates from Matthias Boerner
2007-01-21 18:34:48 +00:00
mfranz
722f35903d only save before the reset is executed, so we can save e.g. the Hobbs time 2007-01-21 00:21:53 +00:00
mfranz
ec18defa4c the dummy entry is no longer needed; files get only written if they
actually contain aircraft settings
2007-01-20 23:13:54 +00:00