1
0
Fork 0
Commit graph

82 commits

Author SHA1 Message Date
curt
da5ea10d5d Curt Olson:
Autopilot overhaul.
2004-01-31 19:47:45 +00:00
andy
0b3159ec0c Add a new command, "dialog-new", allowing external code (e.g. Nasal
scripts) to create dialogs at runtime.  Augment "dialog-close" to take
a name argument, allowing code other than PUI callbacks to close
dialogs.

The changes to the GUI directory to enable this are actually minor,
basically amounting to using SGPropertyNode_ptr reference counting
(the GUI subsystem no longer "controls" the dialog property trees, so
it can't delete them).
2003-12-08 02:05:10 +00:00
curt
d3181fb437 Andy Ross:
A set of changes to impliment Nasal support in FlightGear.  The nasal
interpreter is now part of SimGear.
2003-11-25 21:08:36 +00:00
curt
4544b1c736 Add a logging reinit command wrapper so that an external script can set
up the desired logging configuration and kick off a logging session
remotely.
2003-11-24 01:49:04 +00:00
curt
76107017cb Add a command which will setup the temperature field in the boundary and
aloft layers to match a current OAT at the current altitude.  This can be
run from an external script or gui.

Given the specified OAT (and the current aircraft altitude), the code
calculates the equivalent sea level temperature, and then assigns that to
all active boundary and aloft environment layers.
2003-11-10 21:59:35 +00:00
ehofman
980012e168 Move FGEventMgr and FGSubsystemMgr over to SimGear, add SGEventMgr to FlightGear's globals structre and some small code cleanups 2003-09-24 17:20:55 +00:00
ehofman
a33ad90ed7 Convert fgLIGHT to FGLight and make it FGSubsystem compatible. Let the subsystem manager handle it and let FGLight::update() handle the repositioning of the sun and the moon. 2003-09-20 09:38:32 +00:00
curt
b354f30930 Oops fix a small bug resetting to "real-clock" time. 2003-09-17 15:58:40 +00:00
curt
a217c563ba Clean up the timeofday setting code a bit more, consolodate the solver
functions (note to Norman: I looked at the web page you listed and that
looks like a good idea, but I don't have time right now to go through and
debug an entirely new routine.  What we have works well enough for now I hope!)
2003-09-17 15:49:15 +00:00
curt
5d6eafc091 Oops, get rid of some extraneous debugging output. 2003-09-16 22:38:41 +00:00
curt
7f2757a7ab Expose the time of day setting through the fg_command and property interface
so a gui interface can be built.
2003-09-16 22:35:16 +00:00
curt
5705ad715b Changes to facilitate replaying the last "n" seconds. 2003-09-11 19:36:04 +00:00
ehofman
1263b55c8e Fix a problem with MSVC and fix some typos 2003-08-09 13:31:44 +00:00
curt
c2684e9bc6 Norman Vine:
Add commands to increase/decrease the fog visibility.
2003-08-06 17:13:42 +00:00
curt
fff2989853 Modified the replay system to work without enabling the master or clock freeze. 2003-07-18 14:14:24 +00:00
curt
419f09f804 Curt:
I have added a fledgling replay system that records flight data and control
positions during the flight.

I have added an internal command called "replay" which will trigger a replay
of the entire saved flight data set.  This could be bound to a keyboard or
menu command, in fact this entire module is screaming for someone to build
a gui to control playback speed, amount of playback, etc.

This is the initial version so there are kinks that still need to be worked
out, please be patient.
2003-07-17 18:24:17 +00:00
curt
1a8fe25cf4 Previously the weather dialog box and environment system had some confusion
between temperature at altitude vs. temperature at sea level.  The dialog
box asked for temperature at altitude which makes sense, but all the
internal crunching expected temperature at sea level.  However, it makes no
logical sense to specify the sea level temperature for different layers so
I changed the internal processing to work with temperature at altitude and
then derive an approximate sea level temperature at the end.

If you know the ground temperature, you can just enter this temperature
for the first boundary layer and the system should do the right thing.
2003-06-24 20:04:29 +00:00
curt
2119db35c3 This is step "1" of probably "many" in the process of separating out the
scene management code and organizing it within simgear.  My strategy is
to identify the code I want to move, and break it's direct flightgear
dependencies.  Then it will be free to move over into the simgear package.

- Moved some property specific code into simgear/props/
- Split out the condition code from fgfs/src/Main/fg_props and put it
  in it's own source file in simgear/props/
- Created a scene subdirectory for scenery, model, and material property
  related code.
- Moved location.[ch]xx into simgear/scene/model/
- The location and condition code had dependencies on flightgear's global
  state (all the globals-> stuff, the flightgear property tree, etc.)  SimGear
  code can't depend on it so that data has to be passed as parameters to the
  functions/methods/constructors.
- This need to pass data as function parameters had a dramatic cascading
  effect throughout the FlightGear code.
2003-05-06 23:46:24 +00:00
david
807bcfb8e0 Removed debug statement.
Added return statement.
2003-04-05 00:30:38 +00:00
david
7543355d17 Add new property-randomize command.
Set a random value for a numeric property

Params:

  <property> - the name of the property to randomize
  <min> - the minimum allowed value
  <max> - the maximum allowed value
2003-04-04 22:38:35 +00:00
ehofman
4b62426109 Move current_panel to globals 2003-03-30 12:46:08 +00:00
ehofman
37c427558a A first stab at an aircraft selection dialog 2003-03-29 15:04:52 +00:00
curt
db46791c48 Don't start paused for in air starts. 2003-03-29 03:19:35 +00:00
ehofman
ef37b45dc7 Frederic Bouvier's assorted set of MSVC fixes 2003-03-23 09:59:46 +00:00
ehofman
0782e877a9 Add runtime log level support 2003-03-22 10:38:15 +00:00
david
58adf467bf Add a new <power> property to allow raising an axis to a power other
than 1 or 2 (<squared/> still works as well, and is equivalent to
<power>2</power>).
2003-03-01 21:28:51 +00:00
david
9679c7da15 Changed 'exit' command to quit immediately, rather than displaying a
built-in dialog (use an XML dialog instead).

Added an fgExit() function to simplify exit and cleanup.
2003-01-24 03:08:23 +00:00
david
e0c7b29aa7 Added reinit, suspend, and resume commands. 2003-01-21 02:07:29 +00:00
david
40bed0a3f1 Change GUI method names.
Do not delete GUI objects directly; let the GUI manager do it instead.

Simplify some code for readability.
2003-01-20 16:03:48 +00:00
david
6205d5eb1a Do an update after apply to see what really got into FlightGear. 2003-01-19 17:22:05 +00:00
david
013c322dd3 Added the property-cycle command. 2003-01-18 21:13:11 +00:00
david
c10ce7bd26 Renamed GUIWidget to FGDialog. 2003-01-18 15:57:51 +00:00
david
04f1dc4837 Make all PSL support conditional, because it's not included in plib
1.6.  The macro is HAVE_PLIB_PSL.
2003-01-17 12:41:47 +00:00
david
9bbe8a78b6 Added simple proof-of-concept support for running PSL scripts from
input bindings.  They will work only with the latest CVS; otherwise,
./configure will disable them.  There is a new command, 'script',
which takes a single argument, also called 'script', containing PSL
code (currently PSL requires a main() function).

Erik Hofman has written some more elaborate code for triggering PSL
code from drop-down menus and scheduling events; I will look at
integrating that next.
2003-01-11 16:30:32 +00:00
curt
be703a92b4 Add support for in-air preset starts relative to a VOR, NDB, or Fix. 2003-01-05 00:10:36 +00:00
curt
30dc5aab90 Ooops, the presets_commit command was lost going from the 1.8 -> 1.9 version
(Sun Dec 22 19:58:34 2002 UTC)
2003-01-04 21:22:43 +00:00
david
1ec788b6da Patch from Julian Foad to fix wrapping behaviour for property-adjust
and property-multiply:

Firstly, change back to wrapping modulo the interval, with "min <= x <
max" semantics.  I believe the previous implementation did that.  The
inline function that Norman mentioned also does that.

Secondly, make it snap to the nearest value (min + N*resolution) when a
"resolution" tag is present, taking special care of floating-point
precision.  Or perhaps specify "number of divisions in the interval" as
an integer, instead of "resolution" by which I meant a floating-point
"size of a division".

[also fixed]

While working on this file I noticed some potentially serious warnings:

fg_commands.cxx: In function `bool do_property_adjust(const
SGPropertyNode*)':
fg_commands.cxx:435: warning: control reaches end of non-void function
fg_commands.cxx: In function `bool do_property_multiply(const
SGPropertyNode*)':
fg_commands.cxx:465: warning: control reaches end of non-void function
/usr/local/include/simgear/misc/props.hxx: At top level:
fg_commands.cxx:600: warning: `bool do_presets_commit(const
SGPropertyNode*)' defined but not used
2003-01-04 18:47:25 +00:00
david
71f08e795d Patches from Erik Hofman for SGI compatibility:
Some more cmall changes to the SimGear header files and removed the
SG_HAVE_NATIVE_SGI_COMPILERS dependancies from FlightGear.

I've added a seperate JSBSim patch for the JSBSim source tree.
2002-12-31 18:26:02 +00:00
david
e4409c5222 Add the 'offset' and 'factor' arguments back into property-adjust;
they're needed for the mouse.
2002-12-31 12:08:32 +00:00
david
ea6448c956 Modify the property-assign command to optionally copy a value from
another property (suggested by Jim Wilson).
2002-12-31 03:05:38 +00:00
david
0d12c4d83d Removed the (apparently unused) 'factor' and 'offset' arguments from
property-adjust.

Modified property-adjust and property-multiply so that they always
work with double values, to simplify the code.

Factored out some common code.

Added a 'mask' argument to the property-adjust and property-multiply
commands.  If mask is set to "all" (the default), then the command
works as before; if mask is set to "integer", it works only to the
left of the decimal point; and if mask is set to "decimal", it works
only to the right of the decimal place.  This functionality is useful
for tuning VHF COM and NAV radios.
2002-12-30 19:50:17 +00:00
david
a7e56cf399 Added new commands:
- dialog-open
- dialog-close
- dialog-update
- dialog-apply

The last two can copy a value from a property to a GUI field or
vice-versa either individually or across the whole dialog.
2002-12-22 19:58:34 +00:00
curt
1feedec8d1 - Change the global_tile_mgr to a globals->get_tile_mgr() which is
dynamically created at run time.
- Further clean ups to the FGTileMgr class interface.
2002-12-06 22:29:46 +00:00
curt
ebc2fbd684 Exposed the fg_commands though the httpd interface.
Added a built in command to preset to what ever values are in /sim/presets/
Twiddling with preset code.
2002-11-30 20:10:16 +00:00
curt
bcf9fa3695 Massaging the FGTileMgr->update() interface towards using FGLocation. 2002-11-30 03:05:34 +00:00
david
2de88f278b Started new, XML-configurable GUI subsystem. 2002-11-07 16:27:47 +00:00
david
0de065b0ec Added fgLoadProps to load properties from a path relative to FG_ROOT. 2002-11-06 18:57:31 +00:00
david
fa87fe5c1d Modified for simpler command-manager interface. 2002-10-26 01:19:23 +00:00
david
d43dfa54df Major code simplification. 2002-10-25 22:19:51 +00:00
curt
df6989a37a Bernie Bright:
Here is a FGIO class derived from FGSubsystem that replaces the fgIOInit()
and fgIOProcess() functions.  The FGIO::update(double delta) doesn't use the
delta argument yet.  I suspect it could be used as a replacement for the
calculated interval value but I'm not familiar enough with that piece of code
just yet.

I've also added two "command properties" to fg_commands.cxx that select the
next or previous view.  Writing any value to these properties triggers the
corresponding action.  As an example I modified my keyboard.xml:

 <key n="118">
  <name>v</name>
  <desc>Next view</desc>
  <binding>
   <command>property-assign</command>
   <property>/command/view/next</property>
   <value type="bool">true</value>
  </binding>
 </key>

 <key n="86">
  <name>V</name>
  <desc>Prev view</desc>
  <binding>
   <command>property-assign</command>
   <property>/command/view/prev</property>
   <value type="bool">true</value>
  </binding>
 </key>

And of course these actions can also be triggered from external scripts via
the props server.
2002-08-25 20:56:16 +00:00