1
0
Fork 0
Commit graph

2422 commits

Author SHA1 Message Date
mfranz
2893846dea - add <abort> group (like <exit> but works when <error>s are still made)
- rename <interval> to <wait>
- add <step-time> and <exit-time> on the <tutorial> level for default
  step iteration and exit time
- let <init>, <step>, <error>, <end>, <abort> share handler for
  <marker>, <set>, <view>, <nasal>
2007-03-30 20:24:26 +00:00
martin
b30e5921c3 Holger Wirtz:
Update for extended features.
2007-03-30 08:24:09 +00:00
andy
3bcfb0624a Add soft-coded utilites to the "io" and "math" modules. The math
stuff is, for the most part, already available in the geo module; but
it's small and this naming matches the evolvoing "standard nasal
library".
2007-03-29 22:09:25 +00:00
mfranz
e7837e32a2 note to myself: when you steal from somewhere, hide the evidence! :-) 2007-03-29 20:00:15 +00:00
mfranz
5f209cfa28 fix for new Nasal 2007-03-29 19:42:48 +00:00
andy
3bcb193cb9 Fix symbol lookup issue via a caller() hack. Not sure what the
underlying problem is, but this allows fpsDisplay() to be called both
as a command handler and as a function.
2007-03-29 19:32:59 +00:00
mfranz
de80a63ae6 don't rely on the existence of an "arg" pointer 2007-03-29 18:39:10 +00:00
mfranz
f236a438b8 Fix redundant elsif, fix and simplify broken fill-up code.
(Pointed out by Csaba HALASZ)
2007-03-29 18:25:48 +00:00
mfranz
abaa43a1a5 add function to reload Nasal module at runtime. Very convenient for
development. The file must be an XML file with Nasal between a
header/footer. It's a good idea to give it a *.nas extension, so
that editors choose the Nasal syntax coloring.

  <PropertyList><script><![CDATA[

  ... here goes the Nasal code ...

  ]]></script></PropertyList>
2007-03-29 15:00:04 +00:00
mfranz
d10d5980ca apply/store editfield values on Clear/Print/Execute/leave 2007-03-29 14:53:40 +00:00
mfranz
88b81056e1 - make fuel checkbox/slider "live"
- add two dialog helper functions dialog_apply() and dialog_update()
2007-03-29 14:50:27 +00:00
mfranz
137f1cef4a fix out-of-fuel bug 2007-03-29 14:46:00 +00:00
sydadams
fc35b92ef7 fixed some autopilot errors... 2007-03-29 05:27:16 +00:00
sydadams
143c445571 Updated Aerostar...
Updated KNS-80 Nav radio --- (Added DME display , ability to set 4 vor/rnav waypoint frequencies )

Aerostar instruments material animation updates
2007-03-29 02:38:31 +00:00
mfranz
44bb7bb192 reload XML dialogs on gui-reinit 2007-03-28 20:35:12 +00:00
mfranz
879620694e - offer 10 "tabs" (with more configurable) where each can contain Nasal code;
all code shares a common namespace, so variables defined in one tab can
  be used in another during the whole fgfs session
- make code persistent (saved in autosave.xml)
- better error messages (code borrowed from nasal/lib/interactive.nas)
- clear button (replaces close button, which is now on the title bar)
- help button (explains how to add more tab buttons, etc.)
2007-03-28 14:59:22 +00:00
mfranz
6fdf07b79e reverting; just saw why I hadn't turned it on 2007-03-27 18:02:12 +00:00
mfranz
bf1f438380 make the screen.log window keep the position it was dragged to 2007-03-27 17:48:16 +00:00
mfranz
9e5a18207f export <view> on [Dump], too 2007-03-26 22:48:10 +00:00
mfranz
39126a911c fix <condition> that wasn't fully converted to the new system 2007-03-26 16:40:17 +00:00
mfranz
bcb244be92 use <hrule/> without dummy children 2007-03-26 15:26:23 +00:00
mfranz
c1c86bb8a5 - use <hrule/> and <vrule/> without dummy children
- minor improvements/cosmetics
2007-03-26 15:25:27 +00:00
sydadams
c018eb9ca4 Updated Aerostar....
Aligned hotspots...
Moved kfc200.nas to Instruments-3d where it belongs...
Redoing the kfc200 flightdirector with newer functions (setlisteners) ...still in progress
Updated radios to change standby frequencies instead of selected frequencies....
2007-03-26 03:32:24 +00:00
mfranz
c09c7ac5c6 When loading a dialog, first close it, then remove the whole branch,
then load, and finally open the dialog again if it was open at the
beginning. That way it's easy to edit and to update a Nasal-loaded
XML dialog.
2007-03-25 10:00:53 +00:00
mfranz
7a300fca3e add tutorial loader function for AJ :-) 2007-03-24 23:28:41 +00:00
mfranz
b2fe43808c alining <textarea> and <list> looks nicer 2007-03-24 21:33:23 +00:00
mfranz
2a9993c37e minor adjustment of the <list> box 2007-03-24 21:02:45 +00:00
mfranz
269396c421 - remove tutorial dialogs from gui.nas and create a new XML dialog
$FG_ROOT/gui/dialogs/tutorial.xml. It combines the former selection
  and description dialogs, which makes browsing much more pleasant.
  No more switching back and forth between the two old dialogs. Also,
  the <list> box can handle a bigger number of tutorials than the
  <combo> box could.
- remove comments from the top of tutorial.nas. The documentation is
  now $FG_ROOT/Docs/README.tutorials
2007-03-24 20:56:40 +00:00
sydadams
dae87cdc0b Added conversions to make fuel annunciators work with Yasim AND JSBsim... 2007-03-24 19:23:09 +00:00
mfranz
b47f8f439d change <marker><[xyz]> to <marker><[xyz]-m> (for consistency with the
animation syntax, and to make tutorials noisier and harder to read :-)
2007-03-24 18:10:33 +00:00
mfranz
706483bc27 tutorial README 2007-03-24 18:08:38 +00:00
mfranz
44305607b3 - s,/sim/tutorial,/sim/tutorials,
- add a <delay> property that can be used at top level (for the default),
  and in <init> and <step>  (Time in seconds in which the main loop should
  run again.)
- fix initialization bug
2007-03-24 13:39:01 +00:00
mfranz
7f375cf76c s,/sim/tutorial,/sim/tutorials, 2007-03-24 13:32:15 +00:00
mfranz
c0290713b6 slider effect can be modulated by holding modifier keys down:
Ctrl -> coarse, Shift -> fine
2007-03-23 23:13:59 +00:00
mfranz
25e61dad0d AJ MacLEOD: replace obsolete and broken throttle bindings by controls
wrapper call

mf: I didn't find a trace of that /autopilot/controls-overrides/ property
    in the fgfs source code and most of the data package. There are regular
    complaints in the IRC channel about numpad keys 9 & 3 not working.
2007-03-23 20:03:28 +00:00
mfranz
10093284ba If text contains "{display|voice}" groups, skip the delimiters and discard
the "voice" part. It's no longer possible to display the three letters {|}
in screen message at the moment, but they aren't overly useful. We may want
to support escaping in the future, if necessary.
2007-03-23 15:56:34 +00:00
mfranz
03ba6e2b80 - now *really* disable marker on stopTutorial()
- add target heading
2007-03-23 10:58:15 +00:00
mfranz
9f3160542f - use en1_mbrola for the instructor: it's the clearest voice and, unlike
us3_mbrola doesn't lack some phonemes, causing interrupted messages
- use us2_mbrola for the pilot (seems to be rather complete, too;
  pity that the female voice us1_mbrola sounds so ugly :-)
2007-03-23 10:56:54 +00:00
mfranz
4762fb1db9 use self-closing tag instead of empty tags 2007-03-22 22:44:00 +00:00
mfranz
8a288f59c2 calculate "Estimated Time of Arrival" (ETA) in minutes for each <target>.
Negative values show that you are actually moving away. To avoid division
by zero, a small value is always added to speed. So, if you aren't moving
at all, you still get a non-infinity, but huge ETA.
2007-03-22 22:10:55 +00:00
mfranz
ef9caa1310 - <targets> can have arbitrary names
- <set> pair: allow to set <property> from <value> or second <property>
- support <set> pairs in <end>, too. This can be used to restore values.
- add optional <view> to <init>/<step>/<exit>/<end>. This is meant for
  cockpit tutorials. See the Lightning's startup tutorial for an example.
2007-03-22 17:08:05 +00:00
mfranz
9a0600b150 - replace "sprintf hack" by real sprintf
- add view manager for saving/restoring and moving/interpolating view
  axes & fov to absolute values. This is used for cockpit tutorials in
  $FG_ROOT/Nasal/tutorial.nas
2007-03-22 16:22:41 +00:00
sydadams
b900685c73 Amplified feeble turboprop sound.
Realigned fuel display ... again
Updated broken material animations....
Updated sounds
2007-03-22 07:20:57 +00:00
mfranz
0606fa3703 make condition() slightly faster and prettier (or not) 2007-03-21 18:37:06 +00:00
mfranz
54693a663f - fix <audio> bug
- check a step's errors in random order (otherwise a retarded instructor
  bitches minutes about the climb angle, and only then notices that the
  heading is totally wrong ;-) ... mabye simple scheduling would be better
- document embedded <nasal>
- start of <view> support
2007-03-21 17:31:26 +00:00
mfranz
b482f5d852 - add <target> feature: for each defined <target> lon/lat pair, corresponding
entries /sim/tutorial/targets/target[n]/{distance-m,direction-deg} are
  provided and kept up-to-date. A direction angle of 0 means that the target
  is straight ahead, 90 means it's to the right (3 o'clock) 179 means the
  target is right behind, etc.

- everywhere where <message> and/or <audio> is supported, there can be more
  of those entries, in which case one is randomly chosen. This is to make
  the instructions less monotone:

  <message>You are too fast. Fly at 100 knots.</message>
  <message>Not so fast. 100 knots are more than enough.</message>
  <message>Slower! Idiot!</message>                                  ;-)
2007-03-21 00:21:51 +00:00
mfranz
20fa1233fb better output coords with tenth of mm 2007-03-20 21:53:25 +00:00
mfranz
3fe72de020 remove code that is now in $FG_ROOT/Nasal/geo.nas 2007-03-20 20:57:58 +00:00
mfranz
80913de2e0 code from ufo.nas (used by ufo.nas and tutorial.nas)
- simple geo coordinates class: geo.Coord with methods to set/get single
  components, to apply distance/course and the get distance/course to other
  coords
- functions that return click and aircraft position as geo.Coord
- function that returns tile_path for given lon/lat
- function that returns normalized angle (0 <= angle < 360)
2007-03-20 20:54:52 +00:00
mfranz
cf16f4de88 support <model> definition in a tutorial file, so that tutorials can place
static scenery objects, like air-racing pylons, etc.
2007-03-20 17:32:28 +00:00