From 26b74c91da2b9b8bd6e05bd96b1ffd74cfbef550 Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Fri, 22 May 2015 17:40:17 +0200 Subject: [PATCH] Only warn about unknown tags in instrumentation.xml Richard J. Senior: Without this commit, unknown top-level tags in instrumentation.xml are treated as errors and the rest of the file is not processed. Users running Flightgear versions prior to 3.2 have experienced problems with the comm-radio tags after downloading updated versions of aircraft from FGADDON. Instrumentation listed after the unrecognized comm-radio tags is not processed for these users and is inactive in the cockpit. This commit changes the instrumentation build method so that unrecognized tags are treated as warnings. This won't help users running older versions but protects against the same problems occurring if new tags are added to instrumentation in the future. --- src/Instrumentation/instrument_mgr.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Instrumentation/instrument_mgr.cxx b/src/Instrumentation/instrument_mgr.cxx index 5b56f9780..6aebd16c6 100644 --- a/src/Instrumentation/instrument_mgr.cxx +++ b/src/Instrumentation/instrument_mgr.cxx @@ -222,9 +222,8 @@ bool FGInstrumentMgr::build (SGPropertyNode* config_props) set_subsystem( id, new TCAS( node ), 0.2); } else { - SG_LOG( SG_INSTR, SG_ALERT, "Unknown top level section: " - << name ); - return false; + SG_LOG( SG_INSTR, SG_ALERT, + "Unknown top level section in instrumentation: " << name ); } // only push to our array if we actually built an insturment -- 2.39.5