]> git.mxchange.org Git - flightgear.git/blobdiff - docs-mini/README.protocol
Document protocol extensions
[flightgear.git] / docs-mini / README.protocol
index ef9c39a2e1d8bd39a7a64e2f5d2cfde4826511a2..080c42bdaeb45a706c4e94b1a5223294d6e9dca0 100644 (file)
@@ -131,6 +131,23 @@ each of which describes the properties of on variable to write/read.
   <offset>      an optional offset which can be used for unit conversion.
                 (for example, degrees Celcius to degrees Fahrenheit).
 
+For input chunks there exist some more options:
+
+  <rel>         optional boolean parameter to enable handling of incoming values
+                as relative changes (default: false)
+                (Can be eg. used to realise up/down buttons by just sending 1 or
+                -1 respectively)
+
+  <min>         an optional minimum limit for the value to be clamped to. This
+                limit is always specified as absolute value, also with relative
+                changes enabled. (default: 0)
+  <max>         an optional upper limit for the input value to be clamped to. If
+                <min> equals <max> no limit is applied. (default: 0)
+  <wrap>        instead of clamping to minimum and maximum limits, wrap values
+                around. (default: false)
+                (Usefull for eg. heading selector to start again with 1 for
+                values higher than 360)
+
 
 Chunks can also consist of a single constant <format>, like in:
   <format>Data Section</format>
@@ -184,7 +201,30 @@ P=3.59
 </PropertyList>
 
 
+Control the heading bug by sending relative changes separated by newlines:
+
+<?xml version="1.0"?>
+
+<PropertyList>
+  <generic>
+
+    <input>
+      <line_separator>newline</line_separator>
+
+       <chunk>
+         <name>heading bug</name>
+         <type>int</type>
+         <node>/autopilot/settings/heading-bug-deg</node>
+         <relative>true</relative>
+         <min>1</min>
+         <max>360</max>
+         <wrap>true</wrap>
+     </chunk>
 
+   </input>
+
+ </generic>
+</PropertyList>
 
 -- writing data in XML syntax -------------------------------------------------