From: Thorsten Brehm Date: Fri, 8 Oct 2010 19:41:09 +0000 (+0200) Subject: Fixed autopilot/Predictor. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a4f1139fcd8a130be87d7a9fee881b22d1acc8a9;p=flightgear.git Fixed autopilot/Predictor. Signature of Predictor::configure must match AnalogComponent::configure, otherwise the inherited method isn't overridden. => predictor couldn't be configured. => speed predictor rules in "generic-autopilot-helper.xml" weren't working. --- diff --git a/src/Autopilot/predictor.cxx b/src/Autopilot/predictor.cxx index fe16d14db..eece5cf37 100644 --- a/src/Autopilot/predictor.cxx +++ b/src/Autopilot/predictor.cxx @@ -40,9 +40,18 @@ Predictor::Predictor () : { } -bool Predictor::configure(const string& nodeName, SGPropertyNode* configNode) +bool Predictor::configure(const string& nodeName, SGPropertyNode_ptr configNode) { SG_LOG( SG_AUTOPILOT, SG_BULK, "Predictor::configure(" << nodeName << ")" << endl ); + + if( AnalogComponent::configure( nodeName, configNode ) ) + return true; + + if( nodeName == "config" ) { + Component::configure( configNode ); + return true; + } + if (nodeName == "seconds") { _seconds.push_back( new InputValue( configNode, 0 ) ); return true; diff --git a/src/Autopilot/predictor.hxx b/src/Autopilot/predictor.hxx index 5418b337f..e4c21b514 100644 --- a/src/Autopilot/predictor.hxx +++ b/src/Autopilot/predictor.hxx @@ -53,7 +53,7 @@ private: InputValueList _filter_gain; protected: - bool configure(const std::string& nodeName, SGPropertyNode* configNode ); + bool configure(const std::string& nodeName, SGPropertyNode_ptr configNode ); public: Predictor();