]> git.mxchange.org Git - flightgear.git/blobdiff - src/Autopilot/xmlauto.cxx
Suppress MSVC warnings
[flightgear.git] / src / Autopilot / xmlauto.cxx
index 640664140c3237537a84ed676955396c5154e53c..1da3642765a9f61ccfa03122e9f784303fad48f6 100644 (file)
@@ -74,6 +74,10 @@ void FGXMLAutoInput::parse( SGPropertyNode_ptr node, double aValue, double aOffs
         min = new FGXMLAutoInput( n );
     }
 
+    if( (n = node->getChild( "abs" )) != NULL ) {
+      abs = n->getBoolValue();
+    }
+
     SGPropertyNode *valueNode = node->getChild( "value" );
     if ( valueNode != NULL ) {
         value = valueNode->getDoubleValue();
@@ -144,7 +148,7 @@ double FGXMLAutoInput::get_value()
             value = m;
     }
     
-    return value;
+    return abs ? fabs(value) : value;
 }
 
 FGXMLAutoComponent::FGXMLAutoComponent( SGPropertyNode * node ) :