From a4f1139fcd8a130be87d7a9fee881b22d1acc8a9 Mon Sep 17 00:00:00 2001 From: Thorsten Brehm Date: Fri, 8 Oct 2010 21:41:09 +0200 Subject: [PATCH] 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. --- src/Autopilot/predictor.cxx | 11 ++++++++++- src/Autopilot/predictor.hxx | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) 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(); -- 2.39.5