1
0
Fork 0
Commit graph

1369 commits

Author SHA1 Message Date
Richard Harrison
4e0483c9e8 NASAL: fix new truncateAt method to handle nil ptr errors during execution 2017-12-28 01:13:06 +01:00
Richard Harrison
79dc657170 Emesary: ensure that MPStringMaxLen initialized to default value in OutgoingBridge constructor 2017-12-28 00:15:15 +01:00
Stuart Buchanan
475fd50585 PFD UI Elements and NearestAirports page 2017-12-27 19:51:54 +00:00
Florent Rougon
c535306b3d Add-ons: simplify loading using the new API, set the 'loaded' flag
Also:
  - use the namespace __addon[ADDON_ID]__ when loading an add-on's
    main.nas file (previously, the namespace used was __addon[i]__ where
    i is 0 for the first registered add-on, 1 for the second one, etc.);
  - use logprint() instead of printlog(), because the former writes a
    more helpful source file and line number for the log call in
    fgfs.log (i.e., not always src/Scripting/NasalSys.cxx...);
  - remove the listener once it has been fired;
  - add documentation in Docs/README.add-ons.
2017-12-08 00:37:21 +01:00
Stuart Buchanan
3d31775ff3 Initial commit of FG1000 MFD 2017-11-24 23:04:46 +00:00
Richard Harrison
28fbda2e2a Emesary changes to better support GeoEventNotifications.
A GeoEventNotification can be used to notify all other MP craft (that are connected to the bridge) of AI objects or ballistic items that are present on the local player's machine. For example tankers, dropped payloads, missiles, carriers.

Changes

- Fix transfer string encoding for bridge. If the string contained untransmittable characters the length was wrong. Change to use the valid characters from BinaryTransfer.

- Fix bug transferring negative numbers.

- Add method to notification to provide the type key to be used to decide if a non distinct message should be added to the queue; rather than relying on the simple type.ident. This allows multiple notifications of the same type to be non distinct but also be transmitted

- Allow the maximum size of the mp string to be defined per bridge; rather than a system wide value. This allows the bridges to have their size tuned to match expected requirements; for example a bridge that is transmitting GeoEventNotification may need a lot more space than a bridge that is transmitting property sync notifications.

- Improve error message when out of space (due to the maximum string length)

- add trace option to bridges to aid debugging of transmitted values. This will produce verbose output.

- Add UniqueIndex to GeoEventNotification; to allow for multiple non-distinct notifications to be transmitted concurrently. This overrides the GetBridgeMessageNotificationTypeKey to include the UniqueIndex
2017-11-18 12:46:37 +01:00
Stuart Buchanan
1e69f3eb75 Fix handling of multiple MFDs
Found by chance during code read.  Untested, but surely correct.
2017-11-17 15:53:26 +00:00
Richard Harrison
8dafff9933 MFD framework - add support for Emesary
Allow a MFD to be controlled via Emesary notifications (notifications.PFDEventNotification);

Notification needs to be constructed with the following parameters;

1 - MFD designation (text; name of MFD)
2 - MFD identity (int, id of the MFD within the model). Default 1; same as used when creating the MFD
3 - Event type (PFDEventNotification.SoftKeyPushed, notifications.PFDEventNotification.ChangeMenuText
4 - Event parameter.
  a) for PFDEventNotification.SoftKeyPushed an int identifying the button
  b) for notifications.PFDEventNotification.ChangeMenuText a hash array containing the menu ID and the new text (e.g. [{ Id: 1, Text: "NNN"}])

Method obj.PFD.RegisterWithEmesary(emesary.GlobalTransmitter) need to be called to connect the MFD to a transmitter
2017-11-16 02:57:13 +01:00
Richard Harrison
08fd851489 Theme rework.
Change fonts; make use of the new feature to allow fonts to be specified using property from dialog xml.

Ensure that all fonts are defined within the style.
2017-11-12 16:57:39 +01:00
Stuart Buchanan
4bd57492f4 Add Lat/Lon grid MapStructure layer. 2017-10-15 21:54:05 +01:00
Stuart Buchanan
d84c527ca7 Canvas MapLayers for Airport
Add RWY, TAXI, TWR, PARKING map layers
Add new static position controller
Update Select Airport dialog to use new MapLayers.
2017-10-13 17:38:27 +01:00
Stuart Buchanan
e38ec03c60 Add STAMEN layer. Patch by Slawek MIKULA. 2017-10-02 20:34:31 +01:00
Stuart Buchanan
a622f6f37e Add zoom limits for SlippyMap layers 2017-10-02 20:25:11 +01:00
Stuart Buchanan
5ec53b4c36 Fix FIX label location. Patch from Slawek MIKULA 2017-10-02 20:22:06 +01:00
Stuart Buchanan
b5c67d82bc Fix minor compilation bug in geo.nas 2017-10-02 20:21:37 +01:00
Nikolai V. Chr
4621d0a5d4 Fix for setting individual attributes in geo.Coord 2017-10-02 12:04:34 +02:00
Stuart Buchanan
2fbc1dc491 Add VFR charts to Canvas Maps
Also add limits to zoom function.
2017-09-28 18:11:41 +01:00
Stuart Buchanan
85b7665c19 Add Canvas Map Support for Slippy Map
- Include OSM and OpenAIP in the canvas-map dialog.
2017-09-28 15:38:03 +01:00
Thorsten Renk
91db77595d Some (pretty hot) volcano code - general management routines, Kilauea and Stromboli worked out as examples, WIP 2017-09-24 18:08:36 +03:00
Richard Harrison
5ca84cbfdf Revised classic theme to make it use better fonts and colours. 2017-09-18 00:48:20 +02:00
Richard Harrison
434d4fde90 Multiplayer chat : possibly fix the popup dialog getting stuck. 2017-09-18 00:45:15 +02:00
Richard Harrison
bc71bf297e Add Property / object update manager to props
Manage updates when a value has changed more than a predetermined amount. This makes updating displays (e.g. canvas), or performing actions based on a property (or value in a hash) changing by more than the preset amount.
2017-09-17 22:22:00 +02:00
Richard Harrison
91dc5d2a83 AI Tanker: notify any listeners that a new tanker has been added.
need to set /ai/models/model-added to the path of the tanker node when created.
2017-09-17 22:22:00 +02:00
Thorsten Renk
7df5690f08 ALS terrain overlay shaders, not yet used, terrain definitions will follow post-release 2017-09-16 09:44:18 +03:00
Thorsten Renk
40d5f90f7d Fix AW METAR mode check for T-storms 2017-08-22 11:37:28 +03:00
Torsten Dreyer
e35ff1aa9a Don't complain about non-existant /addon property 2017-08-12 22:32:40 +02:00
Stuart Buchanan
2b072dd992 Use new C++ setValues/setChildren
Improve Nasal poperty access performance by
re-implementing props.nas functions in C++.
2017-08-06 21:16:26 +01:00
Richard Harrison
405eb73bb6 Emesary multiplayer bridge rework.
The primary goal of this work is to provide a alternative to multiplayer property transmission, one that is more efficient and event driven. By using notifications in the model bindings these control messages can be bridged and do not require extra code to implement dual controls.

Using this alternative permits the modeller much greater control of which properties are transmitted, how these are encoded, and how often the updates are needed.

Please remember that this is a use case for Emesary, it is not all that Emesary can provide and there are still many other uses for the event driven object oriented system that Emesary provides.

Briefly the changes are:

- New PropertySyncNotificationBase to permit property transfer between ownship and MP versions using notifications instead of the pre-defined MP messages. This gives a much more flexible way to seutp multiplayer property transfer - and can probably support more properties because of the more efficient packing. There is a corresponding parameter (/sim/multiplay/transmit-only-generics) that will only transmit the bare minimum of parameters; making more space for notifications.

- new AircraftControlNotification to allow for animation bindings in the model, these notifications can be easily bridged over MP thus adding a simple method to implement dual controls.

- more efficient packing of encoded notifications over MP saving roughly 30% (by using a much larger encoding space and also changing to use fixed length encoding). This breaks compatibility with previous MP bridges, however at this time I don't think anything is using the current code.

There can be different types of PropertySyncNotification (with unique ID's) sent at a different schedule (so you could have a 10 second update of very slow moving items). However bear in mind that the messages have a lifetime of 10 seconds to ensure receipt - so to optimise space would require > 15 seconds to make much difference, and that is very slow moving.
2017-07-23 16:05:43 +02:00
Torsten Dreyer
5c1f4a69f1 Introduce handler for --addon commandline switch
Requires flightgear commit f6698a0b1f9e8c0791314aa09cbe1625927ef3ff
to have property /addons/addon[n] populated
2017-07-18 12:14:50 +02:00
Torsten Dreyer
09bcc00b80 reset executable bit for nasal script 2017-07-18 10:57:13 +02:00
James Turner
3201c14768 Fix for sticking message tooltip.
Distinguish the popup types, and don’t allow mouse movement to change
the hide timer when the active tip is a message.
2017-05-30 00:20:14 +01:00
James Turner
cc14717930 Fix to Canvas-GUI window transparency
Separate the window titlebar from the main background area, so the
transparency of each can be set independently.

From Henning Stalkhe.
2017-05-29 08:24:22 +01:00
Thorsten Renk
2f99804dba More variation for the ALS aurora simulation, WIP 2017-04-27 14:18:55 +03:00
Stuart Buchanan
5c62d4663c Add Joystick Config dialog for individual engines 2017-04-20 21:06:42 +01:00
Erik Hofman
5049ebd0bc Prepare for windsock turbulence animation 2017-04-11 13:39:25 +02:00
Thorsten Renk
48768ee9d2 Earthview 2.1 - parallax mapping for cloud layer, lightning at night, Rayleigh scattering in atmosphere and minor bugfixes 2017-04-05 16:50:31 +03:00
Stuart Buchanan
6f2ccdd395 Add support for sprintf() formatting to tutorial
<message> tags can now contain sprintf() format
strings (%d, %.2f etc), with

<message-param>
  <property>/some/prop</property>
</message-param>

used as the substitute value.  Could be extended
in the future with perhaps Nasal evaluation?
2017-03-28 21:38:34 +01:00
Thorsten Renk
1fad428a27 Special purpose faster canvas text setting methods 2017-03-19 16:23:35 +02:00
Torsten Dreyer
ff77af8abe assign a name to the tooltip canvas 2017-02-20 19:22:53 +01:00
Stuart Buchanan
2473d667fd Use Festival TTS for tutorials 2017-02-11 21:49:00 +00:00
James Turner
a5cc57466f Merge /u/jsb1685/fgdata/ branch gui.nas into next
https://sourceforge.net/p/flightgear/fgdata/merge-requests/84/
2017-01-23 18:01:41 +00:00
James Turner
51e2ddc8ba Revert "Use new canvas Path rect/SVG support."
Don't use the built-in SVG/rect parser, since this bypasses creating
coordinate / command properties which some Canvas users rely upon.

This reverts commit 57a2d21ddf.
2017-01-23 17:51:39 +00:00
Henning Stahlke
962368eb2f Add yasim c.g. display to weight-and-fuel dialog. 2017-01-23 17:57:18 +01:00
Henning Stahlke
b568229f4a Handle missing property to avoid runtime error 2017-01-23 17:54:15 +01:00
James Turner
54abfe4874 Merge /u/prriley/fgdata/ branch next into next
https://sourceforge.net/p/flightgear/fgdata/merge-requests/81/
2017-01-04 14:20:43 +00:00
Patrick Riley
a3bbb029fa FG crashes from glideslope tunnel if runway id is empty string. This change defends against bad data. 2017-01-04 09:11:27 -05:00
Richard Harrison
ea32a92fe7 Generic MFD : Added optional parameter to update method
When using a data provider, or Emesary it is useful to be able to pass an optional element into the update method for the pages.
2017-01-04 02:19:32 +01:00
Florent Rougon
bc42bb5d55 gui.FileSelector: fix bug (initial dir parameter not working) 2016-12-30 02:22:23 +01:00
James Turner
57a2d21ddf Use new canvas Path rect/SVG support. 2016-12-16 19:34:16 +00:00
Thorsten Renk
a27a82b4ad Tentative fix for accelerometers using YaSim properties in JSBSim or optionally generated properties 2016-11-23 15:34:04 +02:00