Martin Spott wrote:
>Why is setting to 0.0 not sufficient to reach the desired goal ?
>
> Martin.
>
>
This lines only initialize the internal values of the electrical system.
The properties are set in the propagate function :
// publish values to specified properties
for ( i = 0; i < node->get_num_props(); ++i ) {
fgSetFloat( node->get_prop(i).c_str(), node->get_volts() );
}
But this is only done if :
// if this node has found a stronger power source, update the
// value and propagate to all children
if ( volts > node->get_volts() ) {
node->set_volts( volts );
So with the power switches off we have volts == 0 and we never enter the
if statement and the properies stay with their old content.
Harald.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel