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>
|
<description>Cessna 172P Skyhawk (1981 model)</description>
|
||||||
<author>David Megginson</author>
|
<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>
|
<flight-model archive="y">jsb</flight-model>
|
||||||
<aero archive="y">c172p</aero>
|
<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_ROOT/*
|
||||||
READ ALLOW $FG_HOME/*
|
READ ALLOW $FG_HOME/*
|
||||||
READ ALLOW $FG_AIRCRAFT/*
|
READ ALLOW $FG_AIRCRAFT/*
|
||||||
|
READ ALLOW $FG_SCENERY/*
|
||||||
|
|
||||||
WRITE ALLOW /tmp/*.xml
|
WRITE ALLOW /tmp/*.xml
|
||||||
WRITE ALLOW $FG_HOME/*.sav
|
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;
|
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.
|
# Write XML file in FlightGear's native <PropertyList> format.
|
||||||
# Returns the filename on success or nil on error. If the source
|
# 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;
|
pattern = c.getValue() ~ "/" ~ p;
|
||||||
append(rules, [pattern, allow]);
|
append(rules, [pattern, allow]);
|
||||||
printlog("info", "IORules: appending ", pattern);
|
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 {
|
} else {
|
||||||
if (substr(pattern, 0, 9) == "$FG_ROOT/")
|
if (substr(pattern, 0, 9) == "$FG_ROOT/")
|
||||||
|
|
|
@ -57,8 +57,12 @@ command interface /autopilot/route-manager/input:
|
||||||
<!-- sidebar -->
|
<!-- sidebar -->
|
||||||
<group>
|
<group>
|
||||||
<layout>vbox</layout>
|
<layout>vbox</layout>
|
||||||
<button>
|
<text>
|
||||||
<legend>Fixes</legend>
|
<label>Display:</label>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<checkbox>
|
||||||
|
<label>Fixes</label>
|
||||||
<pref-width>100</pref-width>
|
<pref-width>100</pref-width>
|
||||||
<property>/gui/map/draw-fixes</property>
|
<property>/gui/map/draw-fixes</property>
|
||||||
<live>true</live>
|
<live>true</live>
|
||||||
|
@ -68,10 +72,10 @@ command interface /autopilot/route-manager/input:
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-toggle</command>
|
<command>property-toggle</command>
|
||||||
</binding>
|
</binding>
|
||||||
</button>
|
</checkbox>
|
||||||
|
|
||||||
<button>
|
<checkbox>
|
||||||
<legend>Navaids</legend>
|
<label>Navaids</label>
|
||||||
<pref-width>100</pref-width>
|
<pref-width>100</pref-width>
|
||||||
<property>/gui/map/draw-navaids</property>
|
<property>/gui/map/draw-navaids</property>
|
||||||
<live>true</live>
|
<live>true</live>
|
||||||
|
@ -81,7 +85,7 @@ command interface /autopilot/route-manager/input:
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-toggle</command>
|
<command>property-toggle</command>
|
||||||
</binding>
|
</binding>
|
||||||
</button>
|
</checkbox>
|
||||||
<!--
|
<!--
|
||||||
<button>
|
<button>
|
||||||
<legend>Airways</legend>
|
<legend>Airways</legend>
|
||||||
|
@ -89,8 +93,8 @@ command interface /autopilot/route-manager/input:
|
||||||
</button>
|
</button>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<button>
|
<checkbox>
|
||||||
<legend>Traffic</legend>
|
<label>Traffic</label>
|
||||||
<pref-width>100</pref-width>
|
<pref-width>100</pref-width>
|
||||||
<property>/gui/map/draw-traffic</property>
|
<property>/gui/map/draw-traffic</property>
|
||||||
<live>true</live>
|
<live>true</live>
|
||||||
|
@ -100,7 +104,7 @@ command interface /autopilot/route-manager/input:
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-toggle</command>
|
<command>property-toggle</command>
|
||||||
</binding>
|
</binding>
|
||||||
</button>
|
</checkbox>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<button>
|
<button>
|
||||||
|
@ -109,8 +113,8 @@ command interface /autopilot/route-manager/input:
|
||||||
</button>
|
</button>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<button>
|
<checkbox>
|
||||||
<legend>Data</legend>
|
<label>Data</label>
|
||||||
<pref-width>100</pref-width>
|
<pref-width>100</pref-width>
|
||||||
<property>/gui/map/draw-data</property>
|
<property>/gui/map/draw-data</property>
|
||||||
<live>true</live>
|
<live>true</live>
|
||||||
|
@ -120,12 +124,12 @@ command interface /autopilot/route-manager/input:
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-toggle</command>
|
<command>property-toggle</command>
|
||||||
</binding>
|
</binding>
|
||||||
</button>
|
</checkbox>
|
||||||
|
|
||||||
<empty><stretch>true</stretch></empty>
|
<empty><stretch>true</stretch></empty>
|
||||||
|
|
||||||
<button>
|
<checkbox>
|
||||||
<legend>Center on Acft</legend>
|
<label>Center on Acft</label>
|
||||||
<pref-width>100</pref-width>
|
<pref-width>100</pref-width>
|
||||||
<property>/gui/map/centre-on-aircraft</property>
|
<property>/gui/map/centre-on-aircraft</property>
|
||||||
<live>true</live>
|
<live>true</live>
|
||||||
|
@ -135,10 +139,10 @@ command interface /autopilot/route-manager/input:
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-toggle</command>
|
<command>property-toggle</command>
|
||||||
</binding>
|
</binding>
|
||||||
</button>
|
</checkbox>
|
||||||
|
|
||||||
<button>
|
<checkbox>
|
||||||
<legend>Acft Hdg Up</legend>
|
<label>Aircraft Hdg Up</label>
|
||||||
<pref-width>100</pref-width>
|
<pref-width>100</pref-width>
|
||||||
<property>/gui/map/aircraft-heading-up</property>
|
<property>/gui/map/aircraft-heading-up</property>
|
||||||
<live>true</live>
|
<live>true</live>
|
||||||
|
@ -148,10 +152,10 @@ command interface /autopilot/route-manager/input:
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-toggle</command>
|
<command>property-toggle</command>
|
||||||
</binding>
|
</binding>
|
||||||
</button>
|
</checkbox>
|
||||||
|
|
||||||
<button>
|
<checkbox>
|
||||||
<legend>Magnetic Hdgs</legend>
|
<label>Magnetic Hdgs</label>
|
||||||
<pref-width>100</pref-width>
|
<pref-width>100</pref-width>
|
||||||
<property>/gui/map/magnetic-headings</property>
|
<property>/gui/map/magnetic-headings</property>
|
||||||
<live>true</live>
|
<live>true</live>
|
||||||
|
@ -161,7 +165,7 @@ command interface /autopilot/route-manager/input:
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-toggle</command>
|
<command>property-toggle</command>
|
||||||
</binding>
|
</binding>
|
||||||
</button>
|
</checkbox>
|
||||||
|
|
||||||
<empty><stretch>true</stretch></empty>
|
<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>
|
<name>p</name>
|
||||||
<desc>Toggle the pause state of the sim</desc>
|
<desc>Toggle the pause state of the sim</desc>
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-toggle</command>
|
<command>pause</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>
|
|
||||||
</binding>
|
</binding>
|
||||||
</key>
|
</key>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue