Implement the Nearest Airports PFD softkey, displaying a scrollable
list of the closest 25 airports within 200nm.
Also fix a couple of minor bugs and add self-checking to the
GroupElement
Previously the FG1000 and MFD assumed that all notifications received
via Emesary had a Device_Id field. This is true for
notifications.PFDEventNotification.DefaultType but not for other
messages - e.g. those generated by the AN SPN 46 system on the
carrier.
The effect of this was that when Nimitz was loaded, the FG1000 stopped
working with various errors.
This fix checks the notification type before the Device_Id.
Without this it will cause a nil dereference resulting in
Nasal runtime error: non-objects have no members
at D:/Program Files/FlightGear 2018.2.2/data/Nasal/canvas/map/WPT.lcontroller, line 57
called from: D:/Program Files/FlightGear 2018.2.2/data/Nasal/canvas/map/WPT.lcontroller, line 79
called from: D:/Program Files/FlightGear 2018.2.2/data/Nasal/canvas/MapStructure.nas, line 1088
called from: D:/Program Files/FlightGear 2018.2.2/data/Nasal/geo.nas, line 384
called from: D:/Program Files/FlightGear 2018.2.2/data/Nasal/canvas/MapStructure.nas, line 1051
called from: D:/Program Files/FlightGear 2018.2.2/data/Nasal/canvas/MapStructure.nas, line 1059
called from: D:/Program Files/FlightGear 2018.2.2/data/Nasal/canvas/map/WPT.lcontroller, line 26
called from: D:/Program Files/FlightGear 2018.2.2/data/Nasal/globals.nas, line 119
- DTO MapStructure layer to provide a DTO line to a lat/lon
- Support for scrolling lists in the PFD/GroupElement
- Support MAP (NavigationMap) and ENGINE (EIS) soft-keys from other pages.
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