1
0
Fork 0

Add support for specifying a <rated-draw> tag in the output sections of

the electrical system definition.
This commit is contained in:
curt 2003-11-20 19:03:09 +00:00
parent a8c7af79ab
commit c05a2c2bcc

View 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);