[prev in list] [next in list] [prev in thread] [next in thread]
List: flightgear-cvs
Subject: [Flightgear-cvslogs] CVS: source/src/Autopilot xmlauto.cxx, 1.35,
From: Torsten Dreyer <torsten () baron ! flightgear ! org>
Date: 2009-02-28 20:19:43
Message-ID: 200902282019.n1SKJhk1026833 () baron ! flightgear ! org
[Download RAW message or body]
Update of /var/cvs/FlightGear-0.9/source/src/Autopilot
In directory baron.flightgear.org:/tmp/cvs-serv26826
Modified Files:
xmlauto.cxx
Log Message:
Added support for <condition> elements under <enable> elements.
The old <prop> and <value> elements are still supported but ignored, if a <condition> element exists.
Also for the DigitalFilter
Index: xmlauto.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/src/Autopilot/xmlauto.cxx,v
retrieving revision 1.35
retrieving revision 1.36
diff -C 2 -r1.35 -r1.36
*** xmlauto.cxx 28 Feb 2009 16:16:13 -0000 1.35
--- xmlauto.cxx 28 Feb 2009 20:19:39 -0000 1.36
***************
*** 828,838 ****
debug = child->getBoolValue();
} else if ( cname == "enable" ) {
! SGPropertyNode *prop = child->getChild( "prop" );
! if ( prop != NULL ) {
! enable_prop = fgGetNode( prop->getStringValue(), true );
! }
! SGPropertyNode *val = child->getChild( "value" );
! if ( val != NULL ) {
! enable_value = val->getStringValue();
}
SGPropertyNode *pass = child->getChild( "honor-passive" );
--- 828,841 ----
debug = child->getBoolValue();
} else if ( cname == "enable" ) {
! _condition = getCondition( child );
! if( _condition == NULL ) {
! SGPropertyNode *prop = child->getChild( "prop" );
! if ( prop != NULL ) {
! enable_prop = fgGetNode( prop->getStringValue(), true );
! }
! SGPropertyNode *val = child->getChild( "value" );
! if ( val != NULL ) {
! enable_value = val->getStringValue();
! }
}
SGPropertyNode *pass = child->getChild( "honor-passive" );
***************
*** 888,896 ****
void FGDigitalFilter::update(double dt)
{
! if ( (input_prop != NULL &&
! enable_prop != NULL &&
enable_prop->getStringValue() == enable_value) ||
! (enable_prop == NULL &&
! input_prop != NULL) ) {
input.push_front(input_prop->getDoubleValue());
--- 891,899 ----
void FGDigitalFilter::update(double dt)
{
! if ( input_prop != NULL && (
! ( _condition != NULL && _condition->test() ) ||
! ( enable_prop != NULL &&
enable_prop->getStringValue() == enable_value) ||
! (enable_prop == NULL && _condition == NULL ) ) ) {
input.push_front(input_prop->getDoubleValue());
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Flightgear-cvslogs mailing list
Flightgear-cvslogs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-cvslogs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic