]> git.mxchange.org Git - flightgear.git/commitdiff
Add support for specifying a <rated-draw> tag in the output sections of
authorcurt <curt>
Thu, 20 Nov 2003 19:03:09 +0000 (19:03 +0000)
committercurt <curt>
Thu, 20 Nov 2003 19:03:09 +0000 (19:03 +0000)
the electrical system definition.

src/Systems/electrical.cxx

index 3025e056f18a77bde7eacc377f1b2b55faf18a9f..906ccf15aab874f942517e5c7dcfb14cff1d436c 100644 (file)
@@ -118,9 +118,15 @@ FGElectricalBus::FGElectricalBus ( SGPropertyNode *node ) {
 
 FGElectricalOutput::FGElectricalOutput ( SGPropertyNode *node ) {
     kind = FG_OUTPUT;
-    output_amps = 0.1;
+    output_amps = 0.1;          // arbitrary default value
 
     name = node->getStringValue("name");
+    SGPropertyNode *draw = node->getNode("rated-draw");
+    if ( draw != NULL ) {
+        output_amps = draw->getDoubleValue();
+    }
+    // cout << "rated draw = " << output_amps << endl;
+
     int i;
     for ( i = 0; i < node->nChildren(); ++i ) {
         SGPropertyNode *child = node->getChild(i);