Add support for specifying a <rated-draw> tag in the output sections of
the electrical system definition.
This commit is contained in:
parent
a8c7af79ab
commit
c05a2c2bcc
1 changed files with 7 additions and 1 deletions
|
@ -118,9 +118,15 @@ FGElectricalBus::FGElectricalBus ( SGPropertyNode *node ) {
|
||||||
|
|
||||||
FGElectricalOutput::FGElectricalOutput ( SGPropertyNode *node ) {
|
FGElectricalOutput::FGElectricalOutput ( SGPropertyNode *node ) {
|
||||||
kind = FG_OUTPUT;
|
kind = FG_OUTPUT;
|
||||||
output_amps = 0.1;
|
output_amps = 0.1; // arbitrary default value
|
||||||
|
|
||||||
name = node->getStringValue("name");
|
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;
|
int i;
|
||||||
for ( i = 0; i < node->nChildren(); ++i ) {
|
for ( i = 0; i < node->nChildren(); ++i ) {
|
||||||
SGPropertyNode *child = node->getChild(i);
|
SGPropertyNode *child = node->getChild(i);
|
||||||
|
|
Loading…
Reference in a new issue