This patch makes the pa24 changes to use the mag.sw from Instruments 3d.
Changed the mag_switch.ac to include the pick rectangles and the
mags.xml to use the pick automation. Also includes the edits to
pa28-161.xml and pa28-161-set.xml to use the 3d radio stack.
by debug.nas to turn on/off syntax coloring for dumped data (which
is desirable as compound data types can fill several screens with
rather hard to read data). Unfortunately, it can't be reliably deduced
from the OS whether ANSI colors are available or not.
- move "multiplayer chat" properties to where they belong
Changes:
1. remove typo from all the /Systems/KAP140.xml files
2. changes to put radio_stack in Instruments-3d
3. Add "pick" to vor, alt, hi, in Instruments-3d
4. changes to pa24-250 and pa28-161 to use 2 and 3.
5. add "pick" and "2d text in window" in 3d OAT in pa24-250
when dragging the mouse with middle mouse button (MMB) pressed (reset
with MMB+LMB):
Add support for forward/backward moving (MMB+KbdCtrl). With this one can,
for example, read what's written on the backside of the cup of coffee
on top of the screen in the E3B's operator room, or walk around between
the passenger seats in the fokker70 searching for the toilet. :-)
- use extra function for resuming normal mode after lookat: dynamic_view.resume()
- add fov (field-of-view) to interface: me.fov_offset
- remove register_headshake and me.headshake; this can still be done via
normal register(). If only headshaking is to be added, while keeping default
plane view, do this:
dynamic_view.register(func {
default_plane();
me.x_offset = ...
me.y_offset = ...
me.z_offset = ...
});
- initialize /sim/time/delta-realtime-sec, so that the lowpass filter doesn't
complain if it's starter eraly (of course the results won't be correct
until the delta is real)
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.
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
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).
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.
"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)
- 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.
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 %.