From 455a900b5c4e313f364809580b2b51719a23da83 Mon Sep 17 00:00:00 2001 From: curt <curt> Date: Tue, 18 Nov 2003 21:17:33 +0000 Subject: [PATCH] Allow a switch definition in the electrical system configuration to have 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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Systems/electrical.cxx b/src/Systems/electrical.cxx index cb6c5ab89..3025e056f 100644 --- a/src/Systems/electrical.cxx +++ b/src/Systems/electrical.cxx @@ -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; } }