]> git.mxchange.org Git - flightgear.git/commitdiff
Allow a switch definition in the electrical system configuration to have
authorcurt <curt>
Tue, 18 Nov 2003 21:17:33 +0000 (21:17 +0000)
committercurt <curt>
Tue, 18 Nov 2003 21:17:33 +0000 (21:17 +0000)
a <rating-amps> tag which also implies that the switch is a circuit breaker.

Eventually we could have code that will automatically trip the breaker if
the current exceeds the rating.

src/Systems/electrical.cxx

index cb6c5ab89ab4e863946ed4577944714e21efed2b..3025e056f18a77bde7eacc377f1b2b55faf18a9f 100644 (file)
@@ -151,6 +151,10 @@ FGElectricalSwitch::FGElectricalSwitch( SGPropertyNode *node ) :
                 initial_state = false;
             }
             // cout << "initial state = " << initial_state << endl;
+        } else if ( cname == "rating-amps" ) {
+            rating_amps = atof( cval.c_str() );
+            circuit_breaker = true;
+            // cout << "initial state = " << initial_state << endl;
         }            
     }