| 1 |
# Copyright 2018 Stuart Buchanan |
| 2 |
# This file is part of FlightGear. |
| 3 |
# |
| 4 |
# FlightGear is free software: you can redistribute it and/or modify |
| 5 |
# it under the terms of the GNU General Public License as published by |
| 6 |
# the Free Software Foundation, either version 2 of the License, or |
| 7 |
# (at your option) any later version. |
| 8 |
# |
| 9 |
# FlightGear is distributed in the hope that it will be useful, |
| 10 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
# GNU General Public License for more details. |
| 13 |
# |
| 14 |
# You should have received a copy of the GNU General Public License |
| 15 |
# along with FlightGear. If not, see <http://www.gnu.org/licenses/>. |
| 16 |
# |
| 17 |
# FMS Interface using Emesary to update FMS properties from Emesary messages. |
| 18 |
|
| 19 |
var GenericFMSUpdater = |
| 20 |
{ |
| 21 |
new : func () { |
| 22 |
var obj = { |
| 23 |
parents : [ |
| 24 |
GenericFMSUpdater, |
| 25 |
PropertyUpdater.new( |
| 26 |
notifications.PFDEventNotification.DefaultType, |
| 27 |
notifications.PFDEventNotification.FMSData, |
| 28 |
) |
| 29 |
], |
| 30 |
}; |
| 31 |
|
| 32 |
obj.addPropMap("FMSHeadingBug", "/autopilot/settings/heading-bug-deg"); |
| 33 |
obj.addPropMap("FMSSelectedAlt", "/autopilot/settings/target-alt-ft"); |
| 34 |
obj.addPropMap("FMSPressureSettingInHG", "/instrumentation/altimeter/setting-inhg"); |
| 35 |
return obj; |
| 36 |
}, |
| 37 |
}; |