Merge branch 'master' of \New Git\fgdata
This commit is contained in:
commit
6e90b952c9
6 changed files with 238 additions and 36 deletions
|
@ -13,7 +13,14 @@ Started October 23 2001 by John Check, fgpanels@rockfish.net
|
|||
|
||||
<description>Cessna 172P Skyhawk (1981 model)</description>
|
||||
<author>David Megginson</author>
|
||||
<status>production</status>
|
||||
<status>early production</status>
|
||||
<rating>
|
||||
<FDM type="int">3</FDM>
|
||||
<systems type="int">4</systems>
|
||||
<model type="int">5</model>
|
||||
<cockpit type="int">4</cockpit>
|
||||
</rating>
|
||||
|
||||
|
||||
<flight-model archive="y">jsb</flight-model>
|
||||
<aero archive="y">c172p</aero>
|
||||
|
|
168
Input/Joysticks/ThrustMaster/T-Flight-Stick-X.xml
Normal file
168
Input/Joysticks/ThrustMaster/T-Flight-Stick-X.xml
Normal file
|
@ -0,0 +1,168 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
Bindings for THRUSTMASTER T.Flight Stick X based on presets from the constructor.
|
||||
by Joffrey Paris
|
||||
-->
|
||||
|
||||
<PropertyList>
|
||||
<name type="string">T.Flight Stick X</name>
|
||||
|
||||
<axis n="0">
|
||||
<desc>Aileron</desc>
|
||||
<binding>
|
||||
<command>property-scale</command>
|
||||
<property>/controls/flight/aileron</property>
|
||||
<squared type="bool">true</squared>
|
||||
</binding>
|
||||
</axis>
|
||||
|
||||
<axis n="1">
|
||||
<desc>Elevator</desc>
|
||||
<binding>
|
||||
<command>property-scale</command>
|
||||
<property>/controls/flight/elevator</property>
|
||||
<factor type="double">-1.0</factor>
|
||||
<squared type="bool">true</squared>
|
||||
</binding>
|
||||
</axis>
|
||||
|
||||
<axis n="2">
|
||||
<desc>Increase/Reduce Throttle</desc>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.throttleAxis()</script>
|
||||
</binding>
|
||||
</axis>
|
||||
|
||||
<axis n="3">
|
||||
<desc>Rudder Left/Right</desc>
|
||||
<binding>
|
||||
<command>property-scale</command>
|
||||
<property>/controls/flight/rudder</property>
|
||||
<factor type="double">1.0</factor>
|
||||
</binding>
|
||||
</axis>
|
||||
|
||||
<axis n="6">
|
||||
<desc>View Direction</desc>
|
||||
<low>
|
||||
<repeatable>true</repeatable>
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/sim/current-view/goal-heading-offset-deg</property>
|
||||
<step type="double">2.0</step>
|
||||
</binding>
|
||||
</low>
|
||||
<high>
|
||||
<repeatable>true</repeatable>
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/sim/current-view/goal-heading-offset-deg</property>
|
||||
<step type="double">-2.0</step>
|
||||
</binding>
|
||||
</high>
|
||||
</axis>
|
||||
|
||||
<axis n="7">
|
||||
<desc>View Elevation</desc>
|
||||
<low>
|
||||
<repeatable>true</repeatable>
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/sim/current-view/goal-pitch-offset-deg</property>
|
||||
<step type="double">-2.0</step>
|
||||
</binding>
|
||||
</low>
|
||||
<high>
|
||||
<repeatable>true</repeatable>
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/sim/current-view/goal-pitch-offset-deg</property>
|
||||
<step type="double">2.0</step>
|
||||
</binding>
|
||||
</high>
|
||||
</axis>
|
||||
|
||||
<button n="0">
|
||||
<desc>Brakes</desc>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.applyBrakes(1)</script>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.applyBrakes(0)</script>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</button>
|
||||
|
||||
<button n="1">
|
||||
<desc>Change View</desc>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>view.stepView(1)</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<button n="2">
|
||||
<desc>Trim Nose Up</desc>
|
||||
<repeatable type="bool">true</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.elevatorTrim(1)</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<button n="3">
|
||||
<desc>Trim Nose Down</desc>
|
||||
<repeatable type="bool">true</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.elevatorTrim(-1)</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<button n="4">
|
||||
<desc>Extend Flaps Incrementally</desc>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.flapsDown(1)</script>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.flapsDown(0)</script>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</button>
|
||||
|
||||
<button n="5">
|
||||
<desc>Retract Flaps Incrementally</desc>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.flapsDown(-1)</script>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.flapsDown(0)</script>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</button>
|
||||
|
||||
<button n="7">
|
||||
<desc>Landing gear Up/Down</desc>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.gearToggle()</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
</PropertyList>
|
||||
|
||||
<!-- end of T.Flight Stick X.xml -->
|
|
@ -28,6 +28,7 @@
|
|||
READ ALLOW $FG_ROOT/*
|
||||
READ ALLOW $FG_HOME/*
|
||||
READ ALLOW $FG_AIRCRAFT/*
|
||||
READ ALLOW $FG_SCENERY/*
|
||||
|
||||
WRITE ALLOW /tmp/*.xml
|
||||
WRITE ALLOW $FG_HOME/*.sav
|
||||
|
|
35
Nasal/io.nas
35
Nasal/io.nas
|
@ -81,6 +81,33 @@ var read_properties = func(path, target = nil) {
|
|||
return fgcommand("loadxml", args) ? ret : nil;
|
||||
}
|
||||
|
||||
# Load XML file in FlightGear's native <PropertyList> format.
|
||||
# file will be located in the airport-scenery directories according to
|
||||
# ICAO and filename, i,e in Airports/I/C/A/ICAO.filename.xml
|
||||
# If the second, optional target parameter is set, then the properties
|
||||
# are loaded to this node in the global property tree. Otherwise they
|
||||
# are returned as a separate props.Node tree. Returns the data as a
|
||||
# props.Node on success or nil on error.
|
||||
#
|
||||
# Usage: io.read_airport_properties(<icao>, <filename> [, <props.Node or property-path>]);
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# var data = io.read_properties("KSFO", "rwyuse");
|
||||
#
|
||||
var read_airport_properties = func(icao, fname, target = nil) {
|
||||
var args = props.Node.new({ filename: fname, icao:icao });
|
||||
if (target == nil) {
|
||||
var ret = args.getNode("data", 1);
|
||||
} elsif (isa(target, props.Node)) {
|
||||
args.getNode("targetnode", 1).setValue(target.getPath());
|
||||
var ret = target;
|
||||
} else {
|
||||
args.getNode("targetnode", 1).setValue(target);
|
||||
var ret = props.globals.getNode(target, 1);
|
||||
}
|
||||
return fgcommand("loadxml", args) ? ret : nil;
|
||||
}
|
||||
|
||||
# Write XML file in FlightGear's native <PropertyList> format.
|
||||
# Returns the filename on success or nil on error. If the source
|
||||
|
@ -245,6 +272,14 @@ _setlistener("/sim/signals/nasal-dir-initialized", func {
|
|||
pattern = c.getValue() ~ "/" ~ p;
|
||||
append(rules, [pattern, allow]);
|
||||
printlog("info", "IORules: appending ", pattern);
|
||||
}
|
||||
} elsif (substr(pattern, 0, 12) == "$FG_SCENERY/") {
|
||||
var p = substr(pattern, 12);
|
||||
var sim = props.globals.getNode("/sim");
|
||||
foreach (var c; sim.getChildren("fg-scenery")) {
|
||||
pattern = c.getValue() ~ "/" ~ p;
|
||||
append(rules, [pattern, allow]);
|
||||
printlog("info", "IORules: appending ", pattern);
|
||||
}
|
||||
} else {
|
||||
if (substr(pattern, 0, 9) == "$FG_ROOT/")
|
||||
|
|
|
@ -57,8 +57,12 @@ command interface /autopilot/route-manager/input:
|
|||
<!-- sidebar -->
|
||||
<group>
|
||||
<layout>vbox</layout>
|
||||
<button>
|
||||
<legend>Fixes</legend>
|
||||
<text>
|
||||
<label>Display:</label>
|
||||
</text>
|
||||
|
||||
<checkbox>
|
||||
<label>Fixes</label>
|
||||
<pref-width>100</pref-width>
|
||||
<property>/gui/map/draw-fixes</property>
|
||||
<live>true</live>
|
||||
|
@ -68,10 +72,10 @@ command interface /autopilot/route-manager/input:
|
|||
<binding>
|
||||
<command>property-toggle</command>
|
||||
</binding>
|
||||
</button>
|
||||
</checkbox>
|
||||
|
||||
<button>
|
||||
<legend>Navaids</legend>
|
||||
<checkbox>
|
||||
<label>Navaids</label>
|
||||
<pref-width>100</pref-width>
|
||||
<property>/gui/map/draw-navaids</property>
|
||||
<live>true</live>
|
||||
|
@ -81,7 +85,7 @@ command interface /autopilot/route-manager/input:
|
|||
<binding>
|
||||
<command>property-toggle</command>
|
||||
</binding>
|
||||
</button>
|
||||
</checkbox>
|
||||
<!--
|
||||
<button>
|
||||
<legend>Airways</legend>
|
||||
|
@ -89,8 +93,8 @@ command interface /autopilot/route-manager/input:
|
|||
</button>
|
||||
-->
|
||||
|
||||
<button>
|
||||
<legend>Traffic</legend>
|
||||
<checkbox>
|
||||
<label>Traffic</label>
|
||||
<pref-width>100</pref-width>
|
||||
<property>/gui/map/draw-traffic</property>
|
||||
<live>true</live>
|
||||
|
@ -100,7 +104,7 @@ command interface /autopilot/route-manager/input:
|
|||
<binding>
|
||||
<command>property-toggle</command>
|
||||
</binding>
|
||||
</button>
|
||||
</checkbox>
|
||||
|
||||
<!--
|
||||
<button>
|
||||
|
@ -109,8 +113,8 @@ command interface /autopilot/route-manager/input:
|
|||
</button>
|
||||
-->
|
||||
|
||||
<button>
|
||||
<legend>Data</legend>
|
||||
<checkbox>
|
||||
<label>Data</label>
|
||||
<pref-width>100</pref-width>
|
||||
<property>/gui/map/draw-data</property>
|
||||
<live>true</live>
|
||||
|
@ -120,12 +124,12 @@ command interface /autopilot/route-manager/input:
|
|||
<binding>
|
||||
<command>property-toggle</command>
|
||||
</binding>
|
||||
</button>
|
||||
</checkbox>
|
||||
|
||||
<empty><stretch>true</stretch></empty>
|
||||
|
||||
<button>
|
||||
<legend>Center on Acft</legend>
|
||||
<checkbox>
|
||||
<label>Center on Acft</label>
|
||||
<pref-width>100</pref-width>
|
||||
<property>/gui/map/centre-on-aircraft</property>
|
||||
<live>true</live>
|
||||
|
@ -135,10 +139,10 @@ command interface /autopilot/route-manager/input:
|
|||
<binding>
|
||||
<command>property-toggle</command>
|
||||
</binding>
|
||||
</button>
|
||||
</checkbox>
|
||||
|
||||
<button>
|
||||
<legend>Acft Hdg Up</legend>
|
||||
<checkbox>
|
||||
<label>Aircraft Hdg Up</label>
|
||||
<pref-width>100</pref-width>
|
||||
<property>/gui/map/aircraft-heading-up</property>
|
||||
<live>true</live>
|
||||
|
@ -148,10 +152,10 @@ command interface /autopilot/route-manager/input:
|
|||
<binding>
|
||||
<command>property-toggle</command>
|
||||
</binding>
|
||||
</button>
|
||||
</checkbox>
|
||||
|
||||
<button>
|
||||
<legend>Magnetic Hdgs</legend>
|
||||
<checkbox>
|
||||
<label>Magnetic Hdgs</label>
|
||||
<pref-width>100</pref-width>
|
||||
<property>/gui/map/magnetic-headings</property>
|
||||
<live>true</live>
|
||||
|
@ -161,7 +165,7 @@ command interface /autopilot/route-manager/input:
|
|||
<binding>
|
||||
<command>property-toggle</command>
|
||||
</binding>
|
||||
</button>
|
||||
</checkbox>
|
||||
|
||||
<empty><stretch>true</stretch></empty>
|
||||
|
||||
|
|
15
keyboard.xml
15
keyboard.xml
|
@ -951,20 +951,7 @@ top down before the key bindings are parsed.
|
|||
<name>p</name>
|
||||
<desc>Toggle the pause state of the sim</desc>
|
||||
<binding>
|
||||
<command>property-toggle</command>
|
||||
<property>/sim/freeze/master</property>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>property-toggle</command>
|
||||
<property>/sim/freeze/clock</property>
|
||||
</binding>
|
||||
<binding>
|
||||
<condition>
|
||||
<property>/sim/freeze/replay-state</property>
|
||||
</condition>
|
||||
<command>property-assign</command>
|
||||
<property>/sim/replay/disable</property>
|
||||
<value type="bool">true</value>
|
||||
<command>pause</command>
|
||||
</binding>
|
||||
</key>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue